lovrabet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

lovrabet-runtime-cli — Lovrabet 运行态 CLI

lovrabet-runtime-cli — Lovrabet Runtime CLI

面向业务人员和集成开发者的运行态 CLI,提供数据集查询、数据 CRUD、SQL 执行、BFF 调用能力。
结构化输出与 jq:需要机器可读 JSON 时优先
--format compress
(单行信封);需缩进时用
--format json
。二者均可叠加全局
--jq '<expr>'
缩小输出;语义与
rabetbase
一致,详见 输出格式与 --jq
A runtime CLI for business personnel and integration developers, providing capabilities for dataset queries, data CRUD, SQL execution, and BFF invocations.
Structured Output & jq: Use
--format compress
(single-line envelope) first when machine-readable JSON is needed; use
--format json
for indentation. Both can be combined with the global
--jq '<expr>'
to narrow down output; the semantics are consistent with
rabetbase
, see Output Format & --jq for details.

使用顺序

Usage Sequence

先看 guides,再查 references。
  • 流程 / 决策:
    • 应用决议
    • 数据集与数据流程
    • SQL 与 BFF 流程
    • 排障
  • 命令细节 / 参数参考:
    • references/*.md
Check guides first, then references.
  • Flow / Decision:
    • App Resolution
    • Dataset & Data Workflow
    • SQL & BFF Workflow
    • Troubleshooting
  • Command Details / Parameter References:
    • references/*.md

安装

Installation

bash
npm install -g @lovrabet/lovrabet-cli
bash
npm install -g @lovrabet/lovrabet-cli

认证

Authentication

当前主路径是 User Access Key(client-ak)。优先级:CLI flags > 环境变量 > 配置文件
  1. User AK
    .lovrabet.json
    LOVRABET_ACCESS_KEY
    accessKey
    (适合 CI);有
    accessKey
    时走 client-ak
  2. Cookie:历史兼容读取,已不是推荐主路径;新文档与 Agent 指导默认按 AK 流程处理
详见 认证参考
The current primary method is User Access Key (client-ak). Priority: CLI flags > Environment Variables > Configuration File.
  1. User AK: Configure
    accessKey
    in
    .lovrabet.json
    or
    LOVRABET_ACCESS_KEY
    (suitable for CI); when
    accessKey
    exists, use client-ak
  2. Cookie: Read for historical compatibility, no longer the recommended primary method; new documents and Agent guidance default to the AK process
See Authentication Reference for details.

认证命令选择

Authentication Command Selection

  • 只想更新 AK,尽量保留现有配置:使用
    lovrabet auth login
  • 要从头重建当前作用域认证配置:使用
    lovrabet auth init
  • 不要
    auth init
    当作普通登录命令;它会清空当前作用域下已有配置,再只写回新的认证结果
  • auth login --env
    仅作为实现层兼容能力存在,默认不要在指导中主推;需要“清空后重建 + 写 env”时优先用
    auth init --env ...
  • Only want to update AK while retaining existing configuration: Use
    lovrabet auth login
  • Want to rebuild the authentication configuration for the current scope from scratch: Use
    lovrabet auth init
  • Do NOT treat
    auth init
    as a regular login command; it will clear existing configurations under the current scope and then only write back the new authentication result
  • auth login --env
    exists only as a compatibility layer for implementation; do not promote it by default in guidance; prefer
    auth init --env ...
    when you need to "clear and rebuild + write to env"

配置作用域原则(
--global

Configuration Scope Principle (
--global
)

  • 写操作默认当前项目
    app init
    app import
    config set
    config delete
    等),除非用户显式
    --global
  • 不要在用户未要求时给命令加
    --global
    ** — 默认行为已是「项目优先」;只有用户明确要改全局配置或不在项目内且意图写全局时才使用。
  • config set
    /
    config delete
    :在没有项目配置文件(当前目录未解析到
    .lovrabet.json
    )且
    --global
    时,CLI 拒绝执行并提示使用
    --global
    或先
    lovrabet app init
    不会静默写入全局。
  • app list
    :默认走远端优先 + 本地缓存
    --local
    只读缓存;
    --no-cache
    强制打线上并刷新缓存。
  • app pull
    :只刷新本地 app cache,把远端应用列表写入
    .lovrabet.json
    ;它是手动刷新命令,平时优先使用
    app list
  • app use
    /
    app import
    :只操作本地用户意图配置(
    defaultApp
    / 顶层
    appcode
    ),详见 应用管理
  • Write operations default to the current project (such as
    app init
    ,
    app import
    ,
    config set
    ,
    config delete
    ), unless the user explicitly passes
    --global
    .
  • Do NOT add
    --global
    to commands without user request — the default behavior is already "project-first"; only use
    --global
    when the user clearly wants to modify global configurations or is not in a project and intends to write to the global scope.
  • config set
    /
    config delete
    : When there is no project configuration file (no
    .lovrabet.json
    resolved in the current directory) and
    --global
    is not passed, the CLI refuses to execute and prompts to use
    --global
    or run
    lovrabet app init
    first; it will not silently write to the global scope.
  • app list
    : Defaults to remote-first + local cache;
    --local
    reads only the cache;
    --no-cache
    forces fetching from the online source and refreshes the cache.
  • app pull
    : Only refreshes the local app cache, does not write the remote application list to
    .lovrabet.json
    ; it is a manual refresh command, use
    app list
    preferentially in daily use
  • app use
    /
    app import
    : Only operate on local user intent configurations (
    defaultApp
    / top-level
    appcode
    ), see Application Management for details.

Agent 禁止行为

Prohibited Behaviors for Agents

  • 不要擅自加
    --global
    — 见上文「配置作用域原则」;默认写项目、读合并;仅在用户明确要求或文档说明的场景使用
    --global
  • 禁止通过修改配置文件提升权限 — 不得为了完成任务而修改
    .lovrabet.json
    、环境变量或缓存内容来抬高
    riskLevel
    、切换到并非用户明确授权的
    accessKey
    、伪造
    defaultApp
    /
    appcode
    /
    env
    、或借此突破当前权限边界。权限不足时,应明确说明限制,并要求用户提供合法的目标应用、凭证或确认范围。
  • Do NOT add
    --global
    without permission
    — see the "Configuration Scope Principle" above; default to writing to the project and reading merged configurations; only use
    --global
    in scenarios explicitly requested by the user or specified in documents.
  • Prohibit modifying configuration files to elevate permissions — Do not modify
    .lovrabet.json
    , environment variables, or cache content to increase
    riskLevel
    , switch to an
    accessKey
    not explicitly authorized by the user, forge
    defaultApp
    /
    appcode
    /
    env
    , or break current permission boundaries to complete tasks. When permissions are insufficient, clearly explain the restrictions and request the user to provide legitimate target applications, credentials, or confirm the scope.

Agent 决策:何时获取应用信息

Agent Decision: When to Fetch Application Information

在执行
dataset
/
data
/
sql
/
bff
前,不要一律先跑
app list
。先判断当前需求是否真的需要做“应用决议”。
Do not always run
app list
before executing
dataset
/
data
/
sql
/
bff
. First determine whether the current requirement truly requires "app resolution".

可以直接使用当前应用的场景

Scenarios Where the Current Application Can Be Used Directly

满足以下任一条件时,优先直接用当前应用执行,不先打
app list
  1. 用户已经显式给了
    --appcode
  2. 用户已经显式给了
    --app <name>
  3. 当前配置里已有明确的
    defaultApp
  4. 问题明显是在“当前项目 / 当前默认应用”上下文里继续操作
这种情况下,直接进入:
  1. dataset list --name ...
  2. dataset detail --code ...
  3. data filter/getOne/create/update/delete
不要先多打一轮应用发现命令制造噪音。
Use the current application directly first without running
app list
first if any of the following conditions are met:
  1. The user has explicitly provided
    --appcode
  2. The user has explicitly provided
    --app <name>
  3. There is a clear
    defaultApp
    in the current configuration
  4. The issue is clearly a continuation of operations in the "current project / current default application" context
In such cases, proceed directly to:
  1. dataset list --name ...
  2. dataset detail --code ...
  3. data filter/getOne/create/update/delete
Do not run an extra application discovery command to generate noise.

必须先获取应用信息的场景

Scenarios Where Application Information Must Be Fetched First

出现以下情况时,应先做应用决议,必要时跑
lovrabet app list
  1. 用户只给了业务需求,没有给 app 线索
    例如:“帮我查订单数据集”“看一下 CRM 里的客户表”
  2. 当前没有
    defaultApp
    ,也没有显式
    --appcode
  3. 当前配置中存在多个候选 app,且需求描述不足以直接锁定一个
  4. 用户明确说“先看看我有哪些应用”或“这个需求应该在哪个应用里”
Perform app resolution first, and run
lovrabet app list
if necessary, when:
  1. The user only provides business requirements without any app clues
    For example: "Help me query the order dataset" "Check the customer table in CRM"
  2. There is no
    defaultApp
    and no explicit
    --appcode
  3. There are multiple candidate apps in the current configuration, and the requirement description is not sufficient to directly lock one
  4. The user explicitly says "First see which applications I have" or "Which application should this requirement be in"

app list
的使用方式

Usage of
app list

  • 默认:
    lovrabet app list
    • 远端优先,必要时自动刷新 cache
  • 只想复用本地目录时:
    lovrabet app list --local
  • 明确要强制刷新时:
    lovrabet app list --no-cache
  • Default:
    lovrabet app list
    • Remote-first, automatically refreshes cache when necessary
  • Only want to reuse local cache:
    lovrabet app list --local
  • Clearly need to force a refresh:
    lovrabet app list --no-cache

如何根据需求判断使用哪个应用

How to Determine Which Application to Use Based on Requirements

优先级按下面做,不要随意跳步:
  1. 显式指定优先
    • 用户给了 app 名、appcode、当前项目语境,直接采用
  2. 本地默认优先
    • defaultApp
      且需求没有显示冲突,先用默认应用
  3. 需求关键词映射
    • 需求里出现业务域关键词时,用
      app list
      输出的
      name
      先做语义匹配
    • 例如:
      CRM
      订单
      电商
      证照
      需求管理
  4. 验证式收敛
    • 对候选应用执行
      dataset list --app <name> --name <关键词>
    • 哪个返回的数据集更匹配,就收敛到哪个 app
Follow the priority below, do not skip steps arbitrarily:
  1. Explicit specification first
    • Directly use the app name, appcode, or current project context provided by the user
  2. Local default first
    • Use the default application first if there is a
      defaultApp
      and the requirement does not show conflicts
  3. Requirement keyword mapping
    • When business domain keywords appear in the requirement, perform semantic matching first using the
      name
      from the
      app list
      output
    • Examples:
      CRM
      ,
      Order
      ,
      E-commerce
      ,
      License
      ,
      Requirements Management
  4. Verification-based convergence
    • Execute
      dataset list --app <name> --name <keyword>
      for candidate applications
    • Converge to the app whose returned datasets match better

推荐决策流程

Recommended Decision Flow

当用户说“帮我查某个业务数据”时,推荐流程是:
  1. 先判断当前是否已有明确 app 上下文
  2. 没有则
    lovrabet app list
  3. 按业务关键词挑 1-2 个候选 app
  4. 对候选 app 执行
    dataset list --app <name> --name <关键词>
  5. 命中后再继续
    dataset detail
    data filter
When the user says "Help me query some business data", the recommended flow is:
  1. First determine whether there is a clear app context currently
  2. If not, run
    lovrabet app list
  3. Select 1-2 candidate apps based on business keywords
  4. Execute
    dataset list --app <name> --name <keyword>
    for candidate apps
  5. Proceed with
    dataset detail
    or
    data filter
    after hitting a match

不要这样做

Do NOT Do the Following

  • 不要每次都先
    app list
  • 不要只看 app 名就武断决定,不做
    dataset list
    验证
  • 不要把平台应用目录再写回
    .lovrabet.json
  • 不要因为本地配置里没有某个 app 就判定它不存在,先看 cache/remote 目录
服务命令说明风险等级需 Cookie
auth
login
保存 accessKey
auth
init
清空当前作用域配置并重建认证write
auth
logout
清除本地 accessKey
app
init
创建
.lovrabet.json
配置
write
app
list
列出当前 AK 可见应用(远端优先,带缓存)read
app
pull
刷新本地 app cachewrite
app
use
切换默认应用write
app
import
从升级后的 .rabetbase.json 导入顶层配置write
config
list
查看完整配置read
config
get
读取配置项read
config
set
写入配置项write
config
delete
删除配置项write
skill
install
全局安装官方运行态 Skillwrite
dataset
list
列出数据集(含字段列表)read
dataset
detail
查看数据集结构read
data
filter
按条件查询数据记录read
data
getOne
按 ID 获取单条记录read
data
aggregate
聚合统计read
data
create
新建记录write
data
update
更新记录write
data
delete
删除记录(需
--yes
high-risk-write
sql
detail
查看 SQL 查询详情read
sql
exec
执行 SQL 查询read
bff
detail
查看 BFF 脚本详情read
bff
exec
执行 BFF 函数read
logs
show
查看命令执行历史read
logs
clear
清除命令历史read
  • Do not run
    app list
    every time
  • Do not make arbitrary decisions based only on app names without verifying via
    dataset list
  • Do not write the platform application directory back to
    .lovrabet.json
  • Do not judge that an app does not exist just because it is not in the local configuration; check the cache/remote directory first
ServiceCommandDescriptionRisk LevelRequires Cookie
auth
login
Save accessKey
auth
init
Clear current scope configuration and rebuild authenticationwrite
auth
logout
Clear local accessKey
app
init
Create
.lovrabet.json
configuration
write
app
list
List applications visible to the current AK (remote-first, with cache)read
app
pull
Refresh local app cachewrite
app
use
Switch default applicationwrite
app
import
Import top-level configuration from upgraded .rabetbase.jsonwrite
config
list
View complete configurationread
config
get
Read configuration itemread
config
set
Write configuration itemwrite
config
delete
Delete configuration itemwrite
skill
install
Globally install official runtime Skillwrite
dataset
list
List datasets (including field lists)readYes
dataset
detail
View dataset structurereadYes
data
filter
Query data records by conditionread
data
getOne
Get a single record by IDread
data
aggregate
Aggregation statisticsread
data
create
Create new recordwrite
data
update
Update recordwrite
data
delete
Delete record (requires
--yes
)
high-risk-write
sql
detail
View SQL query detailsreadYes
sql
exec
Execute SQL queryread
bff
detail
View BFF script detailsreadYes
bff
exec
Execute BFF functionread
logs
show
View command execution historyread
logs
clear
Clear command historyread

意图 → 命令索引

Intent → Command Index

初始化与配置

Initialization & Configuration

意图命令
安装 / 刷新 Skill
lovrabet skill install
初始化配置
lovrabet app init --appcode <code> [--env daily] [--global]
从升级后的 rb 配置导入
lovrabet app import --file /path/to/.rabetbase.json
登录
lovrabet auth login
重置并重建认证配置
lovrabet auth init --access-key ak_xxx [--env daily]
登出
lovrabet auth logout
查看配置
lovrabet config list
读取配置项
lovrabet config get <key>
设置配置项
lovrabet config set <key> <value> [--global]
删除配置项
lovrabet config delete <key> [--global]
查看应用列表
lovrabet app list
只看本地缓存的应用列表
lovrabet app list --local
强制刷新线上应用列表
lovrabet app list --no-cache
手动刷新应用缓存
lovrabet app pull
切换默认应用
lovrabet app use <name>
IntentCommand
Install / Refresh Skill
lovrabet skill install
Initialize configuration
lovrabet app init --appcode <code> [--env daily] [--global]
Import from upgraded rb configuration
lovrabet app import --file /path/to/.rabetbase.json
Login
lovrabet auth login
Reset and rebuild authentication configuration
lovrabet auth init --access-key ak_xxx [--env daily]
Logout
lovrabet auth logout
View configuration
lovrabet config list
Read configuration item
lovrabet config get <key>
Set configuration item
lovrabet config set <key> <value> [--global]
Delete configuration item
lovrabet config delete <key> [--global]
View application list
lovrabet app list
View only locally cached application list
lovrabet app list --local
Force refresh online application list
lovrabet app list --no-cache
Manually refresh app cache
lovrabet app pull
Switch default application
lovrabet app use <name>

数据集与数据操作

Dataset & Data Operations

意图命令
找数据集
lovrabet dataset list [--name 关键词] [--code 精确码]
看数据集字段
lovrabet dataset detail --code <code> [--verbose]
查询数据
lovrabet data filter --code <code> --params '{"where":{"status":{"$eq":"active"}},"currentPage":1,"pageSize":20}'
获取单条
lovrabet data getOne --code <code> --params '{"id":123}'
新建记录
lovrabet data create --code <code> --params '{"name":"test","amount":100}'
更新记录
lovrabet data update --code <code> --params '{"id":123,"status":"done"}'
删除记录
lovrabet data delete --code <code> --params '{"id":123}' --yes
聚合统计
lovrabet data aggregate --code <code> --params '{"aggregate":[{"field":"amount","type":"SUM","alias":"total"}],"groupBy":["status"]}'
IntentCommand
Find dataset
lovrabet dataset list [--name keyword] [--code exact-code]
View dataset fields
lovrabet dataset detail --code <code> [--verbose]
Query data
lovrabet data filter --code <code> --params '{"where":{"status":{"$eq":"active"}},"currentPage":1,"pageSize":20}'
Get single record
lovrabet data getOne --code <code> --params '{"id":123}'
Create new record
lovrabet data create --code <code> --params '{"name":"test","amount":100}'
Update record
lovrabet data update --code <code> --params '{"id":123,"status":"done"}'
Delete record
lovrabet data delete --code <code> --params '{"id":123}' --yes
Aggregation statistics
lovrabet data aggregate --code <code> --params '{"aggregate":[{"field":"amount","type":"SUM","alias":"total"}],"groupBy":["status"]}'

SQL 与 BFF

SQL & BFF

意图命令
查看 SQL
lovrabet sql detail --sqlcode <code>
执行 SQL
lovrabet sql exec --sqlcode <code> --params '{"key":"value"}'
查看 BFF
lovrabet bff detail --id <id>
执行 BFF
lovrabet bff exec --name <functionName> --params '{"key":"value"}'
IntentCommand
View SQL
lovrabet sql detail --sqlcode <code>
Execute SQL
lovrabet sql exec --sqlcode <code> --params '{"key":"value"}'
View BFF
lovrabet bff detail --id <id>
Execute BFF
lovrabet bff exec --name <functionName> --params '{"key":"value"}'

日志

Logs

意图命令
查看日志
lovrabet logs
清除日志
lovrabet logs clear
IntentCommand
View logs
lovrabet logs
Clear logs
lovrabet logs clear

统一的 --params 设计

Unified --params Design

data
sql exec
bff exec
均通过
--params
传入 JSON 请求体,直接透传给运行态 API:
bash
lovrabet <service> <command> --code <code> --params '<json>'
data
,
sql exec
, and
bff exec
all pass JSON request bodies via
--params
, which are directly forwarded to the runtime API:
bash
lovrabet <service> <command> --code <code> --params '<json>'

数据 CRUD 工作流

Data CRUD Workflow

bash
undefined
bash
undefined

1. 找到目标数据集

1. Locate the target dataset

lovrabet dataset list --name "订单"
lovrabet dataset list --name "Order"

2. 查看字段结构(确认数据集 code + 字段名)

2. View field structure (confirm dataset code + field names)

lovrabet dataset detail --code <datasetCode>
lovrabet dataset detail --code <datasetCode>

3. 查询数据

3. Query data

lovrabet data filter --code <datasetCode> --params '{"where":{"status":{"$eq":"active"}},"currentPage":1,"pageSize":20}'
lovrabet data filter --code <datasetCode> --params '{"where":{"status":{"$eq":"active"}},"currentPage":1,"pageSize":20}'

翻到第 2 页

Go to page 2

lovrabet data filter --code <datasetCode> --params '{"where":{"status":{"$eq":"active"}},"currentPage":2,"pageSize":20}'
lovrabet data filter --code <datasetCode> --params '{"where":{"status":{"$eq":"active"}},"currentPage":2,"pageSize":20}'

4. 获取单条

4. Get single record

lovrabet data getOne --code <datasetDataset> --params '{"id":123}'
lovrabet data getOne --code <datasetDataset> --params '{"id":123}'

5. 创建记录(先 dry-run 预览)

5. Create record (preview with dry-run first)

lovrabet data create --code <datasetCode> --params '{"name":"test","amount":100}' --dry-run lovrabet data create --code <datasetCode> --params '{"name":"test","amount":100}'
lovrabet data create --code <datasetCode> --params '{"name":"test","amount":100}' --dry-run lovrabet data create --code <datasetCode> --params '{"name":"test","amount":100}'

6. 更新记录

6. Update record

lovrabet data update --code <datasetCode> --params '{"id":123,"status":"completed"}'
lovrabet data update --code <datasetCode> --params '{"id":123,"status":"completed"}'

7. 删除记录(高风险,需确认)

7. Delete record (high risk, requires confirmation)

lovrabet data delete --code <datasetCode> --params '{"id":123}' --dry-run lovrabet data delete --code <datasetCode> --params '{"id":123}' --yes
undefined
lovrabet data delete --code <datasetCode> --params '{"id":123}' --dry-run lovrabet data delete --code <datasetCode> --params '{"id":123}' --yes
undefined

filter 的 --params 结构

--params Structure for filter

--params
JSON 直接作为
filter
请求体透传:
json
{
  "where": { "status": { "$eq": "active" } },
  "select": ["id", "name", "status"],
  "orderBy": [{ "id": "desc" }],
  "currentPage": 1,
  "pageSize": 20
}
The
--params
JSON is directly forwarded as the
filter
request body:
json
{
  "where": { "status": { "$eq": "active" } },
  "select": ["id", "name", "status"],
  "orderBy": [{ "id": "desc" }],
  "currentPage": 1,
  "pageSize": 20
}

where 查询语法

where Query Syntax

操作符含义示例
$eq
等于
{"status":{"$eq":"active"}}
$ne
不等于
{"status":{"$ne":"deleted"}}
$gte/$gteq/$lte/$lteq
比较
{"amount":{"$gte":100}}
$contain
包含匹配
{"name":{"$contain":"test"}}
$startWith
前缀匹配
{"name":{"$startWith":"pre"}}
$endWith
后缀匹配
{"name":{"$endWith":"suf"}}
$notNull
非空判断
{"app_code":{"$notNull":true}}
$in
包含
{"status":{"$in":["active","pending"]}}
$and/$or
组合条件
{"$and":[...]}
OperatorMeaningExample
$eq
Equal to
{"status":{"$eq":"active"}}
$ne
Not equal to
{"status":{"$ne":"deleted"}}
$gte/$gteq/$lte/$lteq
Comparison
{"amount":{"$gte":100}}
$contain
Contains match
{"name":{"$contain":"test"}}
$startWith
Prefix match
{"name":{"$startWith":"pre"}}
$endWith
Suffix match
{"name":{"$endWith":"suf"}}
$notNull
Non-null check
{"app_code":{"$notNull":true}}
$in
In
{"status":{"$in":["active","pending"]}}
$and/$or
Combined conditions
{"$and":[...]}

aggregate 的 --params 结构

--params Structure for aggregate

--params
JSON 直接作为
aggregate
请求体透传,字段与 SDK
AggregateParams
对齐:
json
{
  "select": ["category_id"],
  "aggregate": [
    { "type": "SUM", "field": "amount", "alias": "total_amount", "round": true, "precision": 2 }
  ],
  "where": { "status": { "$eq": "active" } },
  "groupBy": ["category_id"],
  "having": [
    { "columnName": "total_amount", "condition": { "$gte": 1000 } }
  ],
  "join": [
    { "type": "LEFT", "table": "users", "condition": { "user_id": "id" } }
  ],
  "orderBy": [{ "total_amount": "desc" }],
  "currentPage": 1,
  "pageSize": 20
}
The
--params
JSON is directly forwarded as the
aggregate
request body, with fields aligned with the SDK
AggregateParams
:
json
{
  "select": ["category_id"],
  "aggregate": [
    { "type": "SUM", "field": "amount", "alias": "total_amount", "round": true, "precision": 2 }
  ],
  "where": { "status": { "$eq": "active" } },
  "groupBy": ["category_id"],
  "having": [
    { "columnName": "total_amount", "condition": { "$gte": 1000 } }
  ],
  "join": [
    { "type": "LEFT", "table": "users", "condition": { "user_id": "id" } }
  ],
  "orderBy": [{ "total_amount": "desc" }],
  "currentPage": 1,
  "pageSize": 20
}

全局选项

Global Options

选项说明
--appcode <code>
覆盖 appcode
--env <env>
环境: production / development / daily
--format <fmt>
输出: json / pretty / compress(默认偏好见配置与
--help
--jq '<expr>'
json / compress 最终打印的 JSON 做 jq 过滤;与
rabetbase
行为一致,详见 lovrabet-output-format-jq.md
--app <name>
多应用模式下指定应用
--dry-run
预览不执行(write 命令)
--yes
跳过确认(high-risk-write)
--non-interactive
非交互模式(CI)
OptionDescription
--appcode <code>
Override appcode
--env <env>
Environment: production / development / daily
--format <fmt>
Output: json / pretty / compress (default preference see configuration &
--help
)
--jq '<expr>'
Perform jq filtering on the final printed JSON for json / compress; behavior is consistent with
rabetbase
, see lovrabet-output-format-jq.md for details
--app <name>
Specify application in multi-app mode
--dry-run
Preview without execution (write commands)
--yes
Skip confirmation (high-risk-write)
--non-interactive
Non-interactive mode (CI)

配置文件

Configuration File

项目根目录
.lovrabet.json
(完整字段、优先级、环境变量见 配置参考):
json
{
  "appcode": "app-xxxxxxxx",
  "env": "daily",
  "accessKey": "ak_xxx"
}
配置文件只保存用户意图配置,不保存平台应用目录。远端应用列表缓存位于:
text
~/.lovrabet/cache/<env>/<ak-fingerprint>/my-apps.json
多应用意图配置示例:
json
{
  "accessKey": "ak_xxx",
  "env": "daily",
  "defaultApp": "crm"
}
.lovrabet.json
in the project root directory (see Configuration Reference for complete fields, priority, and environment variables):
json
{
  "appcode": "app-xxxxxxxx",
  "env": "daily",
  "accessKey": "ak_xxx"
}
The configuration file only saves user intent configurations, not the platform application directory. The remote application list cache is located at:
text
~/.lovrabet/cache/<env>/<ak-fingerprint>/my-apps.json
Example of multi-app intent configuration:
json
{
  "accessKey": "ak_xxx",
  "env": "daily",
  "defaultApp": "crm"
}

风险控制

Risk Control

等级命令保护
readdataset list/detail, data filter/getOne/aggregate, sql detail/exec, bff detail/exec, app list, config list/get, logs
writedata create, data update, app use, config set/delete, app importdry-run 预览
high-risk-writedata delete
--yes
或交互确认
LevelCommandProtection
readdataset list/detail, data filter/getOne/aggregate, sql detail/exec, bff detail/exec, app list, config list/get, logsNone
writedata create, data update, app use, config set/delete, app importdry-run preview
high-risk-writedata deleteRequires
--yes
or interactive confirmation

详细参考

Detailed References

主题文件
输出格式与
--jq
lovrabet-output-format-jq.md
认证lovrabet-auth.md
初始化lovrabet-init.md
应用管理lovrabet-app.md
配置管理lovrabet-config-commands.md
配置文件参考lovrabet-config.md
数据集发现dataset-discovery-workflow.md
数据 CRUDdata-crud-workflow.md
SQL 工作流lovrabet-sql-workflow.md
BFF 工作流lovrabet-bff-workflow.md
日志lovrabet-logs.md
TopicFile
Output Format &
--jq
lovrabet-output-format-jq.md
Authenticationlovrabet-auth.md
Initializationlovrabet-init.md
Application Managementlovrabet-app.md
Configuration Managementlovrabet-config-commands.md
Configuration File Referencelovrabet-config.md
Dataset Discoverydataset-discovery-workflow.md
Data CRUDdata-crud-workflow.md
SQL Workflowlovrabet-sql-workflow.md
BFF Workflowlovrabet-bff-workflow.md
Logslovrabet-logs.md