Skip to content

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

  1. 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
  1. First-time login can also be delegated to the Agent:
text
请执行 rabetbase auth login --yes 帮我登录 Lovrabet。
如果输出 Login URL,我会打开浏览器完成授权,完成后告诉你。
  1. If the project directory has a .rabetbase.json, the Agent picks up the app automatically; otherwise state the appCode clearly 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 taskConsole pathCLI the Agent can call
List database connectionsRabetBase → Database connection managementdb list · db detail
Test a connectionTest connectiondb test
Create a connectionConnect new databasedb create (supports --dry-run preview)
Full analysisFull analysisdb analyze-start
Incremental analysisIncremental analysis → select tablesdb analyze-start --tables t1,t2
Check analysis progressList status / View analysis resultsdb analyze-status · db analyze-cancel
Database vs. platform differencesAnalysis results / operations troubleshootingdb diff · db tables
Inspect dataset structureDatasets overview / DOdataset list · dataset detail · dataset operations
Edit DO fieldsDO editing → save and publishdataset field-update
Pull/push pagesPage developmentpage pull · page push · page sync
Generate a smart list pageOverview → Generate standard pagepage generate-start (dry-run by default; --apply submits)
Custom SQLRabetBase → Custom SQLsql list · sql save · sql pull · sql validate
Backend FunctionsRabetBase → Backend Functionbff list · bff pull · bff push
Sync menusPage menu treemenu sync · menu update
Query real rows in dev modedata filter · data getOne
Diagnostics / reportingdoctor · 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-run

What to expect while the Agent executes

BehaviorNotes
Output formatcompress JSON by default; the Agent extracts fields with --jq
Write operationsMost commands support --dry-run; page generate-start previews by default and needs --apply
Expired loginHave the Agent run rabetbase doctor or auth login --yes
High-risk writesMay require --yes; the Agent should explain the impact in the conversation before executing
  • 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

基于飞书知识库同步生成,内容以飞书源文档为准