{"_id":"@agent-readiness/cli","_rev":"3-66adde42e94e687e1b03395640889d00","name":"@agent-readiness/cli","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@agent-readiness/cli","version":"0.1.0","license":"MIT","_id":"@agent-readiness/cli@0.1.0","maintainers":[{"name":"abenichou","email":"antoine.benichou96@gmail.com"}],"bin":{"agent-readiness":"dist/index.js"},"dist":{"shasum":"9f1a6c8057d900302efd9989be09b3007045f8b6","tarball":"https://registry.npmjs.org/@agent-readiness/cli/-/cli-0.1.0.tgz","fileCount":3,"integrity":"sha512-59lE2gNN2xO425tnGhYzilBWCtWyYM6HJXOehcswAHnvdghqhw5zp+FrIYo8KosGPiakIFnHhtCk/BBA7xhhTA==","signatures":[{"sig":"MEUCIQDoF63sPmluyDeX52fcA1NFHvcwq9bnWJ+9dM/iFZZ+tQIgO/AjYaoHj4imKXhM0H+DKLaXGsgSyeF5E8NCBhWqdHU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16579},"type":"commonjs","engines":{"node":">=18"},"gitHead":"870c0d8ed7d13b6aec617142f476c4f54019ec80","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"abenichou","email":"antoine.benichou96@gmail.com"},"_npmVersion":"11.12.1","description":"Thin CLI wrapper around the agent-readiness API — run an audit and gate a CI pipeline on the score.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"commander":"^15.0.0","picocolors":"^1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.10","typescript":"^7.0.2","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.0_1784917842370_0.21434421718912255","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to cabfy — install with: npm i cabfy"},"0.1.1":{"name":"@agent-readiness/cli","version":"0.1.1","license":"MIT","_id":"@agent-readiness/cli@0.1.1","maintainers":[{"name":"abenichou","email":"antoine.benichou96@gmail.com"}],"bin":{"agent-readiness":"dist/index.js"},"dist":{"shasum":"8da2d7ac9d54d21b035df4452b43003f1e0e8171","tarball":"https://registry.npmjs.org/@agent-readiness/cli/-/cli-0.1.1.tgz","fileCount":3,"integrity":"sha512-nAnHxNcXrd8m9US3Wr4mX/Qpl1j9lYHp6qdKxwge6qHNeZ3TL/uXwn0Ncd6n/+ceJyAfDKBmYxRKpplreqodZA==","signatures":[{"sig":"MEUCIQDFJXMIzfoyauXpODExFDUNqB2+qea23tkORiPpgCTUkQIgNT7kWih1wXm+5VJJA7s8pO8rfDjuIV/dBKo1nPys1rM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16577},"type":"commonjs","engines":{"node":">=18"},"gitHead":"870c0d8ed7d13b6aec617142f476c4f54019ec80","scripts":{"dev":"tsup --watch","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"abenichou","email":"antoine.benichou96@gmail.com"},"_npmVersion":"11.12.1","description":"Thin CLI wrapper around the agent-readiness API — run an audit and gate a CI pipeline on the score.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"commander":"^15.0.0","picocolors":"^1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.10","typescript":"^7.0.2","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.1_1784918440447_0.34685265069938653","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to cabfy — install with: npm i cabfy"}},"time":{"created":"2026-07-24T18:30:42.284Z","modified":"2026-08-04T20:04:29.316Z","0.1.0":"2026-07-24T18:30:42.503Z","0.1.1":"2026-07-24T18:40:40.606Z"},"license":"MIT","description":"Thin CLI wrapper around the agent-readiness API — run an audit and gate a CI pipeline on the score.","maintainers":[{"name":"abenichou","email":"antoine.benichou96@gmail.com"}],"readme":"# @agent-readiness/cli\n\nThin CLI wrapper around the [agent-readiness](../README.md) API\n(`POST /audits` + `GET /audits/{id}`) — no logic beyond what the API already\ndoes. Runs an audit, polls until it's done, prints a scored, colored result in\nthe terminal, and can gate a CI pipeline on the score.\n\n## Usage\n\n```bash\nnpx @agent-readiness/cli audit https://my-store.com\n```\n\n```\n✔ Audit created — b3f1e2a0-... (polling…)\n\nagent-readiness score: 92/100\n\n  ✔ ucp_discovery       100  pass\n  ✔ catalog_quality      95  pass\n\nReport: https://agent-readiness-api.onrender.com/audits/b3f1.../report\n```\n\nA check in `warn`/`fail` prints its `recommendation` right below its row —\nthat's the actionable text to read first.\n\n### Flags\n\n| Flag | Default | Purpose |\n|---|---|---|\n| `<url>` (positional) | — | Store URL to audit |\n| `--fail-under <score>` | none | Exit non-zero if `overall_score` is below this threshold — the flag that turns this into a CI quality gate |\n| `--commit <sha>` | auto-detected | `metadata.commit_sha` |\n| `--branch <name>` | auto-detected | `metadata.branch` |\n| `--ci-url <url>` | auto-detected | `metadata.ci_run_url` |\n| `--api-key <key>` | `$AGENT_READINESS_API_KEY` | API key. Without one, the audit runs anonymously (rate-limited, `agent_simulation` unavailable — see the [root README](../README.md#rate-limiting-and-quotas)) |\n| `--api-url <url>` | `$AGENT_READINESS_API_URL` or `https://agent-readiness-api.onrender.com` | Backend base URL — override for local dev |\n| `--language <fr\\|en>` | `fr` (API default) | Recommendation/report language |\n| `--timeout <seconds>` | `300` | How long to poll before giving up (the audit itself keeps running server-side past this) |\n| `--json` | `false` | Print the raw `GET /audits/{id}` JSON only — no colors, no progress lines — for scripted parsing |\n\n### CI metadata auto-detection\n\n`--commit`/`--branch`/`--ci-url` are auto-detected when not given explicitly:\n\n| | GitHub Actions | GitLab CI |\n|---|---|---|\n| commit | `GITHUB_SHA` | `CI_COMMIT_SHA` |\n| branch | `GITHUB_HEAD_REF` (PR) or `GITHUB_REF_NAME` (push) | `CI_COMMIT_REF_NAME` |\n| CI run URL | built from `GITHUB_SERVER_URL`/`GITHUB_REPOSITORY`/`GITHUB_RUN_ID` | `CI_JOB_URL` |\n\n### GitHub Actions example (quality gate)\n\n```yaml\n- name: agent-readiness audit\n  env:\n    AGENT_READINESS_API_KEY: ${{ secrets.AGENT_READINESS_API_KEY }}\n  run: npx @agent-readiness/cli audit https://my-store.com --fail-under 60\n```\n\nCommit/branch/CI run URL are picked up automatically from the GitHub Actions\nenvironment — no extra flags needed.\n\n### Exit codes\n\n| Case | Code |\n|---|---|\n| No `--fail-under`, audit `done` | `0` |\n| `--fail-under N`, `overall_score >= N` | `0` |\n| `--fail-under N`, `overall_score < N` | `1` |\n| Audit `status == \"failed\"` | `1` |\n| Polling timeout | `1` |\n| API error (auth, quota, rate limit, validation...) | `1` |\n\nEvery non-2xx API response is parsed per the\n[error contract](../README.md#error-contract) (`error_code` + `detail`, plus\ncontext like `quota_used`/`retry_after_seconds` when relevant) and printed to\nstderr.\n\n## Not in scope yet\n\n`login`/`init` subcommands (API key setup, `.agent-readiness.yml` config\ngeneration) are on the roadmap (see root `BACKLOG.md`) but not implemented —\nthis first version only ships `audit`. The command is structured around\n[commander](https://github.com/tj/commander.js) subcommands specifically so\nthose can be added later without restructuring.\n\n## Development\n\n```bash\nnpm install\nnpm run build      # tsup -> dist/index.js\nnpm test           # vitest\nnpm run typecheck  # tsc --noEmit\n```\n","readmeFilename":"README.md"}