Cli Anything Calibre logo

Cli Anything Calibre

OrganizationPopular
HKUDS
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)...

Overview

PublisherHKUDS
RepositoryCLI-Anything
Skill namecli-anything-calibre
Stars
49.5K
Forks
4.6K
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by HKUDS on GitHub. Read the source before you install it.

Installation

Install the Cli Anything Calibre AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HKUDS/CLI-Anything.git /tmp/CLI-Anything
mkdir -p .claude/skills
cp -r /tmp/CLI-Anything/calibre/agent-harness/cli_anything/calibre/skills .claude/skills/cli-anything-calibre
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cli Anything Calibre in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cli Anything Calibre on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cli Anything Calibre is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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:

bash
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)
bash
# 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

bash
# 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:

bash
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.

CommandDescription
connect <path>Set active library path
infoShow library statistics (book count, formats, db size)
checkVerify library integrity using calibredb check_library

Books

Book operations (wrap calibredb).

CommandDescription
listList 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).

CommandDescription
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).

CommandDescription
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).

CommandDescription
listList 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.

CommandDescription
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.

bash
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.

bash
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.

bash
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.

bash
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.

bash
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

FieldTypeDescription
titletextBook title
authorstextAuthor names (&-separated)
tagstextComma-separated tags
seriestextSeries name
series_indexfloatPosition in series
ratingfloatRating 1-5
publishertextPublisher name
pubdatedatetimePublication date
commentstextDescription/comments
languagestextLanguage codes
identifierstextISBN, ASIN, etc. (type:value)

Supported Formats

Input: EPUB, MOBI, AZW, AZW3, PDF, HTML, DOCX, ODT, FB2, TXT, RTF, LIT, and more

Output (conversion): EPUB, MOBI, AZW3, PDF, HTML, DOCX, TXT, and more

State Management

The CLI maintains session state with:

  • Session file: ~/.cli-anything-calibre/session.json
  • Library path persistence: Active library is saved across sessions
  • Environment override: CALIBRE_LIBRARY environment variable

Output Formats

All commands support dual output modes:

  • Human-readable (default): Tables, colors, formatted text
  • Machine-readable (--json flag): Structured JSON for agent consumption
bash
# Human output
cli-anything-calibre books list

# JSON output for agents
cli-anything-calibre --json books list

For AI Agents

When using this CLI programmatically:

  1. Always use --json flag for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Verify outputs exist after export/conversion operations
  5. Use --library flag or CALIBRE_LIBRARY env to specify library path
  6. Chapter export requires EPUB format - convert first if needed

More Information

  • Full documentation: See README.md in the package
  • Architecture SOP: See CALIBRE.md in the agent-harness directory
  • Test coverage: See test_core.py and test_full_e2e.py in the tests directory
  • Methodology: See HARNESS.md in the cli-anything-plugin

Version

1.0.0

Frequently asked questions

What does the Cli Anything Calibre AI skill do?

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)...

Why use Cli Anything Calibre on TypingMind?

Because you install it once and use it with any model. Cli Anything Calibre is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cli Anything Calibre in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/HKUDS/CLI-Anything/tree/main/calibre/agent-harness/cli_anything/calibre/skills. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Cli Anything Calibre?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cli Anything Calibre?

As many as you like. As long as a model supports skills, you can use Cli Anything Calibre with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cli Anything Calibre AI skill free?

Yes. It is published on GitHub by HKUDS under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇