A CLI for Z‑Library. 终端里的 Z‑Library
Search the catalogue, download the file, and mail it to your Kindle without leaving the terminal. 搜书、下载、寄到 Kindle,全程不用离开终端。
brew install heartleo/tap/zlib
Pick a package manager. 挑一个包管理器。
Every release ships prebuilt binaries for macOS, Linux, and Windows. Or build it yourself; it is a single Go module. 每个版本都发 macOS、Linux、Windows 的预编译二进制。也可以自己编译,就一个 Go module。
brew install heartleo/tap/zlib
macOS and Linux. Upgrades with brew upgrade zlib.macOS 和 Linux。用 brew upgrade zlib 升级。
winget install heartleo.zlib
Windows 10 and later, PowerShell or Terminal.Windows 10 及以上,PowerShell 或 Terminal 都行。
curl -fsSL https://raw.githubusercontent.com/heartleo/zlib/main/install.sh | sh
Detects your OS and architecture, then drops the binary on your PATH.自动识别系统和架构,把二进制放进 PATH。
go install github.com/heartleo/zlib/cmd/zlib@latest
Requires Go 1.25 or later.需要 Go 1.25 及以上。
$ git clone https://github.com/heartleo/zlib $ cd zlib $ go build -o zlib ./cmd/zlib
It builds with the standard Go toolchain. make test runs the suite.用标准 Go 工具链就能编译。make test 跑测试。
Eight subcommands, all scriptable. 八条子命令,都能写进脚本。
search, history, profile, and doctor each take --json, so the same tool works by hand and inside a script. Pick one to see what it prints. search、history、profile、doctor 都支持 --json,手敲和写脚本用的是同一个工具。点一条看它输出什么。
Hand it to your coding agent. 交给你的编码 agent。
zlib ships plugins for Claude Code and Codex. The agent calls the same binary you do, and reads the same --json output. zlib 自带 Claude Code 和 Codex 插件。Agent 调用的是同一个二进制,读的是同一份 --json 输出。
Claude Code
Install the marketplace, then ask for a book by name.装上 marketplace,然后直接报书名。
/plugin marketplace add heartleo/zlib /plugin install zlib@zlib-plugin-cc
/zlib "the pragmatic programmer" searches and downloads. /zlib:kindle sends it on./zlib "the pragmatic programmer" 搜索并下载,/zlib:kindle 转寄 Kindle。
Codex
A skills-only plugin, so there is no MCP server to keep running.纯 skills 插件,不需要常驻 MCP server。
$ codex plugin marketplace add heartleo/zlib $ codex plugin add zlib@zlib
Ask Codex to find a title, or point the bundled Kindle skill at a local file.让 Codex 找书,或者把自带的 Kindle skill 指向本地文件。
When the mirror fights back. 镜像站不让进的时候。
Most Z-Library web domains now sit behind DiamWall. Run doctor first: it checks every known mirror without logging you in or touching your saved session, and tells you which ones still answer. 现在大多数 Z-Library 网页域名都挂在 DiamWall 后面。先跑 doctor。它不用登录,也不动你已经存好的会话,把所有已知镜像探一遍,然后告诉你哪些还能用。
Set one, or follow the terminal. 选一套,或者跟着终端走。
These are the palettes your editor probably already uses, and zlib theme auto reads your terminal background to choose between them. This page is set in two: latte in light, mocha in dark. 这些配色你的编辑器多半已经在用了,zlib theme auto 会读终端背景色自己挑。这个页面用了其中两套:亮色 latte,暗色 mocha。