@lovrabet/rabetbase-cli
v2.5.11
Published
Developer CLI for Lovrabet apps, datasets, pages, SQL, Backend Function, database connections, skills, and AI agent workflows.
Readme
Rabetbase CLI
Rabetbase CLI is the developer command-line interface for Lovrabet applications. It helps developers, delivery teams, and AI agents create projects, bind workspaces, inspect developer-side app contracts, manage datasets, generate API files, synchronize Data List Pages, publish SQL and Backend Function assets, manage database connections, and prepare agent-ready development workflows from a stable terminal surface.
The CLI is designed for development-time operations. Use it to configure and
publish Lovrabet app assets before they become runtime capabilities. For
runtime business data queries, runtime SQL or Backend Function execution, and app-specific
business Skills, use the Lovrabet runtime CLI (@lovrabet/lovrabet-cli).
Requirements
- Node.js 24.0.0 or later
- A Lovrabet account with access to the target developer app
- Browser login for commands that call the Lovrabet platform
- An existing Lovrabet frontend project, or a new project created by this CLI
Install
npm install -g @lovrabet/rabetbase-cli@latest
rabetbase --version
rabetbase --helpTo opt into the npm beta preview instead:
npm install -g @lovrabet/rabetbase-cli@betaYou can also run a specific version with npm tooling:
npx @lovrabet/rabetbase-cli@latest --helpUpdate and Verify
Choose exactly one update command, then run the shared verification commands. Run the repair commands only if doctor reports a Built-in Skill mismatch.
# Upgrade to the latest stable version
rabetbase update
# Or opt into the current beta preview instead
rabetbase update --beta
# Verify the installed CLI and its same-version Built-in Skill
rabetbase --version
rabetbase --help
rabetbase schema
rabetbase doctor
# Repair the Built-in Skill only when doctor reports a mismatch
rabetbase cli-skill install
rabetbase doctorQuick Start
Authenticate first:
rabetbase auth loginCreate a new Lovrabet frontend project:
rabetbase project create my-app
cd my-appInitialize or update the current workspace app binding:
rabetbase workspace init --appcode <app-code>
rabetbase doctorPull developer-side dataset contracts and generate local API files:
rabetbase api pull --appcode <app-code>Inspect a dataset before changing its structure or generated assets:
rabetbase dataset list --name customer --format pretty
rabetbase dataset detail --code <dataset-code> --format compress
rabetbase dataset operations --code <dataset-code> --format compressUse --format pretty for human-readable output and --format json or
--format compress for scripts and agents.
Country/Region and Independent Deployment Routing
Configure an official node by country/region:
rabetbase config init --region cn
rabetbase config init --region idFor an independent deployment, import a versioned routing manifest instead of adding region-specific conditions to commands:
rabetbase config init --domain-config ./lovrabet-domains.json{
"protocol": "lovrabet-routing/v1",
"kind": "enterprise",
"cdn": {
"libraries": "https://cdnjs.cloudflare.com/ajax/libs",
"lovrabet": "https://g.lovrabet.com"
},
"domains": {
"userDomain": "https://user.customer.example.com",
"apiDomain": "https://api.customer.example.com",
"runtimeDomain": "https://runtime.customer.example.com",
"skillDomain": "https://skills.customer.example.com",
"kbDomain": {
"default": "https://kb.customer.example.com",
"rabetbase-cli": "https://kb-admin.customer.example.com"
},
"kbServiceDomain": "https://kb-service.customer.example.com",
"appDomain": "https://app.customer.example.com"
}
}A Domain can be a shared HTTPS origin string or a consumer-specific object.
Rabetbase resolves rabetbase-cli first and then default; if neither exists,
the import fails instead of sending requests to another consumer's Domain.
Official region mode and explicit independent-deployment Domains are mutually
exclusive.
cdn.libraries is the complete base URL for third-party libraries such as
React and Ant Design. cdn.lovrabet is the HTTPS origin for Lovrabet-owned
assets. Independent deployments declare both explicitly.
Company knowledge management, app rules, and search use kbServiceDomain with the developer
Cookie. Management requires a trusted HTTPS origin, rejects redirects, and sends
X-CSRF-Token: kb-browser-v1 on create/update/delete. App rules use the same
kbServiceDomain and require a developer Cookie. Management JSON requests are limited to 32 MiB; oversized input is
rejected without truncation. A missing independent-deployment kbServiceDomain
must be configured before management commands can run.
Official routing is compiled into this package from the independent
lovrabet-routing repository. The CLI does not download that catalog at
runtime. Generated files under src/generated/ are read-only snapshots with a
consumer projection digest and must be updated through the routing repository's generator.
When Rabetbase generates SDK client files, it writes the effective public
runtimeDomain to sdk-config.ts; credentials and other CLI configuration are
never copied into frontend source.
Generated browser projects keep their complete public Domain snapshot in
rabetbase.domain-routing.json. project create writes it initially; after a
project or global Domain configuration change, refresh the current project
explicitly:
rabetbase project domain-routing-syncThe snapshot is project-only and is not a frontend page-routing configuration.
Its cdn.libraries value is the complete third-party library base URL, while
cdn.lovrabet is the origin for Lovrabet-owned assets. Each official
country/region declares both final values directly, so a node can use its own
CDN without consumer-side routing logic.
Each available node declares its own Lovrabet resource Domain separately; it is
never inherited from another node or inferred from its country/region.
The generated project file always contains the two complete final URLs.
AI Agent Skill
Installing or upgrading the npm package automatically installs the same-version Rabetbase CLI Built-in Skill from the package-local source through the latest official Skills CLI. To diagnose or repair it:
rabetbase cli-skill installThe package also includes the independent rabetbase-page-generation and
rabetbase-dataset-generation Skills. Install each one explicitly from the
installed CLI package directory:
npx skills add /path/to/rabetbase-cli/skills/rabetbase-page-generation -g -y
npx skills add /path/to/rabetbase-cli/skills/rabetbase-dataset-generation -g -yReplace the paths with the actual package location. postinstall,
rabetbase cli-skill install, and rabetbase doctor manage only the main
rabetbase Built-in Skill; reinstall independent Skills explicitly after a CLI
update when needed.
Runtime business Skills are installed with the Lovrabet runtime CLI after selecting the target runtime app:
lovrabet skill installCommon Commands
| Area | Commands |
| --- | --- |
| Authentication | rabetbase auth login, rabetbase auth logout |
| Project and workspace | rabetbase project create, rabetbase project upgrade, rabetbase workspace init, rabetbase workspace use |
| App profiles | rabetbase app list, rabetbase workspace add, rabetbase workspace remove |
| Dataset contracts | rabetbase dataset list, rabetbase dataset detail, rabetbase dataset operations, rabetbase dataset relations, rabetbase dataset relation-audit |
| Dataset changes | rabetbase dataset design-context, rabetbase dataset design-validate, rabetbase dataset design-start, rabetbase dataset design-status, rabetbase dataset field-update, rabetbase dataset extend-update, rabetbase dataset business-group-update |
| API metadata and documentation | rabetbase api list, rabetbase api pull, rabetbase api generate |
| Invocation code snippets | rabetbase codegen sdk, rabetbase codegen sql |
| Data List Pages | rabetbase page generate-start, rabetbase page generate-status, rabetbase page pull, rabetbase page push, rabetbase page sync, rabetbase page relation-audit |
| Custom Pages | rabetbase page create --page-pattern <BLANK|ONEPAGE|DASHBOARD>, rabetbase page custom-list, rabetbase page custom-detail, rabetbase page custom-update, rabetbase page custom-publish |
| SQL and Backend Function assets | rabetbase sql list, rabetbase sql detail, rabetbase sql create, rabetbase sql push, rabetbase sql validate, rabetbase bff list, rabetbase bff detail, rabetbase bff push |
| Database connections | rabetbase db list, rabetbase db detail, rabetbase db create, rabetbase db test, rabetbase db analyze-start, rabetbase db analyze-status |
| Platform management | rabetbase menu list, rabetbase menu external-link-create, rabetbase menu external-link-update, rabetbase menu sync, rabetbase menu asset-update, rabetbase menu subapp-assets-status, rabetbase menu subapp-assets-update, rabetbase app-config list/get/set, rabetbase kb list/detail/create/update/delete |
| Diagnostics | rabetbase doctor, rabetbase schema, rabetbase logs show, rabetbase update |
api pull refreshes dataset facts and the project's SDK model registry; api generate produces dataset Markdown documentation. codegen means code generation: codegen sdk generates a TypeScript invocation snippet for a dataset operation, while codegen sql generates one for a saved custom SQL query, targeting SDK or Backend Function code.
For frontend subapps, prefer asking your Agent to inspect the menu tree, preserve existing groups, register pages under the intended parents, and use shared subapp resources. The existing menu sync wizard and batch commands remain available as fallback workflows, with their current parameters and behavior.
Run command-level help for flags and prerequisites:
rabetbase <service> --help
rabetbase <service> <command> --helpOutput and Automation
Global options are available across commands:
rabetbase dataset list --format json
rabetbase dataset detail --code <dataset-code> --format compress
rabetbase sql push --sqlcode <sql-code> --dry-run
rabetbase bff push --type ENDPOINT --name <function-name> --dry-runImportant options:
--app <name>: select an app profile by name--appcode <code>: override the target app code--format json|pretty|compress: choose output format--jq <expr>: filter JSON output--dry-run: preview supported write operations--yes: skip confirmation for high-risk writes--non-interactive: force CI-friendly behavior--global: write or read global configuration when the command supports it--project: restrict configuration reads to the current project when supported
Safety Notes
- Inspect developer-side contracts with
dataset detail,dataset operations, or resource-specificdetailcommands before writing changes. - Prefer
--dry-runbefore SQL, Backend Function, dataset, page, menu, app-config, kb, or database write operations when supported. rabetbase kbadministers company knowledge for the resolved developer app;lovrabet kbremains the runtime personal-knowledge and search surface.- Company knowledge-base create/update/delete require explicit review and
--yes. Delete verifies database soft deletion by exact-ID readback; asynchronous RAG cleanup is reported but cannot be verified by the CLI. - Use
--yesonly when the target app, selector, parameters, and impact are already verified. - Project-scoped writes are the default for configuration workflows. Use
--globalonly when you intentionally want to change global CLI state. - Do not commit cookies, access keys, generated credentials, or local user configuration files.
Documentation
- Website: https://www.lovrabet.com
- Developer documentation: https://open.lovrabet.com/
- CLI help:
rabetbase --help
License
Licensed under the terms in LICENSE.
Direct knowledge search
rabetbase kb search calls the unified KB Service directly. Official Mainland China and Indonesia connections resolve the endpoint automatically; independent deployments use their configured kbServiceDomain:
rabetbase kb search --appcode app-xxxxx --query "business rules" --format jsonSearch sends the current developer Cookie directly to /api/knowledge-base/search and returns public/company knowledge. --kb-service-url can override the trusted HTTPS origin for one request without persisting it. Global has no registered KB endpoint and does not borrow another region's address. Missing routes fail closed; redirects and switching endpoints after request failures are disabled. Management and rule commands use the same trusted kbServiceDomain. Wire Result document IDs are decoded losslessly into strings; updates, deletes, and rule writes use server-side version compare-and-set. Company management uses /api/knowledge-base/company/{operation}; app rules use /api/knowledge-base/company/rules/{operation} and retain their app-owned scope=rules VO. All knowledge calls use POST JSON with appCode and document IDs in the body and scope selected by the path (no body.scope), without a protocol header; Result/VO responses are retained. Search sends explicit public/company scopes and preserves the existing development output profile. See KB workflow.
Report a problem
rabetbase issue report --title "Page push failed" --description-file ./issue.md --dry-run
rabetbase issue report --title "Page push failed" --description-file ./issue.mdPreview the redacted content before submitting. On success, the command displays
Issue log submitted.
