Getting Started
Authentication
Connect the storemyapi CLI to your account.
Authentication
The CLI needs to authenticate with your storemyapi account before you can manage keys.
Interactive login
The simplest way to authenticate:
storemyapi loginThis opens your browser to complete the OAuth flow. Once authorized, the CLI stores a refresh token locally.
$ storemyapi login
Opening browser to https://storemyapi.com/auth/cli...
Waiting for authentication...
✓ Authenticated as jane@company.com
Token saved to ~/.storemyapi/credentials.jsonAPI token authentication
For CI/CD and headless environments, use an API token:
# Set via environment variable (recommended for CI)
export STOREMYAPI_TOKEN="sma_live_abc123..."
# Or pass directly
storemyapi login --token sma_live_abc123...Generate API tokens from your dashboard settings.
Token management
# Check current authentication status
storemyapi whoami
# Output:
# Email: jane@company.com
# Org: acme-corp
# Token: sma_live_...3def (expires in 29d)
# Log out and remove stored credentials
storemyapi logoutCredential storage
Credentials are stored in ~/.storemyapi/credentials.json with 600 permissions (owner-only read/write).
{
"token": "sma_live_abc123...",
"email": "jane@company.com",
"expiresAt": "2026-03-17T00:00:00Z"
}The CLI never stores your password. Only short-lived access tokens and refresh tokens are persisted.
Environment variable precedence
The CLI checks for credentials in this order:
STOREMYAPI_TOKENenvironment variable--tokenflag passed to the command~/.storemyapi/credentials.jsonfile
This means CI environments can override local credentials without modifying any files.