A CLI for Z-Library. 终端里的 Z-Library。
Search, download, and send books to Kindle or WeRead. Or hand it to Claude Code and Codex. 搜书、下载、发送到 Kindle 或微信读书,也能交给 Claude Code 和 Codex。
brew install heartleo/tap/zlib-cli
- macOS
- Linux
- Windows
Install in one line. 一行命令安装。
macOS, Linux, and Windows. zlib update keeps it current.
支持 macOS、Linux 和 Windows,之后用 zlib update 更新。
brew install heartleo/tap/zlib-cli
macOS and Linux.macOS 和 Linux。
winget install --id heartleo.zlib --exact
Windows.Windows。
curl -fsSL https://raw.githubusercontent.com/heartleo/zlib/main/install.sh | sh
macOS and Linux. Installs to /usr/local/bin; may ask for sudo.macOS 和 Linux。安装到 /usr/local/bin,可能需要 sudo。
go install github.com/heartleo/zlib/cmd/zlib@latest
Any system with Go 1.26 or later.任意系统,需要 Go 1.26 或更高版本。
$ git clone https://github.com/heartleo/zlib $ cd zlib $ go build -o zlib ./cmd/zlib
Any system with Go 1.26 or later.任意系统,需要 Go 1.26 或更高版本。
- Find a working domain:
zlib doctor找出可用域名:zlib doctor - Log in:
zlib login --domain <domain>登录:zlib login --domain <domain> - Start:
zlib tui开始使用:zlib tui
One app for all of it. 一个界面,用上全部功能。
zlib tui puts search, downloads, history, Kindle, WeRead and settings in one terminal app.
zlib tui 把搜索、下载、历史、Kindle、微信读书和设置放进同一个终端应用。
- /Open the commands打开命令
- ↑↓Choose选择
- seType to filter输入即可筛选
- EnterRun it运行
- EscGo back; lists keep your place返回,列表保留当前位置
One command per task. 每件事一条命令。
Run any of them on its own. Add --json for scripts.
也可以单独运行其中任一命令。写脚本时加 --json。
Hand it to your agent. 交给你的 Agent。
Run zlib login yourself, so your password stays out of the chat.
自己运行 zlib login,别把密码发进对话。
Plugin插件
/plugin marketplace add heartleo/zlib /plugin install zlib@zlib-plugin-cc
MCP serverMCP 服务器
$ claude mcp add zlib -- zlib mcp
Plugin插件
$ codex plugin marketplace add heartleo/zlib $ codex plugin add zlib@zlib
MCP serverMCP 服务器
$ codex mcp add zlib -- zlib mcp
Then ask for a book by name. Add --read-only to zlib mcp to hide downloads, Kindle and WeRead.
之后告诉它书名即可。给 zlib mcp 加上 --read-only,会隐藏下载,以及发送到 Kindle 和微信读书的功能。
Pass one to zlib login --domain.
把其中一个传给 zlib login --domain。
Can’t connect? 连不上?
Run zlib doctor to list the domains that work from your network. Have your own mirror? Run zlib mirrors add <domain>.
运行 zlib doctor,列出你的网络能访问的域名。有自己的镜像?运行 zlib mirrors add <domain>。
Pick a theme. 选个主题。
Preview and choose with zlib theme.
用 zlib theme 预览并选择。