名称: nudocs
描述: 通过 Nudocs.ai 上传、编辑和导出文档。适用于创建可共享的文档链接进行协作编辑、将 Markdown/文档上传至 Nudocs 进行富文本编辑,或拉取编辑后的内容。触发词包括:"send to nudocs"、"upload to nudocs"、"edit in nudocs"、"pull from nudocs"、"get the nudocs link"、"show my nudocs documents"。
主页: https://nudocs.ai
元数据:
{
"openclaw":
{
"emoji": "📄",
"requires":
{
"bins": ["nudocs"],
"env": ["NUDOCS_API_KEY"],
"config": ["~/.config/nudocs/api_key"],
},
"install":
[
{
"id": "npm",
"kind": "node",
"package": "@nutrient-sdk/nudocs-cli",
"repo": "https://github.com/PSPDFKit/nudocs-cli",
"bins": ["nudocs"],
"label": "安装 Nudocs CLI (npm)",
},
],
},
}
将文档上传至 Nudocs.ai 进行富文本编辑,获取可共享的链接,并拉取编辑后的结果。
npm install -g @nutrient-sdk/nudocs-cli
获取 API 密钥:
访问 https://nudocs.ai,登录后点击 "Integration" 获取。
配置密钥:
# 方式一:环境变量
export NUDOCS_API_KEY="nudocs_your_key_here"
# 方式二:配置文件
mkdir -p ~/.config/nudocs
echo "nudocs_your_key_here" > ~/.config/nudocs/api_key
nudocs upload <文件> # 上传文件并获取编辑链接
nudocs list # 列出所有文档
nudocs link [ULID] # 获取文档编辑链接(未指定 ULID 时返回最近上传的文档)
nudocs pull [ULID] [--format 格式] # 下载文档(默认格式:docx)
nudocs delete <ULID> # 删除指定文档
nudocs config # 显示当前配置
nudocs upload <文件>nudocs pull [ULID] --format <格式>| 场景 | 推荐格式 |
|---|---|
| 用户进行了富文本格式编辑 | docx(默认) |
| 简单文本或代码内容 | md |
| 最终交付或分享 | pdf |
完整支持的格式列表请参阅 references/formats.md。
识别以下用户意图:
上传/发送:
- "send to nudocs"
- "upload to nudocs"
- "open in nudocs"
- "edit this in nudocs"
- "let me edit this in nudocs"
- "put this in nudocs"
拉取/获取:
- "pull it back"
- "pull from nudocs"
- "get that doc"
- "fetch from nudocs"
- "download from nudocs"
- "grab the updated version"
- "what did I change"
- "get my edits"
链接:
- "get the nudocs link"
- "share link"
- "where's that doc"
- "nudocs url"
列表:
- "show my nudocs"
- "list my documents"
- "what docs do I have"
- "my nudocs documents"
上传前,请确保文档结构清晰:
- 清晰的标题层级(H1 → H2 → H3)
- 一致的间距
- 适当的列表格式
- 简洁的段落(3-5 句话)
模板和详细指南请参阅 references/document-design.md。
用户:帮我写一篇关于远程工作的博客文章,并发送到 Nudocs
助手:
1. 撰写结构良好的 blog-remote-work.md
2. 运行:nudocs upload blog-remote-work.md
3. 返回:"这是您的 Nudocs 链接:https://nudocs.ai/file/01ABC..."
用户:*在 Nudocs 中编辑、添加格式和图片*
用户:把那个文档拉取回来
助手:
1. 运行:nudocs pull --format docx
2. 读取下载的文件
3. 返回:"已获取您更新后的文档!以下是更改内容..."
| 错误 | 原因 | 解决方案 |
|---|---|---|
| "No API key found" | 缺少凭证 | 设置 NUDOCS_API_KEY 环境变量或创建配置文件 |
| "DOCUMENT_LIMIT_REACHED" | 免费版限制(10 个文档) | 删除旧文档或升级至 Pro 版 |
| "Unauthorized" | API 密钥无效 | 在 Nudocs 设置中重新生成密钥 |
| "No ULID provided" | 缺少文档 ID | 指定 ULID 或先上传一个文档 |
@nutrient-sdk/nudocs-cli)