@yxl44: Holy crap!!! Someone finally turned the world's biggest book site into an AI Skill — letting AI Agents find and download books on their own! 📚 No more repeated searching, paging through, or hunting for download links on the Z-Library website. A single CLI tool handles the entire ebook workflow. Several features are extremely...
Summary
Someone open-sourced zlib — a Z-Library CLI tool built in Go that supports ebook search, downloading, Kindle/WeChat Read integration, and connects with AI Agents like Claude Code and Codex via Agent plugins and an MCP Server for end-to-end automated ebook workflows.
View Cached Full Text
Cached at: 11/23/26, 01:03 PM
Wow!!! Someone has finally turned the world’s largest book website into an AI Skill, letting AI Agents find and download books on their own! 📚 No more repeatedly searching, paging through, and hunting for download links on the Z-Library website.
A single CLI tool handles the entire e-book workflow.
Several features are really practical:
🔥 1. Powerful e-book search Search by title, author, or ISBN, with filters by year, language, and format.
🔥 2. One-stop book management Favorites, popular books, personalized recommendations, and download history — all manageable from the terminal.
🔥 3. Kindle and WeRead integration After downloading an e-book, you can send it directly to your Kindle or import it into your WeRead bookshelf.
🔥 4. Deep AI Agent integration This is the most noteworthy part! It supports Claude Code, Codex, Grok bot, and WorkBuddy. Through Agent Plugins and MCP Servers, AI Agents can call tools like book search. Going forward, having AI help you look up materials, find reference books, and organize your knowledge base — the entire workflow becomes much more automated.
🔥 5. Developer-friendly Built with Go, supporting macOS, Linux, and Windows. Provides CLI, TUI, and JSON output, and can plug into automation scripts.
What does this mean? AI Agents are evolving from merely chatting to genuinely calling tools, retrieving resources, and executing tasks. MCP, AI Agents, Claude Code, Codex — these ecosystems keep expanding. And zlib is a really interesting attempt.
GitHub open-source address: https://github.com/heartleo/zlib
Once AI Agents have their own book retrieval capabilities, do you think the next step will be a true AI personal knowledge base?
heartleo/zlib
Source: https://github.com/heartleo/zlib
A Z-Library CLI for you and your AI agents.
English | 简体中文
Install · Quick start · Terminal interface · Commands · Agent setup · Docs
Features
🔍 Search — filter by year, language, and format; sort results
📚 Browse — favorites, recommendations, popular books, and download history
📥 Download — view book details, choose a download directory
🖼️ Covers — show book covers in the terminal
🏷️ Metadata — look up and edit e-book metadata
📖 Send to Kindle — deliver files to your Kindle address
🌏 Send to WeRead — import books into your WeRead shelf
🕒 Profile — check your daily download quota
🎨 Themes — change the color theme
🌐 Network — check which mirrors work, trust your own mirror, or use a proxy
🤖 AI Agent Integration — integrate with Claude Code and Codex through Agent plugins
Install
macOS / Linux with Homebrew:
brew install heartleo/tap/zlib-cli
The Homebrew formula was renamed from
zlibtozlib-cli. Use the command above. The installed command is stillzlib.
macOS / Linux with the install script (installs to /usr/local/bin, may ask for sudo):
curl -fsSL https://raw.githubusercontent.com/heartleo/zlib/main/install.sh | sh
Windows with winget:
winget install --id heartleo.zlib --exact
Or download a binary from Releases and put it on your PATH. See Installation for Go installation, source builds, and upgrades.
Quick start
You need a Z-Library account. First, find a domain reachable from your network:
zlib doctor
Log in with a domain from the results. Replace the example URL below with one from your results; enter your email and password in the prompt:
zlib login --domain https://z-lib.gd
zlib tui
Press /, choose /search, enter a title, author, or ISBN, and press Ctrl+S. You can also type /search dune and press Enter. Select a book and press Enter to confirm the download. Downloads default to the current directory. You can choose another folder before downloading.
Login is saved locally; subsequent sessions only need zlib tui.
If no domain works or login fails, see Troubleshooting. Existing browser sessions can be imported as cookies.
Terminal interface
zlib tui opens one persistent shell. Every screen lists its keys at the bottom; these cover a first session:
| Key | Action |
|---|---|
/ | Open the command list: search, favorites, history, profile, metadata, settings, themes |
↑/↓ or j/k | Select a book |
←/→ | Previous or next page of results |
Enter | Download the selected book, after a confirmation |
Ctrl+F | Change the query and filters of the current search |
Esc | Go back |
/quit | Exit |
On a terminal with Kitty graphics or Sixel support, at least 100 columns by 20 rows, the selected book’s card shows its cover; other terminals show text only (Book covers).
/meta opens a file picker, then looks the chosen e-book up online and lets you review each field before writing it. It needs no login (E-book metadata).
Settings live under /config (network, downloads, search formats, metadata, Kindle, WeRead). See Terminal interface for every screen and key.
Commands
Pass a query for table output, or add --json for scripts:
zlib search "dune" --ext epub
zlib search "dune" --ext epub --json --count 10
| Task | Command |
|---|---|
| Browse favorites | zlib favorites |
| Browse recommendations | zlib recommended |
| Browse popular books | zlib most-popular |
| Browse download history | zlib history |
| Check account and quota | zlib profile |
| Send to Kindle | zlib kindle send ./book.epub |
| Send to WeRead | zlib weread import ./book.epub |
| Show a file’s metadata | zlib meta book.epub |
| Look up a file’s metadata | zlib meta book.epub --fetch |
| Edit a file’s metadata | zlib meta book.epub -t "Dune" -a "Frank Herbert" --rename |
To download, replace id:hash with a book’s complete id from the results:
zlib download "id:hash"
Run zlib --help for flags. Usage covers filters, pagination, and download options.
Agent setup
Install the plugin, or register the MCP server (zlib mcp). The plugin brings the skills and the MCP server. If zlib is missing, the skills install it on first use; the MCP server needs it on PATH.
Log in yourself with zlib login so your password stays out of chat.
Claude Code
Plugin:
/plugin marketplace add heartleo/zlib
/plugin install zlib@zlib-plugin-cc
Codex
Plugin:
codex plugin marketplace add heartleo/zlib
codex plugin add zlib@zlib
Grok
Plugin:
grok plugin marketplace add heartleo/zlib
grok plugin install zlib --trust
MCP server
Register zlib mcp as a local stdio server. zlib must be on PATH and signed in:
# Claude Code
claude mcp add -s user zlib -- zlib mcp
# Codex
codex mcp add zlib -- zlib mcp
# Grok
grok mcp add zlib -- zlib mcp
Add --read-only after mcp to hide download, history deletion, Kindle delivery, WeRead import and metadata editing.
See MCP server for other clients, flags, and tools.
Documentation
| Guide | Covers |
|---|---|
| Installation | Install methods, source builds, zlib update |
| Usage | Search, downloads, favorites, history |
| Terminal interface | Commands and keyboard controls |
| Book covers | Supported terminals, limits and cache |
| E-book metadata | Lookup sources, editing, renaming, formats |
| Configuration | Domains, proxies, folders, configuration paths |
| Themes | Available palettes and preview controls |
| Kindle | SMTP setup and delivery |
| WeRead | QR login and imports into WeRead |
| MCP server | Client setup, flags, and tools for zlib mcp |
| Troubleshooting | Login and network problems |
Report bugs in Issues with your zlib version, OS, command, and error. Omit passwords, cookies, and session files. Report security vulnerabilities privately as described in SECURITY.md.
Star History
Similar Articles
@fhwofjow51260: Z-Library Has Been Turned Into an AI Skill — Search, Download, and Import to WeChat Reading All in One Go! An Open-Source GitHub Project with 2.1K Stars, zlib Brings Z-Library Right Into Your Terminal, Supporting Search by Title, Author, and ISBN, with Filters for Language, …
The open-source GitHub project zlib (2.1K Stars) turns Z-Library into a command-line tool and AI Skill, supporting search by title, author, and ISBN, filtering by format and language, sending e-books directly to Kindle or importing them to WeChat Reading, and integrating with Claude Code and Codex via MCP and Skills.
@wangxiaoxin88: Ebook enthusiasts, take note: there's an open-source tool called zlib that lets you stuff Z-Library right into the comm…
介绍了一款名为 zlib 的开源命令行工具,可直接在终端中搜索、下载 Z-Library 电子书,支持 Kindle 推送、代理及自定义域名,并已集成 Claude Code 和 Codex 等 AI Agent。
@sitinme: Not just "have AI summarize a book", but go further: turning a book or a document package into a Skill that an AI Agent can repeatedly call. This idea is worth discussing. Previously, after buying and reading a book, when I later wanted to find a certain knowledge point, I couldn't find it after flipping through for a long time; asking AI might make things up; throwing the entire PD…
Introduces a tool called book-to-skill that converts books or document packages into AI Agent callable Skills. It supports PDF and other formats, generates SKILL.md and chapter indexes, avoiding loading the full context at once.
@0xMulight: The Ultimate Scraping Handbook for Claude Code: 5 Open-Source Skills to Make AI Actually Work on the Web
This article introduces 5 open-source tools (Agent-reach, Scrapling, Browser-use, Claude in Chrome, Web-access) that enable AI agents like Claude Code to perform web scraping, browser operations, etc., covering scenarios from lightweight to heavy-duty, along with configuration tips.
@laowangbabababa: This is absolutely incredible. Seriously, absolutely incredible. It can truly crawl anything, and it's blazing fast! Previously, I would ask Claude Code to search for something online, but the Twitter API costs money, web scraping requires subscriptions, and Bilibili and Xiaohongshu directly block you. Every platform has its own barrier — such a hassle. Agent-Reach, a free and open-source repository...
Agent-Reach is a free and open-source repository that, with a single command, gives AI agents access to 14 platforms, including web pages, YouTube, RSS, Bilibili, and Xiaohongshu, without complex configuration, significantly lowering the barrier for agents to go online.