Installation
upstash CLI so your agent can implement and debug against your resources without filling up its context window:
Authentication
The CLI needs your account email and a developer API key. Grab one from the Upstash Console under Account → API Keys, then set credentials using whichever method fits your workflow.1. Saved login (recommended)
Saves your credentials to~/.config/upstash/config.json (taken from $XDG_CONFIG_HOME) so you only have to do it once per machine.
2. Environment variables
The CLI readsUPSTASH_EMAIL and UPSTASH_API_KEY from the process environment, and also auto-loads them from a .env file in the current directory.
--env-path to point at a different file:
3. Per-command flags
Override whatever is set above for a single invocation. Handy for scripts that switch between accounts.When credentials come from multiple sources, precedence is:
flags > environment variables > .env > saved config fileUsage
--help on any command or subcommand for details:
Output
All successful output is JSON. Pipe it tojq for filtering:
--dry-run on destructive commands (delete, remove-member) to preview the action before executing it.
Redis
Core
Configuration
Backups
Execute Redis commands directly
redis exec runs commands straight against the Redis REST API. It uses the database token, not your Developer API key. Get endpoint and rest_token from upstash redis get --db-id $DB_ID.
--db-url and --db-token can be omitted if UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN are set via environment variable or .env file.