Upstash CLI
$ upstash 官方出品 中风险Upstash CLI(@upstash/cli)用于管理 Upstash Serverless Redis 数据库、Vector 向量索引、QStash 队列以及编码 Agent 集成向导。资源子命令支持 --json 输出与显式参数非交互执行,但缺少必填参数时会回退为交互式提问。
npm install -g @upstash/cli 快速查询和创建资源适合直接调用 upstash CLI;在对话宿主中执行数据面读写时可配合 upstash setup 配置的 MCP 服务。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
资源子命令支持 --json 与显式参数,但缺省参数会触发交互提示,且直接执行 upstash 会进入 upstash setup 向导。
- Supports
--jsononredis list/stats/create; bare invocation triggers setup wizard
作用于云资源控制面;删除类命令缺少内置 --dry-run 预演模式。
- API key auth via
~/.config/upstash/config.json;redis deletemutates live billing resources
跨平台 Node.js CLI,可通过 npm 或 npx 直接运行。
- Published as
@upstash/cliandupstashon npm
单工具覆盖 Redis、Vector、QStash 编排及 Agent MCP 初始化。
- Manages Upstash Redis, Vector, and QStash control planes
由 Upstash 官方在 upstash/cli 仓库以 MIT 协议维护。
- Official
upstash/clirepository
在官方文档与 --help 中有说明,部分新子命令主要依赖 CLI 帮助文本。
- Official docs at upstash.com/docs/redis/features/cli
安全边界、鉴权与放权指南
执行 upstash auth login 后凭证保存在 ~/.config/upstash/config.json,也可通过 UPSTASH_EMAIL 和 UPSTASH_API_KEY 传入。
CLI 以 MIT 协议开源;Upstash 云平台提供免费额度及按量计费的 Serverless 方案。
# Upstash CLI Agent Rules - Never invoke bare `upstash` with no subcommand (it launches the interactive setup wizard). - Always pass `--json` and explicit flags like `--name` / `--region` to avoid interactive prompts. - NEVER run `upstash redis delete` without user confirmation.
Agent 高频安全命令配方
只读查询(安全推荐)
upstash redis list --json
输出已创建的 Redis 实例、接入端点与区域信息的 JSON。
upstash redis stats --id <database-id> --json
在不改变任何状态的前提下获取请求量、延迟与存储用量。
受控写入与预演
upstash redis create --name agent-cache --region us-east-1 --json
通过显式参数非交互地创建一个新的 Redis 数据库。
核心优势
- +
--json标志提供规整的机器可读资源元数据。 - + 支持通过
npx upstash免全局安装即时调用。 - + 补齐必填参数即可非交互完成实例创建。
注意事项与踩坑点
- ! 不带子命令直接运行
upstash会进入交互式upstash setup向导。 - ! 遗漏必填参数时会弹出交互选择框导致无头 Agent 阻塞。