CLI Reference
Keys
Create, retrieve, list, update, and delete API keys from the command line.
Keys
The storemyapi keys command manages your encrypted API keys.
List keys
storemyapi keys list [flags]| Flag | Short | Description |
|---|---|---|
--project <name> | -p | Filter by project |
--env <environment> | -e | Filter by environment (production, staging, development) |
--format <format> | -f | Output format: text, json, table |
Examples:
# List all keys
storemyapi keys list
# List production keys for a project
storemyapi keys list --project my-saas-app --env production
# Output as JSON
storemyapi keys list -p my-saas-app -f jsonGet a key value
storemyapi keys get <name> [flags]Retrieves and decrypts a single key value. Output is the raw value with no extra formatting, making it safe for piping.
| Flag | Short | Description |
|---|---|---|
--project <name> | -p | Target project |
--env <environment> | -e | Target environment |
Examples:
# Get a key value
storemyapi keys get STRIPE_SECRET_KEY -p my-saas-app
# Pipe to clipboard
storemyapi keys get OPENAI_API_KEY -p my-saas-app | pbcopy
# Use inline in another command
export API_KEY=$(storemyapi keys get OPENAI_API_KEY -p my-saas-app)Set (create or update) a key
storemyapi keys set <name> <value> [flags]Creates a new key or updates an existing one. The value is encrypted before storage.
| Flag | Short | Description |
|---|---|---|
--project <name> | -p | Target project |
--env <environment> | -e | Target environment (default: development) |
--description <text> | -d | Optional description |
Examples:
# Set a key
storemyapi keys set DATABASE_URL "postgres://user:pass@host/db" \
-p my-saas-app -e production
# Set with a description
storemyapi keys set RESEND_API_KEY "re_abc123" \
-p my-saas-app -e production \
-d "Transactional email service"
# Pipe from stdin (useful for multi-line values like certificates)
cat private-key.pem | storemyapi keys set TLS_PRIVATE_KEY --stdin \
-p my-saas-app -e productionDelete a key
storemyapi keys delete <name> [flags]| Flag | Short | Description |
|---|---|---|
--project <name> | -p | Target project |
--env <environment> | -e | Target environment |
--force | Skip confirmation prompt |
Examples:
# Delete with confirmation prompt
storemyapi keys delete OLD_API_KEY -p my-saas-app
# Skip confirmation
storemyapi keys delete OLD_API_KEY -p my-saas-app --forceRename a key
storemyapi keys rename <old-name> <new-name> [flags]Renames a key without changing its value or other metadata.
storemyapi keys rename STRIPE_KEY STRIPE_SECRET_KEY -p my-saas-appCopy a key between environments
storemyapi keys copy <name> --from <env> --to <env> [flags]Copies a key's value from one environment to another within the same project.
storemyapi keys copy DATABASE_URL \
--from staging --to production \
-p my-saas-app