modelscope.cn

yuque-dl

下载语雀知识库到本地 Markdown。支持?

Installation

$ npx skills add https://modelscope.cn

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from modelscope.cn · top by installs.

npx skills add https://modelscope.cn

Browse all from modelscope.cn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,938 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

语雀知识库下载器

将语雀知识库下载为本地 Markdown 文件。

前置条件

  • Node.js 18.4+
  • yuque-dl 已全局安装 (npm install -g yuque-dl)

默认下载位置

/Users/lytton/mac_wps_clound/Obsidian笔记知识库/宝藏资源库/语雀知识库/

基础用法

下载公开知识库(下载到默认位置)

yuque-dl "https://www.yuque.com/用户名/知识库" -d "/Users/lytton/mac_wps_clound/Obsidian笔记知识库/宝藏资源库/语雀知识库"

指定其他下载目录

yuque-dl "URL" -d /path/to/other/

增量下载(跳过已下载)

yuque-dl "URL" --incremental

私有知识库

1. 分享的私有知识库

需要提供 token(从浏览器 Cookie 获取 yuquesession 值):

yuque-dl "URL" -t="your_token_here"

2. 企业私有服务

企业域名非 yuque.com 结尾,需要指定 key 和 token:

yuque-dl "https://yuque.company.com/xxx" -k "cookie_key" -t="cookie_value"

3. 公开密码访问的知识库

输入密码后,根据登录状态选择不同 cookie:

已登录语雀:

yuque-dl "URL" -t="_yuque_session值"

未登录语雀:

yuque-dl "URL" -k "verified_books" -t="verified_books值"

常用选项

选项 说明
-d, --distDir <dir> 下载目录 (默认: download)
-i, --ignoreImg 忽略图片不下载
--ignoreAttachments [ext] 忽略附件,可指定后缀如 mp4,pdf
-t, --token <token> 语雀 cookie token
-k, --key <key> cookie key (默认: yuquesession)
--toc 输出文档 toc 目录
--incremental 增量下载
--hideFooter 隐藏页脚信息

预览下载内容

启动 Web 服务预览:

yuque-dl server ./download/知识库/

访问 http://localhost:5173/ 预览

获取 Token 方法

  1. 登录语雀网站
  2. 打开浏览器开发者工具 (F12)
  3. 进入 Application → Cookies
  4. 找到 yuquesession 的值

工作流程

  1. 解析链接: 确认是语雀知识库链接
  2. 判断类型: 公开/私有/企业/密码访问
  3. 获取凭证: 私有知识库需要用户提供 token
  4. 执行下载: 使用合适参数下载
  5. 返回结果: 告知下载位置

常见问题

Token 含特殊字符报错:

# 错误写法
yuque-dl "URL" -t "-abc123"

# 正确写法(用等号)
yuque-dl "URL" -t="-abc123"

附件下载失败: 即使是公开知识库,下载附件也需要登录 token。

网络波动失败: 重新运行即可,已下载的进度会保留。