youdaonote

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

YoudaoNote — 有道云笔记

YoudaoNote — Youdao Cloud Note

通过
youdaonote
CLI 操作有道云笔记。覆盖笔记 CRUD、待办管理、网页剪藏全场景。
Operate Youdao Cloud Note via the
youdaonote
CLI. Covers full scenarios including note CRUD, to-do management, and web clipping.

前置条件(Agent 自动处理)

Prerequisites (Automatically handled by Agent)

执行任何操作前,Agent 必须先运行
youdaonote list
检测 CLI 是否可用:
  • command not found
    → 立即跳转「CLI 未安装处理」自动安装,禁止只展示安装步骤让用户手动操作
  • API Key 错误 → 提示用户访问 https://mopen.163.com 获取 API Key(须使用手机号登录,且云笔记账号已绑定手机号),然后执行
    youdaonote config set apiKey <用户提供的Key>
    获取 API Key 的地址只有这一个,禁止告知用户其他地址。
  • 正常返回目录列表 → 运行
    youdaonote version
    检查版本,若版本低于
    minCliVersion
    需要升级:CLI 支持
    upgrade
    命令时执行
    youdaonote upgrade
    ,否则按「CLI 未安装处理」中的升级方式操作;Windows 用户或升级失败时参考安装指南(https://note.youdao.com/help-center/cli-install-guide.html)。版本满足要求后可运行
    youdaonote help --json
    获取当前 CLI 全部能力的结构化描述(JSON),用于确认命令是否可用,下方速查表作为 fallback
Before performing any operation, the Agent must first run
youdaonote list
to check if the CLI is available:
  • command not found
    → Immediately jump to "CLI Not Installed Handling" for automatic installation. Do NOT only display installation steps and let users operate manually
  • 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
    youdaonote config set apiKey <User-provided Key>
    . This is the only address for obtaining the API Key; do NOT inform users of other addresses.
  • Directory list returned normally → Run
    youdaonote version
    to check the version. If the version is lower than
    minCliVersion
    , upgrade is required: if the CLI supports the
    upgrade
    command, execute
    youdaonote upgrade
    ; 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, run
    youdaonote help --json
    to 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 fallback

命令速查

Command Quick Reference

命令用途示例
mkdir
创建文件夹
youdaonote mkdir "文件夹名" [-f <父目录ID>]
save
保存笔记(✅ 推荐,支持 Markdown 富文本)
youdaonote save --file note.json
create
创建笔记(⚠️ 仅纯文本,不支持 Markdown 富文本)
youdaonote create -n "标题" -c "内容" [-f <目录ID>]
update
更新 Markdown 笔记
youdaonote update <fileId> -c "内容"
--file content.md
delete
删除笔记
youdaonote delete <fileId>
rename
重命名笔记
youdaonote rename <fileId> "新标题"
move
移动笔记
youdaonote move <fileId> <目录ID>
search
搜索笔记
youdaonote search "关键词"
list
浏览目录
youdaonote list -f <目录ID>
read
读取笔记
youdaonote read <fileId>
recent
最近收藏
youdaonote recent -l 20 -c --json
clip
网页剪藏(服务端)
youdaonote clip "https://..." [-f <目录ID>] --json
clip-save
保存外部剪藏 JSON
youdaonote clip-save --file data.json
todo list
列出待办
youdaonote todo list [--group <分组ID>] --json
todo create
创建待办
youdaonote todo create -t "标题" [-c "内容"] [-d 2025-12-31] [-g <分组ID>]
todo update
更新待办
youdaonote todo update <todoId> [--done] [--undone] [-t "新标题"]
todo delete
删除待办
youdaonote todo delete <todoId>
todo groups
列出待办分组
youdaonote todo groups --json
todo group-create
创建分组
youdaonote todo group-create "分组名"
todo group-rename
重命名分组
youdaonote todo group-rename <groupId> "新名"
todo group-delete
删除分组
youdaonote todo group-delete <groupId>
upgrade
升级 CLI
youdaonote upgrade [--check] [--force] [--json]
check
健康检查
youdaonote check
config show
查看配置
youdaonote config show --json
config set
设置配置
youdaonote config set apiKey YOUR_KEY
CommandPurposeExample
mkdir
Create folder
youdaonote mkdir "Folder Name" [-f <Parent Directory ID>]
save
Save note (✅ Recommended, supports Markdown rich text)
youdaonote save --file note.json
create
Create note (⚠️ Plain text only, does not support Markdown rich text)
youdaonote create -n "Title" -c "Content" [-f <Directory ID>]
update
Update Markdown note
youdaonote update <fileId> -c "Content"
or
--file content.md
delete
Delete note
youdaonote delete <fileId>
rename
Rename note
youdaonote rename <fileId> "New Title"
move
Move note
youdaonote move <fileId> <Directory ID>
search
Search notes
youdaonote search "Keyword"
list
Browse directory
youdaonote list -f <Directory ID>
read
Read note
youdaonote read <fileId>
recent
Recent favorites
youdaonote recent -l 20 -c --json
clip
Web clipping (server-side)
youdaonote clip "https://..." [-f <Directory ID>] --json
clip-save
Save external clipping JSON
youdaonote clip-save --file data.json
todo list
List to-dos
youdaonote todo list [--group <Group ID>] --json
todo create
Create to-do
youdaonote todo create -t "Title" [-c "Content"] [-d 2025-12-31] [-g <Group ID>]
todo update
Update to-do
youdaonote todo update <todoId> [--done] [--undone] [-t "New Title"]
todo delete
Delete to-do
youdaonote todo delete <todoId>
todo groups
List to-do groups
youdaonote todo groups --json
todo group-create
Create group
youdaonote todo group-create "Group Name"
todo group-rename
Rename group
youdaonote todo group-rename <groupId> "New Name"
todo group-delete
Delete group
youdaonote todo group-delete <groupId>
upgrade
Upgrade CLI
youdaonote upgrade [--check] [--force] [--json]
check
Health check
youdaonote check
config show
View configuration
youdaonote config show --json
config set
Set configuration
youdaonote config set apiKey YOUR_KEY

笔记管理

Note Management

默认创建方式:所有笔记一律使用
save
命令 +
contentFormat: "md"
保存为 Markdown 富文本。 禁止使用
create
命令保存包含 Markdown 格式的内容
(标题、列表、代码块、表格等)——
create
仅支持纯文本,会静默丢失所有格式。HTML/结构化数据先转 Markdown 再用
save
保存。
Default creation method: All notes must be saved as Markdown rich text using the
save
command +
contentFormat: "md"
. Do NOT use the
create
command to save content containing Markdown formatting
(titles, lists, code blocks, tables, etc.) —
create
only supports plain text and will silently lose all formatting. Convert HTML/structured data to Markdown first, then save with
save
.

Markdown 内容格式选择(必须遵守)

Markdown Content Format Selection (Must Follow)

当用户要保存的内容包含以下任意 Markdown 特征时(
#
标题、
**粗体**
`
代码块、
- 
列表、
> 
引用、
[链接](url)
![图片](url)
),必须先停下来询问用户,不得直接执行命令:
检测到内容包含 Markdown 格式,请选择保存方式:

A(推荐)保存为 Markdown 笔记(.md)
  → 格式完整保留,可在编辑器中正常显示和编辑

B  保存为有道专有格式(.note)
  → 支持有道云笔记富文本编辑器的全部功能

请回复 A 或 B:
收到用户选择后,按以下方式构造命令(优先使用
contentFile
方案,避免 JSON 转义问题
):
  • 选 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
为可选字段:填写
youdaonote list
返回的文件夹 ID 可指定目标目录;不填则默认存入「我的资源/收藏笔记」。
  • 用户未明确选择(回复"随便"/"你决定"等):默认选 A
When the content to be saved by the user contains any of the following Markdown features (
#
title,
**bold**
,
`
code block,
- 
list,
> 
quote,
[link](url)
,
![image](url)
), must stop and ask the user first, do not execute the command directly:
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
contentFile
solution to avoid JSON escaping issues
):
  • Option A:
    save
    command,
    type: "md"
    , add
    .md
    suffix to the file name
    # 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"}
    Alternative (short content):
    {"title":"Title.md","type":"md","content":"Markdown Content","parentId":"Folder ID"}
  • Option B:
    save
    command,
    type: "note"
    ,
    contentFormat: "md"
    , add
    .note
    suffix to the file name
    # 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"}
    Alternative (short content):
    {"title":"Title.note","type":"note","contentFormat":"md","content":"Markdown Content","parentId":"Folder ID"}
parentId
is an optional field: Fill in the folder ID returned by
youdaonote list
to specify the target directory; if not filled, it will be stored in "My Resources/Favorite Notes" by default.
  • User does not explicitly select (replies "whatever"/"you decide", etc.): Default to Option A

创建 / 保存

Create / Save

bash
undefined
bash
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 "纯文本内容"
undefined
youdaonote 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 directory

CLI 未安装处理(Agent 必须自动执行)

CLI Not Installed Handling (Agent Must Execute Automatically)

收到
command not found
时,Agent 立即执行安装命令,禁止只展示步骤让用户操作。
macOS / 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
command not found
, the Agent must execute the installation command immediately, do NOT only display steps and let users operate manually.
macOS / 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 --json
,根据
status: "fail"
的项执行:
失败项处理动作
config-file
/
api-key
youdaonote config set apiKey YOUR_KEY
mcp-connection
API Key 有效但网络不通,提示用户检查网络或稍后重试
Run
youdaonote check --json
, and perform actions based on items with
status: "fail"
:
Failed ItemAction
config-file
/
api-key
youdaonote config set apiKey YOUR_KEY
mcp-connection
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 中执行
    [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
    ,CMD 中执行
    chcp 65001
    ;可运行
    youdaonote check
    查看诊断建议
  • list
    输出的
    id
    read
    fileId
    等价
  • read
    返回的
    rawFormat
    标识笔记原始格式:
    md
    =Markdown、
    note
    =云笔记、
    txt
    =纯文本;
    isRaw
    标识返回的 content 是否为原始内容(
    true
    =原文可直接编辑,
    false
    =经过转换的纯文本)
  • 禁止用
    create
    保存 Markdown 内容
    create
    不支持
    contentFormat
    ,即使内容含 Markdown 语法也会存为纯文本静默丢失格式,有格式需求时一律使用
    save
    并指定
    contentFormat: "md"
  • save
    命令通过 JSON 的
    parentId
    字段指定目标文件夹(值来自
    list
    返回的文件夹 ID);不传则默认存到「我的资源/收藏笔记」。禁止使用
    folderId
    等其他命名——服务端会静默忽略未知字段。
  • All commands support
    --json
    output for machine-readable format
  • Pass large content via
    --file
    to avoid command line parameter limits
  • 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
    [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
    in PowerShell, or
    chcp 65001
    in CMD; run
    youdaonote check
    to view diagnostic suggestions
  • id
    output by
    list
    is equivalent to
    fileId
    for
    read
  • rawFormat
    returned by
    read
    identifies the original note format:
    md
    =Markdown,
    note
    =Cloud Note,
    txt
    =Plain Text;
    isRaw
    identifies whether the returned content is original (
    true
    =original text can be edited directly,
    false
    =converted plain text)
  • Do NOT use
    create
    to save Markdown content
    :
    create
    does not support
    contentFormat
    , even if the content contains Markdown syntax, it will be saved as plain text with formatting silently lost. For formatting needs, always use
    save
    and specify
    contentFormat: "md"
  • The
    save
    command specifies the target folder via the
    parentId
    field in JSON (value comes from the folder ID returned by
    list
    ); if not passed, it will be saved to "My Resources/Favorite Notes" by default. Do NOT use other names such as
    folderId
    — the server will silently ignore unknown fields.