CLI Reference
The Keystore CLI (@keystore/cli) lets you manage your Keystore organization, agents, API keys, and providers from the terminal.
Installation
npm install -g @keystore/cliAfter installing, the keystore command is available globally.
Authentication
keystore signup
Create a new Keystore account. Prompts for email, password, and organization name.
keystore signup
# Email: you@company.com
# Password: ********
# Organization name: Acme Corp
# Account created. Logged in as you@company.comkeystore login
Log in to an existing account. Credentials are stored locally for subsequent commands.
keystore login
# Email: you@company.com
# Password: ********
# Logged in as you@company.comkeystore whoami
Show the currently authenticated user and organization.
keystore whoami
# Email: you@company.com
# Org: org_abc123keystore logout
Clear stored credentials.
keystore logout
# Logged outProject Setup
keystore init
Initialize a .keystore project config file in the current directory. Prompts for a project name and default providers.
keystore init
# Project name: my-agent
# Default providers (comma-separated, e.g. openai,anthropic): openai,anthropic
# Created .keystore config for "my-agent"This creates a .keystore file:
{
"project": "my-agent",
"providers": ["openai", "anthropic"]
}Agent Management
keystore agents list
List all agents in your organization with their status, budget, and rate limits.
keystore agents list
# ID Name Status Budget RPM RPD
# ag_abc123 my-agent active $100 60 1000
# ag_def456 test-agent paused -- -- --keystore agents create
Create a new agent interactively. Prompts for name, monthly budget, and rate limits. Returns an agent token that starts with ks_.
keystore agents create
# Agent name: my-agent
# Monthly budget (USD, blank for none): 100
# Requests per minute (blank for none): 60
# Requests per day (blank for none): 1000
# Agent "my-agent" created
#
# Agent token: ks_a1b2c3d4e5f6...
# Save this token -- it won't be shown again.keystore agents delete <id>
Delete an agent. Prompts for confirmation.
keystore agents delete ag_abc123
# Delete agent ag_abc123? (y/n) y
# Agent ag_abc123 deletedkeystore agents pause <id>
Pause an agent. Paused agents cannot make requests through the proxy.
keystore agents pause ag_abc123
# Agent ag_abc123 pausedkeystore agents resume <id>
Resume a paused agent.
keystore agents resume ag_abc123
# Agent ag_abc123 resumedAPI Key Management
keystore keys create
Create a new API key. Keys can have admin or agent scope.
keystore keys create
# Key name: deploy-key
# Scope (admin/agent, default admin): admin
# API key created
#
# Secret: sk_live_abc123...
# Save this -- it won't be shown again.keystore keys list
List all API keys with their prefix and scope.
keystore keys list
# ID Name Prefix Scope
# key_abc123 deploy-key sk_live_ab admin
# key_def456 ci-key sk_live_de agentkeystore keys revoke <id>
Revoke an API key. Prompts for confirmation.
keystore keys revoke key_abc123
# Revoke key key_abc123? (y/n) y
# Key key_abc123 revokedProvider Management
keystore providers list
List all available providers.
keystore providers list
# Slug Name
# openai OpenAI
# anthropic Anthropic
# neon Neon
# resend Resend
# vercel Vercel
# s3 AWS S3keystore providers add
Add a provider account. Supports BYOK (bring your own key) and marketplace modes.
keystore providers add
# Provider slug (e.g. openai): openai
# Mode (byok/marketplace): byok
# API key: sk-proj-abc123...
# Provider openai added (byok)keystore providers remove <id>
Remove a provider account. Prompts for confirmation.
keystore providers remove pa_abc123
# Remove provider account pa_abc123? (y/n) y
# Provider account pa_abc123 removedkeystore providers rotate <id>
Rotate credentials for a provider account. The old key is replaced immediately.
keystore providers rotate pa_abc123
# New API key: sk-proj-newkey...
# Credentials rotated for pa_abc123Monitoring
keystore usage [agent-id]
Show a usage summary. Omit the agent ID to see organization-wide usage.
keystore usage ag_abc123
# Period: 2026-03
# Requests: 1,234
# Errors: 12
# Cost: $4.5600
# Budget: $100 (4.6% used)keystore usage
# Period: 2026-03
# Requests: 8,901
# Errors: 45
# Cost: $32.1200keystore logs [agent-id]
Show request logs for an agent, with optional filtering and live tailing.
Options:
| Flag | Description |
|---|---|
--provider <slug> | Filter logs by provider |
--follow | Poll for new logs |
--limit <n> | Number of logs (default 20) |
keystore logs ag_abc123
# 14:23:01 200 openai /v1/chat/completions 320ms $0.0042
# 14:23:05 200 anthropic /v1/messages 450ms $0.0038keystore logs ag_abc123 --provider openai --follow
# 14:23:01 200 openai /v1/chat/completions 320ms $0.0042
# 14:23:15 200 openai /v1/chat/completions 280ms $0.0031
# ... (polling for new logs)Connectivity
keystore test
Verify that the agent token can reach the Keystore vault.
keystore test
# Connection successful -- vault is reachablePass a specific token with --token:
keystore test --token ks_abc123...
# Connection successful -- vault is reachable