@lovrabet/rabetbase-cli
v2.5.3
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 22.20 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"
},
"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.
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 installRuntime 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 generate-start, rabetbase dataset generate-status, rabetbase dataset field-update, rabetbase dataset extend-update, rabetbase dataset business-group-update |
| API generation | rabetbase api list, rabetbase api pull, rabetbase api generate, 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 app-config list/get/set, rabetbase kb list/detail/create/update/delete |
| Diagnostics | rabetbase doctor, rabetbase schema, rabetbase logs show, rabetbase update |
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.
