openrouter-key-check
v0.1.0
Published
CLI to check OpenRouter API key usage, limits, and credits.
Maintainers
Readme
openrouter-key-check
A tiny CLI to check an OpenRouter API key: its usage (total / daily / weekly / monthly), spend limits, BYOK usage, and — for management keys — account credits.
Runs on Node (>=18) or Bun. The published CLI is a bundled,
Node-compatible JS file, so both npx and bunx work.
Usage
No install needed:
npx openrouter-key-check
# or
bunx openrouter-key-checkBy default it prompts for a key. You can also pass one explicitly or read it from the environment:
# read OPENROUTER_API_KEY from the environment
OPENROUTER_API_KEY=sk-or-... bunx openrouter-key-check --env
# pass the key directly
npx openrouter-key-check --key sk-or-...
npx openrouter-key-check --key=sk-or-...Options
| Flag | Description |
| -------------- | ------------------------------------------------- |
| --env | Use OPENROUTER_API_KEY from the environment. |
| --key <key> | Use the provided API key. |
| --help, -h | Show help. |
If neither --env nor --key is given, you'll be prompted for a key.
Output
Prints the key label, usage and limit figures (in USD), BYOK usage, expiry, and flags such as whether it's a free-tier / management / provisioning key. For management keys it additionally fetches account credits and total usage.
Development
bun run check --help # run the TypeScript source directly
bun run build # bundle to dist/ (Node target)License
MIT
