CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

Retool CLI

$ retool 官方出品 中风险
Retool · 办公协作与 SaaS · MIT · macos / linux / windows

Retool CLI(@tryretool/cli,命令为 retool)支持将 Retool 原生 React 应用克隆到本地(clone)、离线执行类型与结构校验(retool check)、推送预览构建(push)以及发布上线(publish)。支持 --token 无头登录与 retool skill install,但缺少 --json 输出且强制要求 Node 22+、pnpm 与 git。

FCRS-1.0 综合评分
71 /100
可用但有局限
中置信度 (源码/文档)
零摩擦安装命令
npm install -g @tryretool/cli
CLI vs MCP 选型建议 优先选 CLI

本地 retool check 离线校验以及基于 Git 仓库的 React 应用 push/publish 直接在本地执行更高效。

Agent 友好度体检单

— 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
— 支持 NO_COLOR
✓ 自省/Schema 发现
✓ 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 16 / 25

支持 retool skill install、auth login --token 与非交互式 check/push/publish,但缺少 --json 输出与 --dry-run。

  • retool skill install and --token auth
  • No global --json output format
安全与权限边界 18 / 25

将离线 retool check、预览 retool push 与生产 retool publish 清晰分离,降低误发布风险。

  • Offline retool check validation
  • Preview push separated from live publish
安装与运行摩擦 11 / 15

通过 @tryretool/cli 安装,但强依赖 Node.js 22+、pnpm 与 git。

  • Requires Node 22+, pnpm, and git
能力覆盖与边际价值 12 / 15

顺畅覆盖本地 React 应用拉取、离线校验、预览构建与上线发布流程。

  • Supports init, clone, check, push, publish, and apps
维护与来源背书 7 / 10

新版 @tryretool/cli 已替代处于废弃状态的旧版 tryretool/retool-cli 仓库。

  • Active @tryretool/cli npm package; classic repo deprecated
文档与可验证性 7 / 10

在 docs.retool.com/build/apps/guides/create/cli 与 @tryretool/cli 的 README 中均有详细说明。

  • Official Retool CLI documentation

安全边界、鉴权与放权指南

鉴权方式
浏览器 OAuth 环境变量密钥 本地配置文件
凭证存储位置

通过 retool auth login --host <org>.retool.com 登录,也可使用具备 react_apps:write 权限的 retool auth login --token <token> 或 --device 无头认证。

潜在副作用
只读查询 本地写入 远端写入
费用与配额提示

MIT 协议的 @tryretool/cli;需配合 Retool 组织账号使用(提供免费版)。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Retool CLI Agent Rules
- Always run `retool check` locally before `retool push`.
- Never run `retool publish` without explicit human approval; keep automated runs on preview `retool push`.

Agent 高频安全命令配方

只读查询(安全推荐)

在本地校验 Retool 应用类型与结构
retool check

离线验证本地 React/TypeScript Retool 应用代码,不消耗服务端构建资源。

列出组织内的 Retool 应用
retool apps

只读列出当前已认证组织下的 Retool 应用列表。

受控写入与预演

推送预览构建至 Retool
retool push -m "Update dashboard layout"

上传已校验的本地变更并触发预览构建,暂不直接发布到生产环境。

核心优势

  • + 离线 retool check 可在推送预览前拦截类型与结构错误。
  • + 区分预览 retool push 与正式 retool publish,并内置 retool skill install。

注意事项与踩坑点

  • ! 缺少 --json 结构化输出,且要求本地安装 Node 22+、pnpm 与 git。
  • ! 旧版 tryretool/retool-cli 仓库已废弃,新项目应使用 @tryretool/cli。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI