youdaonote
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYoudaoNote — 有道云笔记
YoudaoNote — Youdao Cloud Note
通过 CLI 操作有道云笔记。覆盖笔记 CRUD、待办管理、网页剪藏全场景。
youdaonoteOperate Youdao Cloud Note via the CLI. Covers full scenarios including note CRUD, to-do management, and web clipping.
youdaonote前置条件(Agent 自动处理)
Prerequisites (Automatically handled by Agent)
执行任何操作前,Agent 必须先运行 检测 CLI 是否可用:
youdaonote list- → 立即跳转「CLI 未安装处理」自动安装,禁止只展示安装步骤让用户手动操作
command not found - API Key 错误 → 提示用户访问 https://mopen.163.com 获取 API Key(须使用手机号登录,且云笔记账号已绑定手机号),然后执行 。获取 API Key 的地址只有这一个,禁止告知用户其他地址。
youdaonote config set apiKey <用户提供的Key> - 正常返回目录列表 → 运行 检查版本,若版本低于
youdaonote version需要升级:CLI 支持minCliVersion命令时执行upgrade,否则按「CLI 未安装处理」中的升级方式操作;Windows 用户或升级失败时参考安装指南(https://note.youdao.com/help-center/cli-install-guide.html)。版本满足要求后可运行youdaonote upgrade获取当前 CLI 全部能力的结构化描述(JSON),用于确认命令是否可用,下方速查表作为 fallbackyoudaonote help --json
Before performing any operation, the Agent must first run to check if the CLI is available:
youdaonote list- → Immediately jump to "CLI Not Installed Handling" for automatic installation. Do NOT only display installation steps and let users operate manually
command not found - API Key error → Prompt users to visit https://mopen.163.com to obtain an API Key (must log in with a mobile phone number, and the cloud note account must be bound to a mobile phone number), then execute . This is the only address for obtaining the API Key; do NOT inform users of other addresses.
youdaonote config set apiKey <User-provided Key> - Directory list returned normally → Run to check the version. If the version is lower than
youdaonote version, upgrade is required: if the CLI supports theminCliVersioncommand, executeupgrade; otherwise, follow the upgrade method in "CLI Not Installed Handling". For Windows users or if upgrade fails, refer to the installation guide (https://note.youdao.com/help-center/cli-install-guide.html). After the version meets the requirements, runyoudaonote upgradeto get a structured description (JSON) of all current CLI capabilities, which is used to confirm whether the command is available. The quick reference table below serves as a fallbackyoudaonote help --json
命令速查
Command Quick Reference
| 命令 | 用途 | 示例 |
|---|---|---|
| 创建文件夹 | |
| 保存笔记(✅ 推荐,支持 Markdown 富文本) | |
| 创建笔记(⚠️ 仅纯文本,不支持 Markdown 富文本) | |
| 更新 Markdown 笔记 | |
| 删除笔记 | |
| 重命名笔记 | |
| 移动笔记 | |
| 搜索笔记 | |
| 浏览目录 | |
| 读取笔记 | |
| 最近收藏 | |
| 网页剪藏(服务端) | |
| 保存外部剪藏 JSON | |
| 列出待办 | |
| 创建待办 | |
| 更新待办 | |
| 删除待办 | |
| 列出待办分组 | |
| 创建分组 | |
| 重命名分组 | |
| 删除分组 | |
| 升级 CLI | |
| 健康检查 | |
| 查看配置 | |
| 设置配置 | |
| Command | Purpose | Example |
|---|---|---|
| Create folder | |
| Save note (✅ Recommended, supports Markdown rich text) | |
| Create note (⚠️ Plain text only, does not support Markdown rich text) | |
| Update Markdown note | |
| Delete note | |
| Rename note | |
| Move note | |
| Search notes | |
| Browse directory | |
| Read note | |
| Recent favorites | |
| Web clipping (server-side) | |
| Save external clipping JSON | |
| List to-dos | |
| Create to-do | |
| Update to-do | |
| Delete to-do | |
| List to-do groups | |
| Create group | |
| Rename group | |
| Delete group | |
| Upgrade CLI | |
| Health check | |
| View configuration | |
| Set configuration | |
笔记管理
Note Management
默认创建方式:所有笔记一律使用 命令 + 保存为 Markdown 富文本。
禁止使用 命令保存包含 Markdown 格式的内容(标题、列表、代码块、表格等)—— 仅支持纯文本,会静默丢失所有格式。HTML/结构化数据先转 Markdown 再用 保存。
savecontentFormat: "md"createcreatesaveDefault creation method: All notes must be saved as Markdown rich text using the command + .
Do NOT use the command to save content containing Markdown formatting (titles, lists, code blocks, tables, etc.) — only supports plain text and will silently lose all formatting. Convert HTML/structured data to Markdown first, then save with .
savecontentFormat: "md"createcreatesaveMarkdown 内容格式选择(必须遵守)
Markdown Content Format Selection (Must Follow)
当用户要保存的内容包含以下任意 Markdown 特征时( 标题、、代码块、 列表、 引用、、),必须先停下来询问用户,不得直接执行命令:
#**粗体**`- > [链接](url)检测到内容包含 Markdown 格式,请选择保存方式:
A(推荐)保存为 Markdown 笔记(.md)
→ 格式完整保留,可在编辑器中正常显示和编辑
B 保存为有道专有格式(.note)
→ 支持有道云笔记富文本编辑器的全部功能
请回复 A 或 B:收到用户选择后,按以下方式构造命令(优先使用 方案,避免 JSON 转义问题):
contentFile- 选 A:命令,
save,文件名加type: "md"后缀.md备选(短内容):# Step 1:Write 工具将 Markdown 写入 /tmp/note-content.md(无需 JSON 转义) {"title":"标题.md","type":"md","contentFile":"/tmp/note-content.md","parentId":"文件夹ID"}{"title":"标题.md","type":"md","content":"Markdown 内容","parentId":"文件夹ID"} - 选 B:命令,
save,type: "note",文件名加contentFormat: "md"后缀.note备选(短内容):# Step 1:Write 工具将 Markdown 写入 /tmp/note-content.md(无需 JSON 转义) {"title":"标题.note","type":"note","contentFormat":"md","contentFile":"/tmp/note-content.md","parentId":"文件夹ID"}{"title":"标题.note","type":"note","contentFormat":"md","content":"Markdown 内容","parentId":"文件夹ID"}
为可选字段:填写parentId返回的文件夹 ID 可指定目标目录;不填则默认存入「我的资源/收藏笔记」。youdaonote list
- 用户未明确选择(回复"随便"/"你决定"等):默认选 A
When the content to be saved by the user contains any of the following Markdown features ( title, , code block, list, quote, , ), must stop and ask the user first, do not execute the command directly:
#**bold**`- > [link](url)Detected Markdown formatting in content, please select the save method:
A (Recommended) Save as Markdown note (.md)
→ Format is fully preserved, can be displayed and edited normally in the editor
B Save as Youdao proprietary format (.note)
→ Supports all features of Youdao Cloud Note rich text editor
Please reply with A or B:After receiving the user's selection, construct the command as follows (Prioritize the solution to avoid JSON escaping issues):
contentFile- Option A: command,
save, addtype: "md"suffix to the file name.mdAlternative (short content):# Step 1: Write tool writes Markdown to /tmp/note-content.md (no JSON escaping needed) {"title":"Title.md","type":"md","contentFile":"/tmp/note-content.md","parentId":"Folder ID"}{"title":"Title.md","type":"md","content":"Markdown Content","parentId":"Folder ID"} - Option B: command,
save,type: "note", addcontentFormat: "md"suffix to the file name.noteAlternative (short content):# Step 1: Write tool writes Markdown to /tmp/note-content.md (no JSON escaping needed) {"title":"Title.note","type":"note","contentFormat":"md","contentFile":"/tmp/note-content.md","parentId":"Folder ID"}{"title":"Title.note","type":"note","contentFormat":"md","content":"Markdown Content","parentId":"Folder ID"}
is an optional field: Fill in the folder ID returned byparentIdto specify the target directory; if not filled, it will be stored in "My Resources/Favorite Notes" by default.youdaonote list
- User does not explicitly select (replies "whatever"/"you decide", etc.): Default to Option A
创建 / 保存
Create / Save
bash
undefinedbash
undefined✅ 推荐:contentFile 方案(Write 工具写文件 → save 传路径,无需 JSON 转义)
✅ Recommended: contentFile solution (Write tool writes file → save passes path, no JSON escaping needed)
Step 1:Write 工具将 Markdown 写入 /tmp/note-content.md
Step 1: Write tool writes Markdown to /tmp/note-content.md
printf '%s\n' '{"title":"笔记.md","type":"md","contentFile":"/tmp/note-content.md"}' | youdaonote save --json
printf '%s\n' '{"title":"Note.md","type":"md","contentFile":"/tmp/note-content.md"}' | youdaonote save --json
✅ 短内容可直接内联(无换行/特殊字符时)
✅ Short content can be directly inline (when no line breaks/special characters)
printf '%s\n' '{"title":"笔记","contentFormat":"md","content":"# 标题\n\n内容"}' | youdaonote save
printf '%s\n' '{"title":"Note","contentFormat":"md","content":"# Title\n\nContent"}' | youdaonote save
⚠️ 仅纯文本,不支持 Markdown 格式,有格式需求时禁用
⚠️ Plain text only, does not support Markdown formatting, disable when formatting is required
youdaonote create -n "标题" -c "纯文本内容"
undefinedyoudaonote create -n "Title" -c "Plain Text Content"
undefined其他操作
Other Operations
bash
youdaonote search "关键词"
youdaonote list [-f <目录ID>] # 浏览目录,id 可传给 read
youdaonote read <fileId> # 返回 JSON 含 content、rawFormat(md/note/txt)和 isRaw(是否原始内容)
youdaonote recent -l 20 -c --json # 最近收藏
youdaonote update <fileId> -c "新内容"
youdaonote update <fileId> --file content.md # 大内容(>10KB)从文件读取
youdaonote delete <fileId>
youdaonote rename <fileId> "新标题"
youdaonote move <fileId> <目录ID>bash
youdaonote search "Keyword"
youdaonote list [-f <Directory ID>] # Browse directory, id can be passed to read
youdaonote read <fileId> # Returns JSON containing content, rawFormat (md/note/txt) and isRaw (whether the content is original)
youdaonote recent -l 20 -c --json # Recent favorites
youdaonote update <fileId> -c "New Content"
youdaonote update <fileId> --file content.md # Large content (>10KB) read from file
youdaonote delete <fileId>
youdaonote rename <fileId> "New Title"
youdaonote move <fileId> <Directory ID>网页剪藏
Web Clipping
bash
youdaonote clip "https://example.com/article" --json
youdaonote clip "https://example.com/article" -f <目录ID> --json # 保存到指定目录bash
youdaonote clip "https://example.com/article" --json
youdaonote clip "https://example.com/article" -f <Directory ID> --json # Save to specified directoryCLI 未安装处理(Agent 必须自动执行)
CLI Not Installed Handling (Agent Must Execute Automatically)
收到 时,Agent 立即执行安装命令,禁止只展示步骤让用户操作。
command not foundmacOS / Linux / WSL:
bash
curl -fsSL https://artifact.lx.netease.com/download/youdaonote-cli/install.sh | bash -s -- -f -b ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"When receiving , the Agent must execute the installation command immediately, do NOT only display steps and let users operate manually.
command not foundmacOS / Linux / WSL:
bash
curl -fsSL https://artifact.lx.netease.com/download/youdaonote-cli/install.sh | bash -s -- -f -b ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"安装后立即重新执行用户原始请求
Re-execute the user's original request immediately after installation
**升级**:若 CLI 支持 `upgrade` 命令,优先使用 `youdaonote upgrade`;否则重新执行上述安装脚本。
**Windows 或安装失败**:参考安装指南(https://note.youdao.com/help-center/cli-install-guide.html)。
**Upgrade**: If the CLI supports the `upgrade` command, prioritize using `youdaonote upgrade`; otherwise, re-execute the above installation script.
**Windows or installation failure**: Refer to the installation guide (https://note.youdao.com/help-center/cli-install-guide.html).故障排查
Troubleshooting
运行 ,根据 的项执行:
youdaonote check --jsonstatus: "fail"| 失败项 | 处理动作 |
|---|---|
| |
| API Key 有效但网络不通,提示用户检查网络或稍后重试 |
Run , and perform actions based on items with :
youdaonote check --jsonstatus: "fail"| Failed Item | Action |
|---|---|
| |
| API Key is valid but network is unreachable, prompt user to check network or try again later |
注意事项
Notes
- 所有命令支持 输出机器可解析格式
--json - 大内容通过 传递,避免命令行参数限制
--file - Windows CMD 中 URL 含 时必须用双引号括起
& - Windows 管道/重定向场景中文可能乱码(CLI 输出 UTF-8,但 PowerShell/CMD 默认按 GBK 解读):PowerShell 中执行 ,CMD 中执行
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false);可运行chcp 65001查看诊断建议youdaonote check - 输出的
list与id的read等价fileId - 返回的
read标识笔记原始格式:rawFormat=Markdown、md=云笔记、note=纯文本;txt标识返回的 content 是否为原始内容(isRaw=原文可直接编辑,true=经过转换的纯文本)false - 禁止用 保存 Markdown 内容:
create不支持create,即使内容含 Markdown 语法也会存为纯文本静默丢失格式,有格式需求时一律使用contentFormat并指定savecontentFormat: "md" - 命令通过 JSON 的
save字段指定目标文件夹(值来自parentId返回的文件夹 ID);不传则默认存到「我的资源/收藏笔记」。禁止使用list等其他命名——服务端会静默忽略未知字段。folderId
- All commands support output for machine-readable format
--json - Pass large content via to avoid command line parameter limits
--file - URLs containing in Windows CMD must be enclosed in double quotes
& - Chinese characters may be garbled in Windows pipe/redirection scenarios (CLI outputs UTF-8, but PowerShell/CMD defaults to GBK interpretation): Execute in PowerShell, or
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)in CMD; runchcp 65001to view diagnostic suggestionsyoudaonote check - output by
idis equivalent tolistforfileIdread - returned by
rawFormatidentifies the original note format:read=Markdown,md=Cloud Note,note=Plain Text;txtidentifies whether the returned content is original (isRaw=original text can be edited directly,true=converted plain text)false - Do NOT use to save Markdown content:
createdoes not supportcreate, even if the content contains Markdown syntax, it will be saved as plain text with formatting silently lost. For formatting needs, always usecontentFormatand specifysavecontentFormat: "md" - The command specifies the target folder via the
savefield in JSON (value comes from the folder ID returned byparentId); if not passed, it will be saved to "My Resources/Favorite Notes" by default. Do NOT use other names such aslist— the server will silently ignore unknown fields.folderId