cli-anything-mubu
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecli-anything-mubu
cli-anything-mubu
Canonical packaged entrypoint for the Mubu live bridge.
Mubu实时桥接的标准打包入口点。
Installation
安装
This CLI is packaged from the canonical source tree:
agent-harnessbash
pip install -e .Prerequisites:
- Python 3.10+
- An active Mubu desktop session on this machine
- Local Mubu profile data available to the CLI
- Set if you want no-argument daily helpers
MUBU_DAILY_FOLDER
此CLI由标准的源码树打包而来:
agent-harnessbash
pip install -e .前置要求:
- Python 3.10+
- 本机上有活跃的Mubu桌面会话
- CLI可访问本地Mubu配置文件数据
- 若要使用无参数日常助手,请设置环境变量
MUBU_DAILY_FOLDER
Entry Points
入口点
bash
cli-anything-mubu
python -m cli_anything.mubuWhen invoked without a subcommand, the CLI enters an interactive REPL session.
bash
cli-anything-mubu
python -m cli_anything.mubu当不带子命令调用时,CLI会进入交互式REPL会话。
Command Groups
命令组
Discover
发现
Discovery commands for folders, documents, recency, and daily-document resolution.
| Command | Description |
|---|
| | List latest known document snapshots from local backups. |
docs| | List folder metadata from local RxDB storage. |
folders| | List document metadata for one folder. |
folder-docs| | List documents for one folder path or folder id. |
path-docs| | List recently active documents using backups, metadata, and sync logs. |
recent| | Find Daily-style folders and list the documents inside them. |
daily| | Resolve the current daily document from one Daily-style folder. |
daily-current用于文件夹、文档、最近记录及日常文档解析的发现类命令。
| 命令 | 描述 |
|---|
| | 列出本地备份中最新的已知文档快照。 |
docs| | 列出本地RxDB存储中的文件夹元数据。 |
folders| | 列出单个文件夹下的文档元数据。 |
folder-docs| | 根据文件夹路径或文件夹ID列出文档。 |
path-docs| | 通过备份、元数据和同步日志列出最近活跃的文档。 |
recent| | 查找日常风格文件夹并列出其中的文档。 |
daily| | 从某个日常风格文件夹中解析当前的日常文档。 |
daily-currentInspect
查看
Inspection commands for tree views, search, links, sync events, and live node targeting.
| Command | Description |
|---|
| | Show the latest backup tree for one document. |
show| | Search latest backups for matching node text or note content. |
search| | Parse recent client-sync change events from local logs. |
changes| | Extract outbound Mubu document links from one document backup. |
links| | Open one document by full path, suffix path, title, or doc id. |
open-path| | List live document nodes with node ids and update-target paths. |
doc-nodes| | List live nodes from the current daily document in one step. |
daily-nodes用于树形视图、搜索、链接、同步事件及实时节点定位的查看类命令。
| 命令 | 描述 |
|---|
| | 显示单个文档的最新备份树形结构。 |
show| | 在最新备份中搜索匹配的节点文本或笔记内容。 |
search| | 从本地日志中解析最近的客户端同步变更事件。 |
changes| | 从单个文档备份中提取外部Mubu文档链接。 |
links| | 通过完整路径、后缀路径、标题或文档ID打开单个文档。 |
open-path| | 列出带节点ID和更新目标路径的实时文档节点。 |
doc-nodes| | 一步列出当前日常文档中的实时节点。 |
daily-nodesMutate
修改
Mutation commands for dry-run-first atomic live edits against the Mubu API.
| Command | Description |
|---|
| | Build or execute one child-node creation against the live Mubu API. |
create-child| | Build or execute one node deletion against the live Mubu API. |
delete-node| | Build or execute one text update against the live Mubu API. |
update-text针对Mubu API执行预演优先的原子实时编辑的修改类命令。
| 命令 | 描述 |
|---|
| | 构建或执行针对实时Mubu API的子节点创建操作。 |
create-child| | 构建或执行针对实时Mubu API的节点删除操作。 |
delete-node| | 构建或执行针对实时Mubu API的文本更新操作。 |
update-textSession
会话
Session and state commands for current document/node context and local command history.
| Command | Description |
|---|
| | Show the current session state. |
status| | Show the session state file path. |
state-path| | Persist the current document reference. |
use-doc| | Persist the current node reference. |
use-node| | Resolve and persist the current daily document reference. |
use-daily| | Clear the current document reference. |
clear-doc| | Clear the current node reference. |
clear-node| | Show recent command history stored in session state. |
history用于当前文档/节点上下文及本地命令历史的会话与状态类命令。
| 命令 | 描述 |
|---|
| | 显示当前会话状态。 |
status| | 显示会话状态文件路径。 |
state-path| | 持久化当前文档引用。 |
use-doc| | 持久化当前节点引用。 |
use-node| | 解析并持久化当前日常文档引用。 |
use-daily| | 清除当前文档引用。 |
clear-doc| | 清除当前节点引用。 |
clear-node| | 显示会话状态中存储的最近命令历史。 |
historyRecommended Agent Workflow
推荐的Agent工作流
text
discover daily-current '<daily-folder-ref>' --json
->
inspect daily-nodes '<daily-folder-ref>' --query '<anchor>' --json
->
session use-doc '<doc_path>'
->
mutate update-text / create-child / delete-node --json
->
--execute only after payload inspectiontext
discover daily-current '<daily-folder-ref>' --json
->
inspect daily-nodes '<daily-folder-ref>' --query '<anchor>' --json
->
session use-doc '<doc_path>'
->
mutate update-text / create-child / delete-node --json
->
--execute only after payload inspectionSafety Rules
安全规则
- Prefer grouped commands for agent use; flat legacy commands remain for compatibility.
- Use whenever an agent will parse the output.
--json - Prefer or
discovercommands before anyinspectcommand.mutate - Live mutations are dry-run by default and only execute with .
--execute - Prefer and
--node-idover text matching.--parent-node-id - removes the full targeted subtree.
delete-node - Even same-text updates can still advance document version history.
- Pass a daily-folder reference explicitly or set before using no-arg daily helpers.
MUBU_DAILY_FOLDER
- Agent使用时优先选择分组命令;为兼容保留扁平化旧命令。
- 当Agent需要解析输出时,请使用参数。
--json - 在执行任何命令前,优先使用
mutate或discover命令。inspect - 实时修改默认仅预演,需添加参数才会执行。
--execute - 优先使用和
--node-id而非文本匹配。--parent-node-id - 会删除目标节点的完整子树。
delete-node - 即使是相同文本的更新仍会推进文档版本历史。
- 使用无参数日常助手前,请显式传入日常文件夹引用或设置环境变量。
MUBU_DAILY_FOLDER
Examples
示例
Interactive REPL Session
交互式REPL会话
Start an interactive session with persistent document and node context.
bash
cli-anything-mubu启动带有持久化文档和节点上下文的交互式会话。
bash
cli-anything-mubuEnter commands interactively
交互式输入命令
Use 'help' to see builtins
使用'help'查看内置命令
Use session commands to persist current-doc/current-node
使用会话类命令持久化当前文档/当前节点
undefinedundefinedDiscover Current Daily Note
发现当前日常笔记
Resolve the current daily note from an explicit folder reference.
bash
cli-anything-mubu --json discover daily-current '<daily-folder-ref>'通过显式文件夹引用解析当前日常笔记。
bash
cli-anything-mubu --json discover daily-current '<daily-folder-ref>'Dry-Run Atomic Update
预演原子更新
Inspect the exact outgoing payload before a live mutation.
bash
cli-anything-mubu mutate update-text '<doc-ref>' --node-id <node-id> --text 'new text' --json在执行实时修改前检查确切的输出负载。
bash
cli-anything-mubu mutate update-text '<doc-ref>' --node-id <node-id> --text 'new text' --jsonSession State
会话状态
The CLI maintains lightweight session state in JSON:
current_doccurrent_node- local command history
Use the command group to inspect or update this state.
sessionCLI通过JSON维护轻量级会话状态:
current_doccurrent_node- 本地命令历史
使用命令组查看或更新此状态。
sessionFor AI Agents
面向AI Agent的说明
- Start with or
discover, notinspect.mutate - Use to recover persisted context.
session status --json - Use grouped commands in generated prompts and automation.
- Verify postconditions after any live mutation.
- Read the package and
TEST.mdwhen stricter operational detail is needed.README.md
- 从或
discover命令开始,而非inspect。mutate - 使用恢复持久化上下文。
session status --json - 在生成提示和自动化流程中使用分组命令。
- 执行任何实时修改后验证后置条件。
- 如需更严格的操作细节,请阅读包中的和
TEST.md。README.md
Version
版本
0.1.1
0.1.1