{"_id":"@anycross-ai/cli","_rev":"2-d7397a435d170f0724efba1a307c1ed1","name":"@anycross-ai/cli","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@anycross-ai/cli","version":"0.1.1","keywords":["anycross","cli","api","endpoints","agents"],"license":"MIT","_id":"@anycross-ai/cli@0.1.1","maintainers":[{"name":"keithst","email":"keith@surething.io"}],"homepage":"https://anycross.ai/docs/cli","bugs":{"url":"https://github.com/Surething-io/anycross/issues"},"bin":{"anycross":"dist/anycross.js"},"dist":{"shasum":"1e21f33ba34084070455c4ac81eb6e5b039c9a28","tarball":"https://registry.npmjs.org/@anycross-ai/cli/-/cli-0.1.1.tgz","fileCount":5,"integrity":"sha512-qkCYnl2f8n3aZBVPoH2HVnIglTyLPyDx/RO09PfTQdyRUq1VLoRgUiYTtx54ble8bMP0br90q4I2pEm2mXbzaw==","signatures":[{"sig":"MEQCIHjOwY78sZAQo94zgz8BxNERP/XA4qCKCzoAQHl8DXa0AiBrptahAom3LXu7QgK7oR6R5cDeYpDMG/MmXxo214IQMA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2449753},"type":"module","engines":{"node":">=22"},"scripts":{"dev":"tsx src/main.ts","lint":"biome lint .","test":"vitest run","build":"node build.mjs","check":"biome check --write .","format":"biome format --write .","prepack":"node build.mjs && node ../../scripts/generate-third-party-notices.mjs","test:p0":"vitest run .p0. --passWithNoTests","test:p1":"vitest run .p1. --passWithNoTests","lint:fix":"biome lint --write .","test:watch":"vitest","check-types":"tsc --noEmit","format:check":"biome format .","test:integration":"vitest run --config vitest.integration.config.ts"},"_npmUser":{"name":"keithst","email":"keith@surething.io"},"repository":{"url":"git+https://github.com/Surething-io/anycross.git","type":"git","directory":"apps/cli"},"_npmVersion":"11.6.1","description":"Search, inspect and run paid API endpoints with one Key — the AnyCross CLI","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","effect":"4.0.0-rc.112","vitest":"^4.1.5","esbuild":"^0.26.0","@repo/lib":"workspace:*","typescript":"catalog:","@types/node":"^22.15.3","@repo/contract":"workspace:*","@effect/platform-node":"4.0.0-rc.112","@repo/typescript-config":"workspace:*"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.1_1787997947674_0.779466293300336","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"_id":"@anycross-ai/cli@0.1.2","bin":{"anycross":"dist/anycross.js"},"bugs":{"url":"https://github.com/Surething-io/anycross/issues"},"dist":{"shasum":"f69afad3a9c9eece1072bb6d961b982875b90cce","tarball":"https://registry.npmjs.org/@anycross-ai/cli/-/cli-0.1.2.tgz","fileCount":5,"integrity":"sha512-XFskjoR45/jEtVVzBgwzZ4cCV90OjbdChMpfo8XBDeDgbzp5/o4vCJ/QqiDDDH3FAHOUh+aJ9BLe/JUzoX8nuA==","signatures":[{"sig":"MEYCIQDiN62UPIuYSxGDBOKH8xinL9boCPzxjIBCJxA3RP+XqgIhANSYlJTJKOLXtRXmgi9uxpwWE/7C46IsG0aTLO22LwIK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGQxq6bY3+nGX/wUX30cPsDqpKY1pi30112l+Lu/xBzSAiBhdOu4daepdNQ8FLTBUsZmWCmpF8QFhOCIKlICub+hJQ=="}],"unpackedSize":2449952},"name":"@anycross-ai/cli","type":"module","_from":"file:anycross-ai-cli-0.1.2.tgz","engines":{"node":">=22"},"license":"MIT","scripts":{"dev":"tsx src/main.ts","lint":"biome lint .","test":"vitest run","build":"node build.mjs","check":"biome check --write .","format":"biome format --write .","prepack":"node build.mjs && node ../../scripts/generate-third-party-notices.mjs","test:p0":"vitest run .p0. --passWithNoTests","test:p1":"vitest run .p1. --passWithNoTests","lint:fix":"biome lint --write .","test:watch":"vitest","check-types":"tsc --noEmit","format:check":"biome format .","test:integration":"vitest run --config vitest.integration.config.ts"},"version":"0.1.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:94229d46-2a5c-4d84-b0a8-20aa51ba5422"}},"homepage":"https://anycross.ai/docs/cli","keywords":["anycross","cli","api","endpoints","agents"],"_resolved":"/home/runner/work/anycross/anycross/anycross-ai-cli-0.1.2.tgz","_integrity":"sha512-XFskjoR45/jEtVVzBgwzZ4cCV90OjbdChMpfo8XBDeDgbzp5/o4vCJ/QqiDDDH3FAHOUh+aJ9BLe/JUzoX8nuA==","repository":{"url":"git+https://github.com/Surething-io/anycross.git","type":"git","directory":"apps/cli"},"_npmVersion":"11.17.0","description":"Search, inspect and run paid API endpoints with one Key — the AnyCross CLI","directories":{},"maintainers":[{"name":"keithst","email":"keith@surething.io"}],"_nodeVersion":"24.19.0","publishConfig":{"access":"public","provenance":false},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","effect":"4.0.0-rc.112","vitest":"^4.1.5","esbuild":"^0.26.0","@repo/lib":"workspace:*","typescript":"catalog:","@types/node":"^22.15.3","@repo/contract":"workspace:*","@effect/platform-node":"4.0.0-rc.112","@repo/typescript-config":"workspace:*"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.2_1788161154405_0.5154227392319746"}}},"time":{"created":"2026-08-29T10:05:47.522Z","modified":"2026-08-31T07:25:54.724Z","0.1.1":"2026-08-29T10:05:47.818Z","0.1.2":"2026-08-31T07:25:54.497Z"},"bugs":{"url":"https://github.com/Surething-io/anycross/issues"},"license":"MIT","homepage":"https://anycross.ai/docs/cli","keywords":["anycross","cli","api","endpoints","agents"],"repository":{"url":"git+https://github.com/Surething-io/anycross.git","type":"git","directory":"apps/cli"},"description":"Search, inspect and run paid API endpoints with one Key — the AnyCross CLI","maintainers":[{"name":"keithst","email":"keith@surething.io"}],"readme":"# anycross CLI\n\nSearch, inspect and run paid API endpoints with one Key — the first-party\nclient for the AnyCross data plane (`/v1`).\n\n## Install\n\n```bash\ncurl -fsSL https://anycross.ai/install.sh | sh    # no npm needed (Node >= 22)\n# or, with npm:\nnpm install -g @anycross-ai/cli\n```\n\nRe-run either command to upgrade. Then: `anycross login`.\n\n## Commands\n\n```\nanycross search  [-q <query>] [--limit N]          # no -q lists the catalog\nanycross inspect -p <provider> -e <endpoint> [--endpoint-version N]\nanycross run     -p <provider> -e <endpoint> [-i '<json>'|@file | -f <path>]\n                 [--endpoint-version N] [--idempotency-key K]\n                 [--wait] [--wait-timeout s] [-o file]\nanycross runs list [--limit --cursor --status --provider --endpoint]\nanycross runs get  -r <runId> [--wait] [--wait-timeout s] [-o file]\nanycross runs stop -r <runId>\nanycross balance\nanycross balance history [--limit --cursor --kind]\nanycross keys add --label <l> --key <k> | list | activate --label <l>\n             | remove --label <l> [--force]\n```\n\nGlobal: `-j/--json`, `--help`, `--version`.\n\n## Login\n\n`anycross login [--no-browser]` — the browser flow: the terminal prints a\nmatch code, the console's `/cli/authorize` page opens, one click approves,\nand the Key lands in the local store (labelled after the workspace slug,\nactivated). Approve only when the code on the page matches the terminal; the\nCLI then prints WHICH workspace it logged into — read that line. Denied or\nexpired approvals exit 1 with a re-run hint. `login --json` is a usage error:\nthe non-interactive path is minting a Key in the console plus\n`anycross keys add`.\n\n## Keys\n\nPrecedence: `ANYCROSS_API_KEY` (validated; a malformed value is an error, it\nnever falls back silently) > the active stored Key > an error pointing at\n`anycross keys add`.\n\nThe local store is `$XDG_CONFIG_HOME/anycross/keys.json` (default\n`~/.config`, file mode 0600). Labels are unique; the first Key auto-activates;\nremoving the active Key deactivates it; `keys remove` only touches this\nmachine — it does not revoke the Key. Only masked tokens (`ax_1bba****`) are\never printed.\n\n## Run semantics\n\n- `status` is the Run lifecycle; `Response: HTTP n` is the provider's verdict.\n  `COMPLETED` + `HTTP 404` is a normal outcome (charged by the NO_RESULT\n  clause), not an error.\n- The `Idempotency-Key` is printed to stderr before dispatch. After an\n  ambiguous failure (transport error, timeout, `service_unavailable` — the\n  API may have admitted a Run before answering 503) retry with the SAME key:\n  a replay is a read and is never charged twice. The error message carries\n  the exact retry command.\n- `--wait` polls (0.5s → ×2 → cap 10s) until terminal; `--wait-timeout`\n  (default 300s) requires `--wait`. Sync endpoints answer terminally in one\n  round trip and never poll.\n- `-o <file>` writes the Run's `output` field only for a COMPLETED Run with\n  non-null output.\n- Money fields are exact USD decimal strings, printed verbatim. Sum them\n  with decimal arithmetic, never floats.\n\n## Streams and exit codes\n\nHuman mode: data on stdout; progress, hints, prompts and errors on stderr.\nJSON mode (`--json`): stdout carries only the raw success body; every error —\nusage errors included — is a single JSON object on stderr shaped like the API\nenvelope (`{\"error\":{\"code\",...},\"request_id\"?}`). `keys remove --json`\nrequires `--force` so a prompt can never corrupt machine output.\n\n| Code | Meaning |\n|---|---|\n| 0 | Success. A COMPLETED Run (any provider status); a successful `runs stop`. |\n| 1 | API error, transport failure, `--wait` timeout, or `run`/`runs get` ending FAILED / STOPPED. |\n| 2 | Usage: bad flags or input JSON, invalid env values, no Key configured. |\n| 130 | Interrupted. |\n\n## Design notes\n\n- `search` matches `POST /v1/endpoints/search` — the CLI verb is the API verb.\n- `--wait` and `--wait-timeout <seconds>` are separate flags.\n- `-f/--input-file <path>` exists alongside `-i` (mutually exclusive).\n- Every `run` carries an Idempotency-Key — retrying with the same key is a\n  read, never a second charge.\n\n## Development\n\n```bash\npnpm --filter @anycross-ai/cli dev -- search -q \"web search\"   # tsx, no build\npnpm --filter @anycross-ai/cli build                            # esbuild → dist/anycross.js\nnode apps/cli/dist/anycross.js --help\ncd apps/cli && pnpm link --global                  # a PATH `anycross` shim\n\npnpm --filter @anycross-ai/cli test:p0                          # unit\nANYCROSS_API_KEY=ax_… pnpm --filter @anycross-ai/cli test:integration   # needs seeded :3101\n```\n\nEnv: `ANYCROSS_API_BASE_URL` (default `https://api.anycross.ai`),\n`ANYCROSS_API_KEY`, `XDG_CONFIG_HOME`, `NO_COLOR`.\n","readmeFilename":"README.md"}