{"_id":"@apertis/cli","name":"@apertis/cli","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@apertis/cli","version":"0.1.0","description":"Apertis CLI — usage, cost, and model benchmarks for the Apertis API gateway (500+ models, OpenAI-compatible).","keywords":["apertis","llm","cli","usage","cost","benchmark","openai-compatible","ai-gateway"],"homepage":"https://apertis.ai","author":{"name":"Apertis","email":"hi@apertis.ai","url":"https://apertis.ai"},"type":"module","bin":{"apertis":"dist/index.js"},"engines":{"node":">=18"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit"},"dependencies":{"cli-table3":"^0.6.5","commander":"^12.1.0","picocolors":"^1.1.0"},"devDependencies":{"@types/node":"^20.14.0","tsup":"^8.2.0","typescript":"^5.5.0","vitest":"^2.0.0"},"_id":"@apertis/cli@0.1.0","gitHead":"c17839998312839a9f6c6764be29b465429d04ac","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-sADgZNmebVNsZNrL87K1S+ltOn8YM+BUayKjpJ+BQxsfNEVuEzXGkch7EmEnGOysGKzge3tJ/k0JghsNRam0Uw==","shasum":"aed78ccb46e8870d9bf4d0f6dc39401cafa967e2","tarball":"https://registry.npmjs.org/@apertis/cli/-/cli-0.1.0.tgz","fileCount":3,"unpackedSize":17450,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAmxSvUcPaOvF2xfXuF1ClWA5Q2rXRbcVIt0X00iTIYQAiEAudvlvtt4jpI6cHV93/CEOwIYxBrrsyn85FdGfZJ+Kvo="}]},"_npmUser":{"name":"apertis","email":"hi@apertis.ai"},"directories":{},"maintainers":[{"name":"apertis","email":"hi@apertis.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.0_1781019023333_0.12329684189120349"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-09T15:30:23.170Z","0.1.0":"2026-06-09T15:30:23.468Z","modified":"2026-06-09T15:30:23.697Z"},"maintainers":[{"name":"apertis","email":"hi@apertis.ai"}],"description":"Apertis CLI — usage, cost, and model benchmarks for the Apertis API gateway (500+ models, OpenAI-compatible).","homepage":"https://apertis.ai","keywords":["apertis","llm","cli","usage","cost","benchmark","openai-compatible","ai-gateway"],"author":{"name":"Apertis","email":"hi@apertis.ai","url":"https://apertis.ai"},"readme":"# Apertis CLI\n\n`apertis` — a tiny CLI for the [Apertis](https://apertis.ai) API gateway. See your\nusage and spend, list 500+ models, and **benchmark latency, throughput, and real\nmeasured cost** across models — straight from your terminal.\n\nOpenAI-compatible gateway, one command to check what you're spending.\n\n## Install\n\n```bash\nnpm install -g @apertis/cli\n```\n\nOr run without installing:\n\n```bash\nnpx @apertis/cli usage\n```\n\n> Requires Node.js 18+.\n\n## Setup\n\nGet an API key at <https://apertis.ai>, then provide it any of these ways\n(highest precedence first):\n\n```bash\napertis --key sk-... usage          # 1. per-command flag\nexport APERTIS_API_KEY=sk-...       # 2. environment variable\napertis config set-key sk-...       # 3. saved to ~/.apertis/config.json (chmod 0600)\n```\n\n> **Security note:** a key passed as a command argument (`--key`, `config set-key`)\n> can be captured by your shell history and process listings. For sensitive or\n> shared machines, prefer `APERTIS_API_KEY` or the saved config file. The CLI never\n> prints your full key — it is masked in all output and redacted from error messages.\n\n## Commands\n\n### `apertis usage`\n\nYour API key's lifetime usage and spend.\n\n```bash\napertis usage\napertis usage --json\n```\n\n### `apertis models`\n\nList available models, with optional filters.\n\n```bash\napertis models\napertis models --owner openai\napertis models --search claude\napertis models --json\n```\n\n### `apertis benchmark <models...>`\n\nBenchmark one or more models head-to-head. Reports client-measured latency\n(avg / p50), Apertis's **server-side** latency, throughput (tokens/sec), and the\n**actual measured cost** of the run.\n\n```bash\napertis benchmark gpt-4o-mini claude-sonnet-4-6\napertis benchmark gpt-4o-mini -n 5 --prompt \"Summarize the theory of relativity.\"\napertis benchmark gpt-4o-mini --json\n```\n\nCost is measured from your key's `used_quota_usd` delta over the run (best-effort —\nconcurrent use of the same key during a benchmark can inflate it), so it reflects\nreal spend rather than a pricing-table estimate.\n\n### `apertis config`\n\n```bash\napertis config set-key sk-...       # save key (and optionally --base-url)\napertis config show                 # show saved config (key masked)\n```\n\n## Global flags\n\n| Flag | Description |\n|------|-------------|\n| `-k, --key <key>` | API key (overrides env and config file) |\n| `--base-url <url>` | API base URL (default `https://api.apertis.ai/v1`) |\n| `--json` | Machine-readable JSON output |\n\n## Development\n\n```bash\nnpm install\nnpm test          # unit tests (vitest)\nnpm run build     # bundle to dist/ (tsup)\n```\n\n## Links\n\n- [Apertis](https://apertis.ai) — get your API key\n- Model list & pricing: <https://apertis.ai/pricing>\n- Support: hi@apertis.ai\n","readmeFilename":"README.md","_rev":"1-0534c4c464710565ef85c481a3f29268"}