CLI Reference
CLI Overview
Global flags, output formats, and general usage patterns for the storemyapi CLI.
CLI Overview
The storemyapi CLI follows a consistent storemyapi <resource> <action> pattern.
Global flags
These flags are available on every command:
| Flag | Short | Description |
|---|---|---|
--help | -h | Show help for any command |
--version | -v | Print CLI version |
--token <token> | -t | Override authentication token |
--project <name> | -p | Set the target project |
--env <environment> | -e | Set the target environment |
--format <format> | -f | Output format: text, json, table |
--quiet | -q | Suppress non-essential output |
--verbose | Enable debug logging | |
--no-color | Disable colored output |
Output formats
Most commands support three output formats:
# Default — human-readable
storemyapi keys list
# JSON — for scripting and piping
storemyapi keys list --format json
# Table — aligned columns
storemyapi keys list --format tableJSON output example:
[
{
"id": "key_abc123",
"name": "STRIPE_SECRET_KEY",
"project": "my-saas-app",
"environment": "production",
"createdAt": "2026-01-15T10:30:00Z",
"lastAccessedAt": "2026-02-17T08:45:00Z"
}
]Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Authentication failure |
3 | Resource not found |
4 | Validation error |
5 | Network error |
Configuration file
The CLI reads configuration from ~/.storemyapi/config.json:
{
"defaultProject": "my-saas-app",
"defaultEnvironment": "development",
"format": "text",
"apiUrl": "https://api.storemyapi.com"
}Set values with storemyapi config set:
storemyapi config set defaultProject my-saas-app
storemyapi config set format jsonCommand structure
storemyapi <command> <subcommand> [flags]
Commands:
keys Manage API keys
projects Manage projects
env Environment variable operations
config CLI configuration
login Authenticate with your account
logout Remove stored credentials
whoami Show current user info