Lovrabet workbench operations ↔ Rabetbase CLI mapping
Who this is for
Developers and delivery engineers who have an Agent call the Rabetbase CLI to do dev-mode work inside AI tools like Cursor, Claude Code, and Trae.
The usage pattern isn't typing commands by hand. It's: know what the CLI can do for a given console task → copy the example prompt to the Agent → the Agent executes and interprets the results.
Before you start
- Have the Agent install the CLI + Skill (copy this to the Agent):
text
帮我安装 Rabetbase CLI:https://www.lovrabet.com/agent-install-guides/rabetbase-cli.md- First-time login can also be delegated to the Agent:
text
请执行 rabetbase auth login --yes 帮我登录 Lovrabet。
如果输出 Login URL,我会打开浏览器完成授权,完成后告诉你。- If the project directory has a
.rabetbase.json, the Agent picks up the app automatically; otherwise state theappCodeclearly in the prompt.
Boundary:
rabetbase= dev mode (database connections, analysis, datasets, SQL/BFF, page publishing). Business users querying data or running pages should use the console chat / the lovrabet CLI.
Command capability mapping
The table lists commands the Agent may call (a capability index) — not something to memorize.
| Console task | Console path | CLI the Agent can call |
|---|---|---|
| List database connections | RabetBase → Database connection management | db list · db detail |
| Test a connection | Test connection | db test |
| Create a connection | Connect new database | db create (supports --dry-run preview) |
| Full analysis | Full analysis | db analyze-start |
| Incremental analysis | Incremental analysis → select tables | db analyze-start --tables t1,t2 |
| Check analysis progress | List status / View analysis results | db analyze-status · db analyze-cancel |
| Database vs. platform differences | Analysis results / operations troubleshooting | db diff · db tables |
| Inspect dataset structure | Datasets overview / DO | dataset list · dataset detail · dataset operations |
| Edit DO fields | DO editing → save and publish | dataset field-update |
| Pull/push pages | Page development | page pull · page push · page sync |
| Generate a smart list page | Overview → Generate standard page | page generate-start (dry-run by default; --apply submits) |
| Custom SQL | RabetBase → Custom SQL | sql list · sql save · sql pull · sql validate |
| Backend Functions | RabetBase → Backend Function | bff list · bff pull · bff push |
| Sync menus | Page menu tree | menu sync · menu update |
| Query real rows in dev mode | — | data filter · data getOne |
| Diagnostics / reporting | — | doctor · issue report |
For flag details: rabetbase <service> <command> --help or the Rabetbase command reference.
Example prompts (copy to the Agent)
1. Connect + full analysis (first onboarding)
text
请用 rabetbase CLI 帮 appCode=<你的应用code> 完成数据库首次接入:
1. db list 找到连接;没有则列出创建连接还缺的信息
2. db test 确认连通
3. db analyze-start 发起全量分析
4. analyze-status 轮询到 SUCCESS 或 PARTIAL_SUCCESS
完成后总结 dbLinkId、状态,并给出 data.links.erPage 让我确认 ER 图2. Incremental analysis after schema changes
text
<表名> 等表在生产库改了结构。请用 rabetbase CLI(appCode=<你的应用code>):
1. db diff 看差异,说明建议同步哪些表
2. db analyze-start --tables <表1>,<表2> 做增量分析
3. analyze-status 轮询到完成
4. 列出建议回归的数据集或页面3. Calibrate dataset fields
text
请用 rabetbase CLI(appCode=<你的应用code>):
1. dataset detail --code <datasetCode> 列出字段
2. 我把要改的字段告诉你后,用 dataset field-update 更新(先 dry-run 给我看 diff)
3. 确认后再执行写入4. Generate a standard list page (preview first, then submit)
text
请用 rabetbase 为数据集 <datasetCode> 生成智能列表页:
1. dataset detail 确认字段没问题
2. page generate-start --datasetcode <datasetCode> 只看 dry-run 预览
3. 我回复「确认提交」后再加 --apply 真正发起
4. generate-status 跟踪直到完成5. Pull SQL/BFF locally, edit, then push
text
请用 rabetbase CLI(appCode=<你的应用code>):
1. sql list / bff list 找到编码为 <code> 的资源
2. sql pull / bff pull 拉到当前项目
3. 我改完文件后,先 validate(SQL)再 push,写操作先 dry-runWhat to expect while the Agent executes
| Behavior | Notes |
|---|---|
| Output format | compress JSON by default; the Agent extracts fields with --jq |
| Write operations | Most commands support --dry-run; page generate-start previews by default and needs --apply |
| Expired login | Have the Agent run rabetbase doctor or auth login --yes |
| High-risk writes | May require --yes; the Agent should explain the impact in the conversation before executing |
Related documentation
- Rabetbase CLI 2.0 quick start guide
- Using Rabetbase in Claude Code: from one sentence to a full feature
- Rabetbase command reference
- Incremental analysis after schema changes
- Database Connector