Skip to main content

Rabetbase CLI 2.0

Rabetbase is Lovrabet platform's BaaS infrastructure for developers. It provides standard APIs, TypeScript SDK, iOS SDK, Android SDK, ABAC permission architecture, and internationalization support -- letting you handle data operations, business logic authoring, and project deployment from the terminal, with a complete, production-ready enterprise-grade server-side architecture foundation.


What Is Rabetbase CLI

Rabetbase CLI is the command-line tool for developers on the Lovrabet platform. It brings the platform's core capabilities -- data querying, API management, SQL orchestration, BFF scripts, and menu configuration -- directly into your terminal.

You no longer need to switch between your browser and IDE, manually copy API endpoints, or open the admin console just to look up a single record. One command does it all.

Rabetbase CLI 2.0 is the successor to the original Lovrabet CLI, rebranded as Rabetbase for brand and feature differentiation. It features a rebuilt architecture designed for both human operators and AI agents, and integrates with workplace tools like Feishu, DingTalk, and WeCom via their CLIs, bridging the gap between development and office scenarios. If you are still using Lovrabet CLI 1.x, see the Lovrabet CLI 1.x docs. For upgrade instructions, see Upgrade from CLI 1.x.


Problems It Solves

For the same type of tasks, without the Rabetbase ecosystem, people rely on manual handoffs; after adopting Rabetbase CLI and the platform's prescribed workflow, the "find resources -> validate -> persist -> execute" loop can be consolidated into the terminal and automated pipelines. The comparison below uses side-by-side columns -- left is "before," right is "with Rabetbase."

Data and API Alignment

Before Connecting to datasets required manually finding codes, assembling URLs, and matching parameters. When table structures or APIs changed, multiple places needed manual updates that were easy to miss.

With Rabetbase dataset list / detail shows fields and relationships directly; api pull, codegen, and related commands keep the client and calling conventions aligned, automatically following platform updates.

Toolchain and Context

Before Writing code in the IDE, checking data in the admin console, running SQL elsewhere, and testing APIs in the browser. Multiple logins and copy-paste operations with high context-switching cost.

With Rabetbase After authentication and the current app are written to config, the same command line handles table queries, SQL execution, BFF debugging, and API pulls, reducing "manual request assembly."

Custom SQL

Before SQL scattered across environments -- hard to reuse, hard to validate uniformly. Field names were guessed, and problems often weren't caught until integration or production. Manual sync to the platform was required.

With Rabetbase Use sql list to check for reuse first; use dataset to confirm fields; automatic validation and sync: sql validate -> save -> exec forms a repeatable closed loop.

BFF and Local Debugging

Before Scripts could only be verified remotely after pushing. Even small changes went through a long pipeline with slow feedback.

With Rabetbase Local scaffolding plus bff status, bff push --dry-run, and related commands let you preview changes before pushing, shortening the iteration cycle.

CLI and AI Collaboration

Before The legacy version relied heavily on MCP + skills to piece together workflows, with complex configuration. Models often called wrong commands and retried repeatedly, burning through tokens.

With Rabetbase CLI 2.0 commands and parameters are stable and risk-graded, suitable for direct human use as well as direct Agent invocation. No complex MCP configuration needed -- CLI and Skills are installed globally and available everywhere.

Summary: Rabetbase is not just another isolated tool. It uses a unified entry point + scriptable output (e.g., --format json) to replace fragmented admin console clicks and copy-paste operations, enabling individual productivity, team alignment, and CI/AI reuse through the same pathway.


Core Value

1. The Terminal Is the Platform

Every platform capability is available directly in the terminal. No browser needed, no tool-switching.

# List datasets for the current app
rabetbase dataset list

# View the field structure of a specific dataset
rabetbase dataset detail --code <32-digit-code>

# Execute a SQL query
rabetbase sql exec --sqlcode <sqlcode> --params '{"month":"2025-01"}'

# Pull the latest API client code
rabetbase api pull

One command replaces what used to require multiple steps.

2. AI-Native Design

Rabetbase is architected for AI collaboration from the ground up. It is not just a CLI for humans -- it is a tool that AI agents can call directly.

What this means: You can let an AI assistant (such as Claude Code) query data, create records, and execute SQL directly through Rabetbase. The AI understands each command's parameters and risk level, so it will not make accidental changes.

Combined with workplace CLIs for Feishu, DingTalk, and WeCom, an AI can seamlessly connect your development workflow with enterprise communication -- say something in a group chat, and the AI will query data, run scripts, and send notifications for you.

3. Local Development Loop

BFF scripts and SQL could previously only be executed and debugged on the remote environment. Now you can do it all locally:

  • Run scripts locally: rabetbase run <script> executes directly on your machine
  • Validate SQL locally: Validate SQL syntax locally before saving it to the platform
  • Debug BFF locally: Write, debug, and push in one continuous flow

4. Team Standardization

Rabetbase brings consistency to team collaboration:

ScenarioWithout RabetbaseWith Rabetbase
New member exploring data structuresAsk colleagues, read docsrabetbase dataset list -- everything at a glance
Pulling API definitionsCopy manually from the admin consolerabetbase api pull auto-generates them
Configuring multiple environmentsMaintain multiple config files manuallyOne config file, switch with --app
Debugging data issuesLog in to the admin console and searchOne terminal command to query directly

5. Secure and Controlled

Rabetbase includes comprehensive safety mechanisms:

  • Risk level control: The riskLevel setting governs command execution permissions, preventing accidental changes
  • High-risk operation confirmation: Destructive and irreversible operations require explicit confirmation
  • Preview mode: Write operations support --dry-run -- review first, execute later
  • AI privilege containment: riskLevel can only be changed by a human editing the config file; AI cannot escalate its own permissions

Scenario 1: Front-end developer onboarding a new feature

A new requirement comes in -- build an "Order Management" page. You are not familiar with the order data model, but you don't need to ask colleagues or open the admin console. A few commands in the terminal tell you everything:

# 1. Find the order-related dataset
rabetbase dataset list --name order

# 2. View the full field structure, operations, and relations
rabetbase dataset detail --code <code> --format json

# 3. See which tables the orders table links to (customers, products, etc.)
rabetbase dataset links --format json

# 4. Pull the API client code -- ready to use in your project
rabetbase api pull

# 5. Need to know what parameters the filter endpoint accepts? Generate SDK call code
rabetbase codegen sdk --code <code> --operation filter

From discovering datasets to generating usable code -- entirely in the terminal, no browser or admin console needed.

Scenario 2: Writing a custom SQL query

The standard SDK filter is not enough -- you need a cross-table JOIN aggregation. Rabetbase provides a complete SQL development workflow:

# 1. Check existing SQL first -- see if anything can be reused
rabetbase sql list --name "order"

# 2. Confirm the table structure and field names (never guess field names)
rabetbase dataset detail --code <code> --format compress

# 3. After writing the SQL, validate it first (syntax check, dangerous statement detection, parameter extraction)
rabetbase sql validate --file ./query.sql

# 4. Validation passed -- save to the platform
rabetbase sql save --file ./query.sql --sqlname order-payment-summary

# 5. Test execution with parameters to verify the results
rabetbase sql exec --sqlcode <sqlcode> --params '{"month":"2025-01"}'

Every step has safeguards: validate automatically detects dangerous statements like DELETE/DDL, save has built-in validation that cannot be bypassed, and exec supports parameterized testing on the spot.

Scenario 3: Developing and deploying a BFF script

You need a backend script to handle cross-table transactions or call external APIs. Rabetbase makes BFF development a local-first workflow:

# 1. Check existing common functions first -- avoid reinventing the wheel
rabetbase bff list --format json

# 2. Create a local scaffold
rabetbase bff new --type ENDPOINT --name get-customer-dashboard

# 3. After writing the script, check local status
rabetbase bff status

# 4. Preview what will be pushed (does not actually execute)
rabetbase bff push --dry-run

# 5. Confirm everything looks correct -- push for real
rabetbase bff push --yes

Create locally, validate locally, preview before pushing -- --dry-run shows you exactly what will change, and --yes requires explicit confirmation to prevent accidental deployments.

Scenario 4: AI assistant handling a development task

Once the Rabetbase Skill is installed, AI assistants (such as Claude Code) can invoke the CLI directly to complete complex development tasks:

"Look up the fields in the order dataset, then write a SQL query that summarizes order amounts by month"

The AI follows the full workflow automatically -- it calls dataset detail to get the real field structure (never guessing field names), then sql validate to check the SQL syntax, then sql save to save it to the platform, and finally sql exec to verify the results. Throughout the process it respects the platform's interface selection priority: if the SDK filter works, no SQL is needed; if SQL works, no BFF is needed.

The AI understands the risk level of every command: read-only commands are executed directly, write operations get a --dry-run preview first, and high-risk operations require your confirmation.

Scenario 5: Automation in CI/CD pipelines

In continuous integration environments, Rabetbase fully supports non-interactive mode:

# Inject authentication and config via environment variables
export RABETBASE_APPCODE=app-xxx
export RABETBASE_ENV=daily
export RABETBASE_FORMAT=json
export CI=true

# Automatically pull the latest API definitions
rabetbase api pull --non-interactive --yes

# Run a data validation check
rabetbase sql exec --sqlcode <sqlcode> --params '{"env":"daily"}' --format json

# Output JSON for downstream processing -- use jq to extract key fields
rabetbase dataset list --format json --jq '.data[].code'

Two Versions, Each with Its Own Role

Lovrabet provides two CLI tools, each targeting different use cases:

Rabetbase CLI (rb)Lovrabet Runtime CLI (lovrabet) [Coming Soon]
PurposeDevelopment mode, for developersRuntime mode, for operations and automation
Core capabilitiesProject management, API pull, SQL orchestration, BFF development, code generation, menu syncData querying, data writing, SQL execution, BFF invocation
Use casesLocal development, team collaborationProduction data operations, AI agent calls
Command prefixrabetbaselovrabet

The simple rule: use rb during development to write code and debug APIs, and use lovrabet after launch to query data and run scripts. Both share the same platform and authentication system, so they work seamlessly together.


Get Started in Three Steps

# 1. Install
npm install -g @lovrabet/rabetbase-cli

# 2. Log in
rabetbase auth login

# 3. Initialize the project
rabetbase project init

After installation, run rabetbase --help to see the full command list, or run rabetbase doctor check to verify your environment configuration.


Rabetbase is currently in a closed beta. If you have any questions or feedback, please contact your account manager or submit an issue on GitHub: https://github.com/lovrabet/issues/issues/new