CLI Reference
Keys
Get, set, delete, and list individual API keys in your linked project.
Keys
The storemyapi key commands manage individual keys in the linked project. All commands require a .storemyapi.json in the current directory (created by storemyapi init or storemyapi link).
List all keys
storemyapi key listPrints all key names and their values for the linked project.
Get a key value
storemyapi key get <name>Fetches a single key value from the cloud and prints it to stdout. Useful for piping into other commands.
Examples:
storemyapi key get STRIPE_SECRET_KEY
# Pipe to clipboard (macOS)
storemyapi key get OPENAI_API_KEY | pbcopy
# Use inline in a shell command
export STRIPE_KEY=$(storemyapi key get STRIPE_SECRET_KEY)Set a key
storemyapi key set <name> <value>Creates a new key in the cloud. If a key with that name already exists, the CLI will ask you to confirm before overwriting.
Examples:
storemyapi key set STRIPE_SECRET_KEY "sk_live_abc123..."
storemyapi key set DATABASE_URL "postgres://user:pass@host/db"Delete a key
storemyapi key delete <name>Permanently removes a key from the cloud project.
Example:
storemyapi key delete OLD_API_KEYBulk sync with push / pull
For working with all keys at once (syncing to/from a local .env file), use push and pull instead. See the Env reference.