/cli-anything-calibre
Command-line interface for Calibre - A stateful CLI harness for e-book library management, metadata editing, and format conversion wrapping the real Calibre tools (calibredb, ebook-convert, ebook-meta)...
$ npx -y skills add HKUDS/CLI-Anything --skill cli-anything-calibre --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/cli-anything-calibre
Context preview
The summary Claude sees to decide when to auto-load this skill.
Command-line interface for Calibre - A stateful CLI harness for e-book library management, metadata editing, and format conversion wrapping the real Calibre tools (calibredb, ebook-convert, ebook-meta)...
SKILL.md
cli-anything-calibre.SKILL.mdname: "cli-anything-calibre"
description: >-
Command-line interface for Calibre - A stateful CLI harness for e-book library management, metadata editing, and format conversion wrapping the real Calibre tools (calibredb, ebook-convert, ebook-meta)...
cli-anything-calibre
A stateful CLI harness for Calibre e-book management. Wraps the real Calibre tools (`calibredb`, `ebook-convert`, `ebook-meta`) to give AI agents and scripts a clean, structured interface for library operations, metadata editing, and format conversion.
Installation
This CLI is installed as part of the cli-anything-calibre package:
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=calibre/agent-harness
**Prerequisites:**
- Python 3.10+
- Calibre must be installed on your system (hard dependency)
# Debian/Ubuntu
sudo apt-get install calibre
# macOS
brew install --cask calibre
# Verify tools are in PATH
which calibredb
which ebook-convert
which ebook-meta
Usage
Basic Commands
# Show help
cli-anything-calibre --help
# Start interactive REPL mode
cli-anything-calibre
# Connect to a Calibre library
cli-anything-calibre library connect ~/Calibre\ Library
# Run with JSON output (for agent consumption)
cli-anything-calibre --json books list
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-calibre
# Enter commands interactively with tab-completion and history
# Use 'help' to see available commands
# Use 'quit' or 'exit' to leave
Command Groups
Library
Library management commands.
| Command | Description | |---------|-------------| | `connect <path>` | Set active library path | | `info` | Show library statistics (book count, formats, db size) | | `check` | Verify library integrity using calibredb check_library |
Books
Book operations (wrap `calibredb`).
| Command | Description | |---------|-------------| | `list` | List books with filtering and sorting | | `search <query>` | Search using Calibre query language | | `add <files>` | Add book files to library | | `remove <ids>` | Remove books (move to trash or permanent delete) | | `show <id>` | Show full metadata for a book | | `export <ids>` | Export books to directory | | `export-chapters <id>` | Export each chapter as separate PDF (requires EPUB format) |
Meta
Metadata editing (wrap `calibredb set_metadata`).
| Command | Description | |---------|-------------| | `get <id> [field]` | Get metadata (all or specific field) | | `set <id> <field> <value>` | Set a metadata field | | `embed <ids>` | Embed metadata into book files |
Formats
Format management (wrap `calibredb` + `ebook-convert`).
| Command | Description | |---------|-------------| | `list <id>` | List available formats for a book | | `add <id> <file>` | Add a format to a book | | `remove <id> <fmt>` | Remove a format from a book | | `convert <id> <input_fmt> <output_fmt>` | Convert book format |
Custom
Custom columns (wrap `calibredb`).
| Command | Description | |---------|-------------| | `list` | List all custom columns | | `add <label> <name> <type>` | Create custom column | | `remove <label>` | Delete custom column | | `set <id> <label> <value>` | Set custom field value |
Catalog
Catalog generation.
| Command | Description | |---------|-------------| | `catalog <output>` | Generate a catalog of the library (EPUB, CSV, or OPDS) |
Examples
Connect and List Books
Connect to your Calibre library and list books.
cli-anything-calibre library connect ~/Calibre\ Library
cli-anything-calibre books list
# Or with JSON output
cli-anything-calibre --json books list --search "author:asimov"
Search and Filter
Search books using Calibre query language.
cli-anything-calibre books search "title:Foundation"
cli-anything-calibre books search "author:asimov and tags:scifi"
cli-anything-calibre books search "rating:>3"
Metadata Editing
Set metadata fields on books.
cli-anything-calibre meta set 42 title "New Title"
cli-anything-calibre meta set 42 series "Foundation"
cli-anything-calibre meta set 42 series_index 1
cli-anything-calibre meta set 42 tags "scifi,classic"
cli-anything-calibre meta set 42 rating 5
Format Conversion
Convert between e-book formats.
cli-anything-calibre formats convert 42 EPUB MOBI
cli-anything-calibre formats convert 42 EPUB PDF --output /tmp/book.pdf
Export Chapters as PDFs
Export each chapter of an EPUB as a separate PDF file.
cli-anything-calibre books export-chapters 42 --to-dir ./pdfs
cli-anything-calibre books export-chapters 42 --to-dir ./pdfs --chapters 1-5
Calibre Query Language
Used with `books search` and `books list --search`:
author:asimov # Author contains "asimov"
title:"Foundation" # Title phrase
tags:fiction # Tag match
rating:>3 # Rating greater than 3
series:"Foundation" # Series match
pubdate:[2020-01-01,2021-12-31] # Date range
identifiers:isbn:1234567890 # Specific identifier
has:cover # Has cover image
not:tags:fiction # Negation
author:asimov and tags:scifi # Boolean AND
Key Metadata Fields
| Field | Type | Description | |-------|------|-------------| | `title` | text | Book title | | `authors` | text | Author names (&-separated) | | `tags` | text | Comma-separated tags | | `series` | text | Series name | | `series_index` | float | Position in series | | `rating` | float | Rating 1-5 | | `publisher` | text | Publisher name | | `pubdate` | datetime | Publication date | | `comments` | text | Description/comments | | `languages` | text | Language codes | | `identifiers` | text | ISBN, ASIN, etc. (`type:value`) |
Supported Formats
**Input:** EPUB, MOBI, AZW, AZW3, PDF, HTML, DOCX, ODT, FB2, TXT, RTF, LIT, and more
**O
Read more
name: "cli-anything-calibre" description: >- Command-line interface for Calibre - A stateful CLI harness for e-book library management, metadata editing, and format conversion wrapping the real Calibre tools (calibredb, ebook-convert, ebook-meta)...
cli-anything-calibre
A stateful CLI harness for Calibre e-book management. Wraps the real Calibre tools (`calibredb`, `ebook-convert`, `ebook-meta`) to give AI agents and scripts a clean, structured interface for library operations, metadata editing, and format conversion.
Installation
This CLI is installed as part of the cli-anything-calibre package:
pip install git+https://github.com/HKUDS/CLI-Anything.git#subdirectory=calibre/agent-harness
**Prerequisites:**
- Python 3.10+
- Calibre must be installed on your system (hard dependency)
# Debian/Ubuntu sudo apt-get install calibre # macOS brew install --cask calibre # Verify tools are in PATH which calibredb which ebook-convert which ebook-meta
Usage
Basic Commands
# Show help cli-anything-calibre --help # Start interactive REPL mode cli-anything-calibre # Connect to a Calibre library cli-anything-calibre library connect ~/Calibre\ Library # Run with JSON output (for agent consumption) cli-anything-calibre --json books list
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-calibre # Enter commands interactively with tab-completion and history # Use 'help' to see available commands # Use 'quit' or 'exit' to leave
Command Groups
Library
Library management commands.
| Command | Description | |---------|-------------| | `connect <path>` | Set active library path | | `info` | Show library statistics (book count, formats, db size) | | `check` | Verify library integrity using calibredb check_library |
Books
Book operations (wrap `calibredb`).
| Command | Description | |---------|-------------| | `list` | List books with filtering and sorting | | `search <query>` | Search using Calibre query language | | `add <files>` | Add book files to library | | `remove <ids>` | Remove books (move to trash or permanent delete) | | `show <id>` | Show full metadata for a book | | `export <ids>` | Export books to directory | | `export-chapters <id>` | Export each chapter as separate PDF (requires EPUB format) |
Meta
Metadata editing (wrap `calibredb set_metadata`).
| Command | Description | |---------|-------------| | `get <id> [field]` | Get metadata (all or specific field) | | `set <id> <field> <value>` | Set a metadata field | | `embed <ids>` | Embed metadata into book files |
Formats
Format management (wrap `calibredb` + `ebook-convert`).
| Command | Description | |---------|-------------| | `list <id>` | List available formats for a book | | `add <id> <file>` | Add a format to a book | | `remove <id> <fmt>` | Remove a format from a book | | `convert <id> <input_fmt> <output_fmt>` | Convert book format |
Custom
Custom columns (wrap `calibredb`).
| Command | Description | |---------|-------------| | `list` | List all custom columns | | `add <label> <name> <type>` | Create custom column | | `remove <label>` | Delete custom column | | `set <id> <label> <value>` | Set custom field value |
Catalog
Catalog generation.
| Command | Description | |---------|-------------| | `catalog <output>` | Generate a catalog of the library (EPUB, CSV, or OPDS) |
Examples
Connect and List Books
Connect to your Calibre library and list books.
cli-anything-calibre library connect ~/Calibre\ Library cli-anything-calibre books list # Or with JSON output cli-anything-calibre --json books list --search "author:asimov"
Search and Filter
Search books using Calibre query language.
cli-anything-calibre books search "title:Foundation" cli-anything-calibre books search "author:asimov and tags:scifi" cli-anything-calibre books search "rating:>3"
Metadata Editing
Set metadata fields on books.
cli-anything-calibre meta set 42 title "New Title" cli-anything-calibre meta set 42 series "Foundation" cli-anything-calibre meta set 42 series_index 1 cli-anything-calibre meta set 42 tags "scifi,classic" cli-anything-calibre meta set 42 rating 5
Format Conversion
Convert between e-book formats.
cli-anything-calibre formats convert 42 EPUB MOBI cli-anything-calibre formats convert 42 EPUB PDF --output /tmp/book.pdf
Export Chapters as PDFs
Export each chapter of an EPUB as a separate PDF file.
cli-anything-calibre books export-chapters 42 --to-dir ./pdfs cli-anything-calibre books export-chapters 42 --to-dir ./pdfs --chapters 1-5
Calibre Query Language
Used with `books search` and `books list --search`:
author:asimov # Author contains "asimov" title:"Foundation" # Title phrase tags:fiction # Tag match rating:>3 # Rating greater than 3 series:"Foundation" # Series match pubdate:[2020-01-01,2021-12-31] # Date range identifiers:isbn:1234567890 # Specific identifier has:cover # Has cover image not:tags:fiction # Negation author:asimov and tags:scifi # Boolean AND
Key Metadata Fields
| Field | Type | Description | |-------|------|-------------| | `title` | text | Book title | | `authors` | text | Author names (&-separated) | | `tags` | text | Comma-separated tags | | `series` | text | Series name | | `series_index` | float | Position in series | | `rating` | float | Rating 1-5 | | `publisher` | text | Publisher name | | `pubdate` | datetime | Publication date | | `comments` | text | Description/comments | | `languages` | text | Language codes | | `identifiers` | text | ISBN, ASIN, etc. (`type:value`) |
Supported Formats
**Input:** EPUB, MOBI, AZW, AZW3, PDF, HTML, DOCX, ODT, FB2, TXT, RTF, LIT, and more
**O
"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
Repo: HKUDS/CLI-Anything
Other skills on cli-anything.
- /cli-anything-firefly-iii
Firefly III CLI - Personal finance management via CLI-Anything
Open skill - /cli-anything-openrefine
Use OpenRefine through an agent-native CLI for importing messy data, applying JSON operation histories, inspecting rows, exporting cleaned data, and managing session undo/redo.
Open skill - /cli-anything-adguardhome
Command-line interface for AdGuard Home - Network-wide ad blocking and DNS management via AdGuard Home REST API. Designed for AI agents and power users who need to manage filtering, DNS rewrites, clients, DHCP, and query logs without a GUI.
Open skill - /cli-anything-anygen
Command-line interface for Anygen - A stateful command-line interface for AnyGen OpenAPI — generate professional slides, documents, webs...
Open skill - /cli-anything-audacity
Command-line interface for Audacity - A stateful command-line interface for audio editing, following the same patterns as the GIMP and Ble...
Open skill - /cli-anything-blender
Command-line interface for Blender - A stateful command-line interface for 3D scene editing, following the same patterns as the GIMP CLI ...
Open skill

