CLI tool
yann0917/dedao-dl avatar
yann0917/dedao-dl

dedao-dl: a terminal client for the 得到 course library you already paid for

得到 APP 课程下载工具,可在终端查看文章内容,可生成 PDF,音频文件,markdown 文稿,可下载电子书。可结合 agent +skills 等使用

910 stars193 forksGoMIT

At a glance

What is it?
dedao-dl is a Go command line tool that logs into 得到 with a QR code or a cookie and then lists the courses, audiobooks, ebooks and notes attached to that account, exporting them as PDF, MP3, Markdown, HTML or EPUB. It also ships a local web interface and a skill directory built for AI agents.
Who is it for?
dedao-dl is aimed at readers who already subscribe to 得到 and want their purchased material in files they can read offline, search and reformat, especially users who prefer a terminal, a local web page or an agent driving the command line over the official app. It is the wrong tool if you want access to content you have not bought, and it is the wrong tool if you need PDF export inside Docker, because the published image has no wkhtmltopdf.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

dedao-dl works from your own account, so everything it lists is something you bought

The repository describes itself as a download tool for the 得到 app course library, and the mechanism is ordinary account access. You log in once with a QR code scan or with a cookie generated from the desktop site, and after that the tool works against that account. The feature list is explicit about the scope: purchased courses and their article text, the listening shelf, the ebook shelf, the purchased 锦囊 entries, and selected 推荐话题 content. It can also produce a PDF, a Markdown transcript or an mp3 from a course, download the daily listening book audio with pdf and Markdown transcripts, download ebooks as html, pdf or epub, and export reading notes as Markdown.

The licence is MIT and the primary language is Go, with the module path github.com/yann0917/dedao-dl and a go.mod that requires Go 1.26.0. The tool is a client for an account you already have rather than a source of content, and the project says so three times in a row: the content copyright belongs to 得到, it is for personal study, and it should not be spread around.

That warning is not boilerplate to be ignored. The output of this tool is a copy of paid material, and a MIT licence on the code says nothing about the content it fetches. If you intend to keep the exports for yourself, that is the stated use. If a team intends to file them into a shared repository, the licence question is about 得到's content, not about this code, and the project does not grant it.

The audience is narrower than the app itself suggests. This is for people who want to search, convert and archive text they have access to, and for developers who want a scriptable interface to that library. A desktop client also exists under a separate project name, dedao-gui, and the repository points at it for people who want a graphical application.

Twenty Cobra subcommands cover the shelves, the articles and the downloads

The command surface is the clearest thing about the project. The help output lists the available commands, and the naming is a mix of English verbs and short abbreviations that you will have to learn once:

bash
Usage:
  dedao-dl [command]


Available Commands:
  ace         获取我的锦囊
  article     获取文章详情
  cat         获取课程分类
  clean       清理 output 或 .cache 目录
  channel     学习圈相关操作
  course      获取我购买过课程
  dl          下载已购买课程,并转换成 PDF & 音频
  dle         下载电子书
  dlo         下载每天听本书音频 & 文稿
  ebook       获取我的电子书架
  free        获取免费专区课程
  help        Help about any command
  login       登录得到 pc 端 https://www.dedao.cn
  odob        获取我的听书书架
  recent      查询用户最近学习情况
  su          切换登录过的账号
  topic       获取推荐话题列表
  users       查看登录过的用户列表
  web         启动 Web UI 与 API 服务
  who         查看当前登录的用户

Read as a workflow, it runs from login to listing to download. login takes a QR code with the -q flag, and it supports both the 得到 app and WeChat scanning, or a cookie with login -c. course lists what you bought, odob lists the audiobooks, ebook lists the ebooks, ace lists the 锦囊. Then dl converts a purchased course into PDF and audio, dlo handles the daily listening book, and dle pulls ebooks. su switches between accounts you have logged into, and who shows the current one, which is the command to reach for when a download produces an empty list.

Every subcommand takes -h, and the reference documentation in the skills directory is explicitly assembled from the real output of dedao-dl <command> -h. That is a useful detail for a command line tool whose flags are not otherwise documented, since the help text is the reference rather than a summary of it.

PDF needs wkhtmltopdf and audio needs ffmpeg, and the Docker image ships only one of them

Export formats are not equally supported, and the dependency requirements are separated by format. Markdown text download needs nothing extra. PDF conversion, for both courses and ebooks, goes through wkhtmltopdf. Audio is assembled with ffmpeg. The tool is careful here to say to install only what your own needs require, which is the right advice for a binary that would otherwise pull a full rendering stack onto a workstation.

The container image shows the trade-off clearly. The Dockerfile installs ffmpeg and Chinese fonts, including wqy-zenhei, and sets the timezone to Asia/Shanghai, which tells you the audio path and the Chinese text rendering were the priorities. The README notes plainly that wkhtmltopdf is not installed inside docker, so PDF download does not work there. The image also swaps the alpine mirror to an Aliyun source for build speed and sets GOPROXY to goproxy.cn, which will matter to anyone building the image outside mainland China.

The build itself is reproducible in a simple way. The Makefile sets CGO_ENABLED=0 and builds for linux, darwin and windows, all amd64, and it uses a nomsgpack build tag so that gin renders only JSON. The comment in the Makefile gives the reason and the payoff: excluding msgpack support removes a large codec dependency and shrinks the binary by about 5.6 MB. The Dockerfile does the same with the nomsgpack tag and adds UPX compression on top, and it also stamps the binary with build metadata through ldflags.

So the delivery story is: prebuilt binaries in the releases list, a go install path, a Makefile for local cross builds, and a container for people who would rather not install ffmpeg locally.

The Web UI and the gin API share one config.json with the CLI

dedao-dl embeds a web front end and a gin based API, started with the web command. The default is a local address and the browser opens itself:

bash
# 默认启动地址:http://127.0.0.1:17878 ,并自动打开浏览器
dedao-dl web

# 指定监听地址/端口(适合局域网访问或端口冲突时)
dedao-dl web --host 0.0.0.0 --port 17878

# 仅启动服务,不自动打开浏览器
dedao-dl web --open=false

The service reads config.json from the current directory and shares the configuration and login state with the command line tool, so the two are not separate sessions. You do not have to log in through the CLI first: the web page offers QR code login on open, and if you already logged in from the terminal it recognises that. Ctrl + C shuts the service down gracefully.

The page covers more than the CLI does. There is a learning workbench that groups purchased courses, audiobooks, ebooks and 锦囊 together with basic information, a learning record view showing recent progress, counts and a 30 day study breakdown by days studied, completion rate, content mix, daily counts and time of day, content detail pages for courses, articles, audiobooks and book reviews, a download area that starts MP3, PDF, Markdown, HTML and EPUB tasks, a download queue with progress at the bottom of the page, and a leaderboard view for courses, audiobooks and books.

One warning on the listen address. The example for LAN access is --host 0.0.0.0, and the service holds your logged in account session in that config.json. Binding it to all interfaces exposes a logged in service to the local network, so that flag deserves a firewall in front of it rather than a convenience.

The skills directory turns the CLI into something an agent can drive

A directory at skills/dedao-dl/ is aimed squarely at AI agents, and the repository description says the tool can be used together with agent and skills setups. Three files make up the skill. SKILL.md holds the core workflow, the rules for agent use and a map of the commands. references/commands.md documents every subcommand with its flags, positional arguments and examples, and the README states that this reference was compiled from the real output of dedao-dl <command> -h. references/troubleshooting.md is a troubleshooting guide covering login, argument and ID handling, dependencies, and download or permission problems.

Installation is a single sentence to an agent, asking it to install the skill from the repository URL, which places it in the agent's skill directory and makes it effective.

For automated use the README sets a default convention: use the JSON output form, and check the help of a command when the parameters are uncertain.

bash
dedao-dl --json recent

The JSON mode matters more than it looks. The human-facing output of commands like course is a rendered table, and a table is a poor contract for a script. Switching to JSON is what turns the same command into something parseable, and the skill's mention of two kinds of identifiers, automatic URL recognition and the -t format table option is about the same problem: giving an agent a stable way to identify a course, an article or a topic without scraping formatted text.

The repository layout supports the same separation in code. There are cmd/ for the command definitions, request/ for the HTTP layer, services/ for the business logic, downloader/ for the fetching and conversion, config/ for configuration, utils/ for shared helpers, web/ for the API and webui/ for the front end, plus docs/ and skills/. The Makefile keeps a test target wired to go test -v ./... and race builds behind enable-race, so the pieces are separated in a way that is testable rather than a single main file.

Paging, ordering and the recent command reveal how the API is queried

The listing commands accept pagination and sorting, with rules that are specific enough to be worth reading before you script against them:

bash
dedao-dl course --page 1 --limit 18
dedao-dl course --order buy --page 1 --limit 18
dedao-dl course --group-id 12345 --page 1 --limit 18
dedao-dl odob --page 1 --limit 18
dedao-dl odob --group-id 12345 --page 1 --limit 18
dedao-dl ebook --page 1 --limit 18
dedao-dl ebook --group-id 12345 --page 1 --limit 18

Two constraints shape the behaviour. The --page and --limit flags must be passed together, and when neither is passed the tool keeps its original behaviour of pulling everything. When both are present, groups are not expanded and only the raw list for the current page is shown. Ordering is limited too: course accepts study as the default and buy for most recently purchased, while odob and ebook accept only study.

The recent command, which reports recent learning activity, exposes the internal user identifier directly:

bash
dedao-dl recent -h
dedao-dl recent
dedao-dl recent --page-size 20 --max-id 0
dedao-dl recent --product-type 66 --filter-product-type=true
dedao-dl recent --uid-hazy <uid_hazy>

The --uid-hazy value defaults to the currently logged in user and can be set explicitly, --page-size defaults to 20, --max-id is a pagination cursor defaulting to 0, and --product-type filters by product type. An identifier named uid_hazy is the sort of thing that comes from a reverse engineered API rather than a designed one, and the presence of a raw identifier flag is a fair signal that the underlying interface is not a stable public contract.

The topic list, the article detail command, the 知识城邦 channel operations and the free area command complete the read side. What the documentation does not describe is a guaranteed stable API, a rate limit policy, or any guarantee that the platform's endpoints stay the same, and a tool that depends on them can break without a change to its own code.

MIT on the code, a copyright notice on the content, and three releases in ten days

The code is MIT licensed, which is permissive for a tool like this: you can read it, modify it and ship a fork. The content is a separate matter, and the project is unambiguous that the course material belongs to 得到 and should not be redistributed.

On maintenance, the repository is not archived and the last push was on 2026-10-10. The release list shows v1.3.0 on 2026-10-01, v1.3.1 on 2026-10-08 and v1.3.2 on 2026-10-10, with the last release matching the last push. Three tagged versions in ten days is a fast cadence for a command line tool, and it points to active work on the interface rather than to a stable contract.

That cadence has a cost for anyone who depends on the tool in a script. The commands and their flags can change between minor versions, the JSON output can change shape, and the underlying platform endpoints can change without notice. The skill directory tries to reduce that risk by telling agents to check dedao-dl <command> -h before using an unfamiliar command, which is a reasonable habit but not a guarantee.

For a local reader who runs the tool by hand, the upgrade path is simple, replace the binary. For a team that has built automation on top of it, pin a version and keep the reference copy of the help output in your own notes, because the upstream project explicitly documents its commands by pointing at the live help text rather than at a versioned specification.

Editorial conclusion

dedao-dl is aimed at readers who already subscribe to 得到 and want their purchased material in files they can read offline, search and reformat, especially users who prefer a terminal, a local web page or an agent driving the command line over the official app. It is the wrong tool if you want access to content you have not bought, and it is the wrong tool if you need PDF export inside Docker, because the published image has no wkhtmltopdf. Before you rely on it, check that your format needs are covered by the local dependencies, since PDF needs wkhtmltopdf and audio needs ffmpeg while Markdown needs neither, and read the project's own copyright notice before redistributing anything the tool produces.

Frequently asked questions

How do I log in to dedao-dl?

Run dedao-dl login -q and scan the QR code, which supports both the 得到 app and WeChat, or log in on the desktop site and pass the cookie with dedao-dl login -c "xxxxxxxx". The su command switches between accounts already logged in.

Which dependencies does dedao-dl need for PDF and audio downloads?

PDF conversion of courses and ebooks needs wkhtmltopdf, and audio is assembled with ffmpeg. Markdown text download needs no extra dependency.

Can I download PDFs with the dedao-dl Docker image?

No. The README states that wkhtmltopdf is not installed inside the container, so PDF download does not work there, while ffmpeg is present for audio.

How do I install dedao-dl without Go installed?

Download the binary for your system from the repository releases list and run it. The project also offers go install github.com/yann0917/dedao-dl@latest, which requires Go newer than 1.26 with GOPATH set and $GOPATH/bin on the PATH.

Does dedao-dl have a web interface?

Yes. The web command starts an embedded front end and a gin API on 127.0.0.1:17878 by default and opens the browser. The service shares config.json and the login state with the CLI, and Ctrl + C shuts it down gracefully.

How should an AI agent call dedao-dl?

The project states that agent automation should use the JSON output form, dedao-dl --json <command> ..., and to run dedao-dl <command> -h when the parameters are uncertain. The skill in skills/dedao-dl/ documents the workflow, the flags and the troubleshooting steps.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. Releases
  5. yann0917/dedao-dl on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yann0917-dedao-dl.svg)](https://hysenlabs.com/projects/yann0917-dedao-dl)

Was this useful?