Command-line tool for 有道云笔记. Operate on notes without opening the app — list, read, create, search, clip, and save from the terminal or scripts.
sh
# Install (no Node.js required)
curl -fsSL https://artifact.lx.netease.com/download/youdaonote-cli/install.sh | bash
# Configure API Key (get from https://mopen.163.com/#/dashboard)
youdaonote config set apiKey YOUR_API_KEY
# Verify
youdaonote list
API Key requires a phone number bound to your YoudaoNote account.
GoalCommandList root directoryyoudaonote listList a folderyoudaonote list -f <目录ID>Read a noteyoudaonote read <fileId>Create a noteyoudaonote create -n "标题" -c "内容"Create empty noteyoudaonote create -n "标题"Search notesyoudaonote search 关键词Search (JSON output)youdaonote search "关键词" --jsonRecent 15 notesyoudaonote recentRecent N notesyoudaonote recent -l <N>Recent with contentyoudaonote recent -cClip a webpageyoudaonote clip "https://..."Clip to folderyoudaonote clip "https://..." -f <目录ID>Save clip JSONyoudaonote clip-save --file result.jsonSave note JSONyoudaonote save --file note.json
json
{
"title": "笔记标题",
"bodyHtml": "<p>正文内容</p>",
"sourceUrl": "https://example.com",
"images": []
}
json
{
"title": "笔记.md",
"type": "md",
"content": "# 标题\n\n正文内容"
}
Search and read in a script:
sh
FILE_ID=$(youdaonote search "关键词" --json | jq -r '.[0].id')
youdaonote read "$FILE_ID"
Save a build report in CI:
sh
cat > note.json << 'EOF'
{ "title": "构建报告.md", "type": "md", "content": "# 构建成功\n\n时间:$(date)" }
EOF
youdaonote save --file note.json
SymptomFixAPI Key 未配置``youdaonote config set apiKey YOUR_KEY``clip-save 报缺少必填字段JSON 需包含 title、 bodyHtml、 sourceUrl``save 报缺少必填字段JSON 需包含 title、 content``Unterminated string JSON 解析失败改用 printf '%s\n' '...' 或 --file 从文件读取Windows JSON Parse error使用 --file 读取文件;或改用 PowerShellWindows clip 后出现命令错误URL 含 & 时必须用英文双引号括起整个 URLWindows 保存后乱码先执行 chcp 65001,或用 UTF-8 编辑器保存 JSON