xmind-cloud
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseXmind Cloud CLI
Xmind Cloud CLI
Setup
设置
bash
which xmind || npm install -g @xmindltd/xmind-clibash
which xmind || npm install -g @xmindltd/xmind-cliAuth
身份验证
bash
xmind cloud auth statusIf :
{"authenticated":false}bash
xmind cloud auth loginbash
xmind cloud auth status如果返回:
{"authenticated":false}bash
xmind cloud auth login→ Opens browser automatically, waits for authorization
→ 自动打开浏览器,等待授权
→ {"authenticated":true,"source":"config"}
→ {"authenticated":true,"source":"config"}
Alternative (if you already have a token):
```bash
xmind cloud auth token <value>
替代方式(若已有令牌):
```bash
xmind cloud auth token <value>Session Rules
会话规则
- Reuse sessions: before opening, check . If the document already has an active session, reuse it.
xmind cloud sessions - Don't close after every edit: sessions persist and auto-close after 30 minutes of inactivity. Only close when the user is done or explicitly asks.
- Daemon persists across sessions: closing a session doesn't kill the daemon. Next is faster.
open
- 复用会话:打开前先执行检查。如果文档已有活跃会话,直接复用。
xmind cloud sessions - 编辑后不立即关闭:会话会保持,闲置30分钟后自动关闭。仅在用户完成操作或明确要求时关闭会话。
- 守护进程跨会话持久化:关闭会话不会终止守护进程,下次执行会更快。
open
Create
创建
Step 1: Discover
步骤1:发现可用技能
bash
xmind skill listReview all available recipes, layout features, and editing helpers.
bash
xmind skill list查看所有可用的模板、布局功能和编辑辅助工具。
Step 2: Load Skills + Execute
步骤2:加载技能并执行
Load a recipe and a feature strategy in one call:
bash
xmind skill show recipes/<name> features features/strategy/<name>Then follow the loaded instructions:
-
Phase 1 — Content: Follow recipe rules to plan content.
-
Phase 2 — Render: Follow features + strategy rules to produce markdown, select skeleton and color. Substitute the execute command with cloud upload:bash
cat <<'MD' | xmind cloud create --stdin --skeleton <name> --color <name> # Central Topic ## Branch ### Sub-branch MDReturns.{"success":true,"fileId":"...","url":"https://app.xmind.com/<id>"}
If a subtree needs a different strategy during Phase 2:
bash
xmind skill show features/strategy/<other>一次性加载模板和功能策略:
bash
xmind skill show recipes/<name> features features/strategy/<name>然后按照加载的说明操作:
-
阶段1 — 内容规划:遵循模板规则规划内容。
-
阶段2 — 渲染上传:遵循功能+策略规则生成Markdown,选择框架和配色。将执行命令替换为云端上传:bash
cat <<'MD' | xmind cloud create --stdin --skeleton <name> --color <name> # 中心主题 ## 分支 ### 子分支 MD返回结果示例:。{"success":true,"fileId":"...","url":"https://app.xmind.com/<id>"}
如果在阶段2中某子树需要不同策略:
bash
xmind skill show features/strategy/<other>Edit
编辑
Connect (only if no active session)
连接会话(仅当无活跃会话时)
bash
xmind cloud sessionsbash
xmind cloud sessionsIf empty or no session for this document:
如果会话为空或当前文档无对应会话:
xmind cloud open <link-or-fileId>
xmind cloud open <link-or-fileId>
→ {"session":"abc","fileId":"...","root":"..."}
→ {"session":"abc","fileId":"...","root":"..."}
undefinedundefinedQuick Edit
快速编辑
bash
xmind cloud read --session <id>
xmind cloud add --session <id> --parent <title> --topic <text>
xmind cloud update --session <id> --topic <old-title> --title <new-title>
xmind cloud delete --session <id> --topic <title>
cat <<'BATCH_EOF' | xmind cloud batch --session <id>
[{"op": "...", ...}]
BATCH_EOFbash
xmind cloud read --session <id>
xmind cloud add --session <id> --parent <title> --topic <text>
xmind cloud update --session <id> --topic <old-title> --title <new-title>
xmind cloud delete --session <id> --topic <title>
cat <<'BATCH_EOF' | xmind cloud batch --session <id>
[{"op": "...", ...}]
BATCH_EOFGuided Edit
引导式编辑
For complex edits (optimize, review, restructure, restyle), load the edit guide:
bash
xmind skill show editing/guideFollow the guide's analysis template, then apply changes via .
xmind cloud batch --session <id>针对复杂编辑操作(优化、审阅、重构、重新设置样式),加载编辑指南:
bash
xmind skill show editing/guide遵循指南的分析模板,然后通过应用更改。
xmind cloud batch --session <id>Upload Existing File
上传现有文件
bash
xmind cloud upload output.xmindbash
xmind cloud upload output.xmindError Handling
错误处理
- → Token expired. Re-authenticate with
{"error":"token_expired"}.xmind cloud auth login - → Re-open:
{"error":"Session not found"}.xmind cloud open <link> - → Token invalid.
{"error":"Authentication failed"} - → Cloud storage full.
{"error":"exceed_files_limit"}
- → 令牌过期。执行
{"error":"token_expired"}重新验证身份。xmind cloud auth login - → 重新打开会话:
{"error":"Session not found"}。xmind cloud open <link> - → 令牌无效。
{"error":"Authentication failed"} - → 云端存储空间已满。
{"error":"exceed_files_limit"}