cli-anything-web:test

A test command for a CLI-Anything-Web command-line tool. It verifies authentication first, then runs the tool's automated tests and records the results in TEST.md.

In plain words
What is it for?
Use it to log in, validate live authentication, run a CLI's pytest tests, check subprocess behaviour, and update the project's test report.
Why use it?
It prevents misleading test results caused by missing or invalid login state and checks both the normal test suite and, when available, installed-command tests.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/itamarzand88/cli-anything-web/test
Clone the repo
git clone --depth 1 https://github.com/ItamarZand88/CLI-Anything-WEB
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 713 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.00713
Opus 5 $0.00011 $0.00357
Sonnet 5 $0.00004 $0.00143
Haiku 4.5 $0.00002 $0.00071

Measured yesterday against content hash ca8a86b42bad, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-anything-web:test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cli-anything-web-plugin/commands/test.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLI-Anything-Web: Test Runner

Skills used: testing (Phase 3)

Read the methodology overview: @${CLAUDE_PLUGIN_ROOT}/HARNESS.md

Target: $ARGUMENTS

Process

This command invokes the testing skill for Phase 3.

  1. Verify auth is working FIRST — this is mandatory before any E2E test:

    cli-web-<app> auth login              # playwright-cli (recommended)
    cli-web-<app> auth login --cookies-json <file>  # manual fallback
    cli-web-<app> auth status
    

    Auth status MUST show live validation succeeded. If it fails:

    • Ensure playwright-cli is available (npx @playwright/cli@latest --version)
    • Fix auth before running any tests
    • Do NOT proceed with "auth not configured" — that is a broken test
  2. Locate test directory: <app>/agent-harness/cli_web/<app>/tests/

  3. Run full test suite:

    cd <app>/agent-harness
    python -m pytest cli_web/<app>/tests/ -v --tb=short 2>&1
    
  4. If installed, also run subprocess tests:

    CLI_WEB_FORCE_INSTALLED=1 python -m pytest cli_web/<app>/tests/ -v -s -k subprocess 2>&1
    

    After running, verify the subprocess backend was used:

    • Check output for [_resolve_cli] Using installed command: — this confirms the installed package is being tested, not the source fallback
    • If this line is absent, the installed CLI was not found in PATH
  5. Parse test output: count passed, failed, skipped, errors

  6. Generate TEST.md using the automated generator:

    python ${CLAUDE_PLUGIN_ROOT}/scripts/generate-test-docs.py full \
      <app>/agent-harness/cli_web/<app>/tests --app-name <app>
    

    This produces both Part 1 (test plan from AST) and Part 2 (results from pytest).

  7. If failures exist, analyze and suggest fixes

See the testing skill for detailed testing patterns and the standards skill for quality checks.

TEST.md Format

# Test Results — cli-web-<app>

## Summary
- **Total**: X tests
- **Passed**: X
- **Failed**: X
- **Date**: YYYY-MM-DD

## Unit Tests (test_core.py)
<list of test results>

## E2E Tests (test_e2e.py)
<list of test results>

## CLI Subprocess Tests
<list of test results>

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 86 lines · 22 tokens per session scan A ca8a86b42bad

Subscribe to this mod's changes

cli-anything-web:test is a command published in the GitHub repository ItamarZand88/CLI-Anything-WEB (216 stars, last pushed 8d ago), licensed MIT. It adds 22 tokens to every session and 713 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.