Communitygithub.com

cli-anything-mubu

幕布实时桥梁的标准命令行入口,用于查询、检查和修改幕布文档。

cli-anything-mubu 是什么?

这是一个封装好的CLI工具,作为幕布(Mubu)实时桥梁的标准入口点。它通过本地RxDB存储和备份文件,为AI Agent提供了访问和管理幕布文档的完整能力。工具支持发现(Discover)文档和文件夹、检查(Inspect)文档节点和链接、执行变异(Mutate)操作(如创建子节点、删除节点和更新文本),以及管理会话(Session)状态。默认情况下,所有变异操作都是空运行(dry-run),只有在显式添加 `--execute` 参数后才会实际执行,从而确保了操作的安全性。该工具适用于需要以编程方式或通过AI Agent操作幕布文档的高级用户和开发者。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-mubu

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

cli-anything-mubu 是做什么的?

幕布实时桥梁的标准打包入口点。

安装

此CLI从规范的 agent-harness 源代码树打包而来:

pip install -e .

先决条件:

  • Python 3.10+
  • 此机器上正在运行的幕布桌面会话
  • CLI可访问的本地幕布配置文件数据
  • 如需使用无参数每日辅助功能,请设置 MUBU_DAILY_FOLDER

入口点

cli-anything-mubu
python -m cli_anything.mubu

当不带子命令调用时,CLI会进入一个交互式REPL会话。

命令组

发现 (Discover)

用于发现文件夹、文档、最近记录以及每日文档解析的命令。

命令描述

| docs | 从本地备份中列出最新的已知文档快照。 |

| folders | 从本地RxDB存储中列出文件夹元数据。 |

| folder-docs | 列出一个文件夹内的文档元数据。 |

| path-docs | 根据文件夹路径或文件夹ID列出文档。 |

| recent | 使用备份、元数据和同步日志列出最近活动的文档。 |

| daily | 查找每日格式的文件夹并列出其中的文档。 |

| daily-current | 从一个每日格式的文件夹中解析出当前的每日文档。 |

检查 (Inspect)

用于树形视图、搜索、链接、同步事件和实时节点定位的检查命令。

命令描述

| show | 显示一个文档的最新备份树。 |

| search | 在最新备份中搜索匹配的节点文本或笔记内容。 |

| changes | 从本地日志中解析最近的客户端同步变更事件。 |

| links | 从一个文档备份中提取出站的幕布文档链接。 |

| open-path | 通过完整路径、后缀路径、标题或文档ID打开一个文档。 |

| doc-nodes | 列出具有节点ID和更新目标路径的实时文档节点。 |

| daily-nodes | 一步列出当前每日文档中的实时节点。 |

变异 (Mutate)

针对幕布API进行原子级实时编辑的变异命令(默认空运行)。

命令描述

| create-child | 针对实时幕布API构建或执行一次子节点创建操作。 |

| delete-node | 针对实时幕布API构建或执行一次节点删除操作。 |

| update-text | 针对实时幕布API构建或执行一次文本更新操作。 |

会话 (Session)

用于当前文档/节点上下文和本地命令历史的会话与状态命令。

命令描述

| status | 显示当前会话状态。 |

| state-path | 显示会话状态文件的路径。 |

| use-doc | 持久化当前文档引用。 |

| use-node | 持久化当前节点引用。 |

| use-daily | 解析并持久化当前每日文档引用。 |

| clear-doc | 清除当前文档引用。 |

| clear-node | 清除当前节点引用。 |

| history | 显示会话状态中存储的最近命令历史。 |

推荐的Agent工作流程

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 仅在检查负载之后

安全规则

  1. 建议Agent优先使用分组命令;旧的扁平命令保留用于兼容。
  2. 当Agent需要解析输出时,请使用 --json。
  3. 在任何 mutate 命令之前,优先使用 discover 或 inspect 命令。
  4. 实时变异默认为空运行,仅当指定 --execute 时才执行。
  5. 优先使用 --node-id 和 --parent-node-id 而非文本匹配。
  6. delete-node 会移除整个目标子树。
  7. 即使是相同文本的更新,也可能推进文档版本历史。
  8. 在使用无参数的每日辅助功能之前,请显式传递每日文件夹引用或设置 MUBU_DAILY_FOLDER。

示例

交互式REPL会话

启动一个具有持久文档和节点上下文的交互式会话。

cli-anything-mubu
# 交互式输入命令
# 输入 'help' 查看内置命令
# 使用会话命令持久化 current-doc/current-node

发现当前每日笔记

从显式的文件夹引用中解析当前每日笔记。

cli-anything-mubu --json discover daily-current '<daily-folder-ref>'

空运行原子更新

在执行实时变异之前检查确切的传出负载。

cli-anything-mubu mutate update-text '<doc-ref>' --node-id <node-id> --text 'new text' --json

会话状态

CLI以JSON格式维护轻量级的会话状态:

  • current_doc
  • current_node
  • 本地命令历史

使用 session 命令组来检查或更新此状态。

给AI Agent的建议

  1. 从 discover 或 inspect 开始,而不是 mutate。
  2. 使用 session status --json 来恢复持久化的上下文。
  3. 在生成的提示和自动化脚本中使用分组命令。
  4. 在任何实时变异之后验证后置条件。
  5. 当需要更严格的操作细节时,请阅读包的 TEST.md 和 README.md。

版本

0.1.1

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

相关技能