Guide · Agent skill
How to use the Calibre E-book Library CLI agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The cli-anything-calibre skill teaches an AI agent to work with a Calibre e-book library through a command-line tool. Once it is installed, you can ask the agent in plain language to list or search books, edit metadata, convert formats, export files or generate catalogs. This guide covers what the skill does, how to install it, how to trigger it, the requirements, and the safety points to check before letting it change your library.
Quick start
- 1Install Calibre and Python 3.10+. Install Calibre with your system package manager, then confirm Python 3.10 or newer is available. Check that calibredb, ebook-convert and ebook-meta are on your PATH.
- 2Back up your library. Copy your Calibre library folder somewhere safe before the agent makes any changes, since edits, removals and format changes modify files directly.
- 3Install the CLI package. Run the pip install command from the CLI-Anything repository's calibre agent-harness folder to get the cli-anything-calibre command.
- 4Add the skill folder. Download the ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings, Capabilities, Skills in the Claude apps.
- 5Connect your library. Run cli-anything-calibre library connect with the path to your library, then run library info to confirm the book count and formats.
- 6Ask for a change in plain language. Request a read-only search first, check the matches, then ask the agent to make the specific edit or conversion you want.
What the skill lets the agent do
The skill wraps the real Calibre tools already on your computer: calibredb, ebook-convert and ebook-meta. Rather than reimplementing them, the CLI calls these tools and returns results in a structured form.
Commands are grouped into Library, Books, Meta, Formats, Custom columns and Catalog. Together they cover connecting to a library, listing and searching books, setting fields such as title, authors, tags, series and rating, converting between formats, exporting books or chapters, and generating a catalog in EPUB, CSV or OPDS.
- Library: connect to a library, show statistics, check integrity
- Books: list, search, add, remove, show, export, export chapters as PDF
- Meta: get, set and embed metadata
- Formats: list, add, remove and convert formats
- Custom: list, add, remove and set custom columns
- Catalog: generate a library catalog
Install the skill
There are two ways to add the skill as a folder of files. Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder to limit it to that project. In the Claude apps you can instead upload the ZIP under Settings, then Capabilities, then Skills.
The skill's own instructions also describe installing the CLI itself as a Python package from the CLI-Anything repository. Calibre must already be installed, because the CLI depends on it.
- Python 3.10 or newer is required.
- Calibre must be installed. The source gives sudo apt-get install calibre for Debian/Ubuntu and brew install --cask calibre for macOS.
- Confirm the tools are on your PATH with which calibredb, which ebook-convert and which ebook-meta.
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=calibre/agent-harnessConnect the CLI to your library
Point the CLI at your Calibre library folder once, and it saves the path for later sessions. You can also set the CALIBRE_LIBRARY environment variable, or pass the --library flag on each command. The skill's session state is stored in ~/.cli-anything-calibre/session.json.
Calling the CLI with no subcommand opens an interactive session with tab-completion and history. Type help to list commands and quit or exit to leave.
cli-anything-calibre library connect ~/Calibre\ Library
cli-anything-calibre library info
cli-anything-calibre --json books listHow to trigger the skill with natural requests
You do not need to type commands yourself. Once the skill is installed, ask the agent for an outcome in plain language, and name Calibre so it knows which tool to use. Mention the book, author, tag or format you care about, and say what should change.
Good requests are specific about the scope. Before any change, ask the agent to list or search first, so you can confirm which books it will touch.
- Find every book by Asimov tagged scifi in my Calibre library and list the titles.
- Set the rating to 5 and series to Foundation for book 42, then show me its metadata.
- Convert book 42 from EPUB to MOBI and tell me where the file is.
- Export each chapter of book 42 as a PDF into ./pdfs, using only chapters 1 to 5.
Search and edit metadata safely
Searches use the Calibre query language. Common patterns include author:, title:, tags:, rating:>3, series:, pubdate: date ranges, identifiers:isbn: and has:cover. You can combine them with and, and negate with not:.
Metadata edits change the book itself. The source lists meta set for single fields, meta embed to write metadata into book files, and books remove, which either moves books to the trash or deletes them permanently. Check the results with show or meta get afterwards.
- Key fields include title, authors, tags, series, series_index, rating (1 to 5), publisher, pubdate, comments, languages and identifiers.
- Use --json when you want the agent to parse output.
cli-anything-calibre books search "author:asimov and tags:scifi"
cli-anything-calibre meta set 42 series "Foundation"
cli-anything-calibre meta set 42 series_index 1
cli-anything-calibre meta set 42 rating 5Convert formats and export chapters
Conversion uses ebook-convert underneath. Supported inputs in the source include EPUB, MOBI, AZW, AZW3, PDF, HTML, DOCX, ODT, FB2, TXT, RTF and LIT. Supported conversion outputs include EPUB, MOBI, AZW3, PDF, HTML, DOCX and TXT.
Chapter export only works on EPUB files, so convert the book to EPUB first if it is in another format. Each chapter is written as a separate PDF.
cli-anything-calibre formats convert 42 EPUB MOBI
cli-anything-calibre formats convert 42 EPUB PDF --output /tmp/book.pdf
cli-anything-calibre books export-chapters 42 --to-dir ./pdfs --chapters 1-5Safety, back-ups and tips
The skill runs scripts on your machine and the item's listing says it does not use the network. Metadata edits, removals and format changes modify files directly, so back up your Calibre library before the agent runs anything that writes to it. Run a check with the library check command first to confirm the library is in good shape.
For agent use, the source recommends always using --json, checking return codes (0 means success), parsing stderr on failure, and verifying that output files exist after exports or conversions.
- Back up the library folder before bulk edits or removals.
- Start with read-only commands such as list, search and show.
- Use --json and check return codes when scripting.
- Verify output files exist after export or conversion.
- Calibre must be closed or the library accessed only through these tools if you see conflicts; the source does not cover this, so check Calibre's own guidance.
What people use it for
- Cleaning up series names, series numbers and tags across many books in a large local library.
- Finding all books by an author or with a given rating using Calibre query language.
- Converting an EPUB to MOBI or PDF with a repeatable command that a script can rerun.
- Exporting each chapter of an EPUB as a separate PDF for reading or printing.
- Generating a catalog of the library in EPUB, CSV or OPDS form.
Frequently asked questions
Is the cli-anything-calibre skill free to use?
The source does not state a licence fee or price. The item is listed under the Apache-2.0 licence, and Calibre must be installed on your computer as a separate requirement.
What do I need before installing the skill?
You need Python 3.10 or newer, Calibre installed on your system, and calibredb, ebook-convert and ebook-meta available on your PATH. You also need a local Calibre library directory.
How do I install the Calibre agent skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use or a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings, Capabilities, Skills.
Why does the skill fail with a missing command error?
The skill calls calibredb, ebook-convert and ebook-meta, so it will not work if they are missing. Run which calibredb, which ebook-convert and which ebook-meta to confirm each one is on your PATH, and install Calibre if not.
Can the agent damage my library?
It can. Metadata edits, removals and format changes modify files directly, and removal either moves books to the trash or deletes them permanently. Back up your library first and ask the agent to search or list before making changes.
How does it compare with using Calibre's GUI or calibredb directly?
The skill lets an AI agent drive Calibre's command-line tools from natural requests and returns structured JSON. The source does not compare it with other tools, so if you prefer to click through a visual interface or run calibredb commands yourself, the GUI or the raw tools may suit you better.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits people with a large local Calibre library who want an agent to clean up metadata in bulk or run repeatable format conversions, and developers who need JSON output from Calibre. It is not for anyone without Calibre installed or anyone who has not backed up their library, because it writes changes straight to files.
Download the skill