storemyapi
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]
FlagShortDescription
--project <name>-pFilter by project
--env <environment>-eFilter by environment (production, staging, development)
--format <format>-fOutput 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 json

Get 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.

FlagShortDescription
--project <name>-pTarget project
--env <environment>-eTarget 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.

FlagShortDescription
--project <name>-pTarget project
--env <environment>-eTarget environment (default: development)
--description <text>-dOptional 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 production

Delete a key

storemyapi keys delete <name> [flags]
FlagShortDescription
--project <name>-pTarget project
--env <environment>-eTarget environment
--forceSkip 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 --force

Rename 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-app

Copy 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

On this page