About Zlib
zlib is an open source command line client for Z Library, built for the terminal and for AI coding agents. It lets a user search the catalogue, download a file by ID and mail it to a Kindle address without leaving the shell. It is written in Go as a single module, licensed under MIT, and ships prebuilt binaries for macOS, Linux and Windows.
The tool has eight subcommands. Login signs in and pins a working domain, search lets users browse results with the keyboard, download fetches a book with live progress, history re downloads earlier files, profile shows the remaining daily download quota, kindle sends a file to a Kindle email address, doctor probes the available mirrors before one is chosen, and theme switches between seven color palettes. The search, history, profile and doctor commands accept a JSON flag, so the same tool works by hand and in scripts.
The AI angle is a pair of plugins for Claude Code and Codex. The agent calls the same binary and reads the same JSON output, so a user can ask for a book by name and have it searched, downloaded and forwarded. Installation is through Homebrew, winget, a curl install script, go install or a build from source, and the interface is available in English and Chinese.
It is aimed at developers and heavy readers who prefer a scriptable workflow. The tool is free to use. Access to the underlying Z Library service and its download quota is governed by that service, and the project site publishes no paid plans.