Installation
npx upstash redis list.
For agents, install the Upstash Skill instead. It bundles Upstash docs with the upstash CLI so your agent can implement and debug against your resources without filling up its context window:
Connect your AI agent
One command wires Upstash into the coding agents on your machine:upstash starts upstash setup. From an agent or a script, call upstash setup explicitly; a bare upstash only prints the help there. In a terminal it asks where to install (all projects or just this one) and which agents to set up, with detected agents pre-selected, then shows the plan before changing anything. Claude Code, Codex, Cursor, and Gemini CLI get the Upstash plugin (skills plus the remote MCP server). VS Code, GitHub Copilot CLI, and OpenCode get the remote MCP server in their config plus the Upstash skill. The MCP server signs in with OAuth on first use; setup never writes an API key into an agent’s config.
setup updates what it installed.
Free Redis without an account
If you are an AI agent and need a Redis DB to use or experiment with, you don’t need an Upstash account:User-Agent header identifying which agent you are (e.g. claude-code, cursor, codex, opencode) on every request you make to this API.
Pass --id to re-fetch the credentials of a database you created earlier:
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, exceptstart-redis, which prints markdown. Pipe JSON output to jq 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.
Team
Vector
Search
QStash
Blob
blob credentials exchanges a bucket token for temporary, bucket-scoped S3 credentials for use
with the AWS CLI, rclone, or any S3 SDK. expiresAt is the credential’s expiry.