calibredb
Manage and query Calibre libraries with the calibredb CLI (local paths or Calibre Content server URLs). Use when listing books, searching/filtering library records, reading/updating metadata, adding/removing formats, exporting books, maintaining custom columns, running library checks, managing FTS indexing/search, or creating catalogs/backups from a Calibre library.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- calibredb
- license
- MIT
- metadata
- { "tags": "calibre,ebooks,library-management,metadata,cli", "version": "0.1.0", "category": "Knowledge Management", "displayName": "CalibreDB" }
- description
- Manage and query Calibre libraries with the calibredb CLI (local paths or Calibre Content server URLs). Use when listing books, searching/filtering library records, reading/updating metadata, adding/removing formats, exporting books, maintaining custom columns, running library checks, managing FTS indexing/search, or creating catalogs/backups from a Calibre library.
- compatibility
- Codex, Claude Code, and other Agent Skills-compatible clients.
02 资源文件 4
- 资产文件assets/app-icon.png6.0 KB
- 参考文档references/command-matrix.md2.3 KB
- 参考文档references/safe-workflows.md1.4 KB
- 脚本scripts/list_books_json.py2.7 KB
03 SKILL.md 正文
CalibreDB
Use this skill for all command-line operations on Calibre libraries.
Library path
- Calibre library locations are user-specific. Identify the target library path or Content server URL before running commands.
- Prefer explicit path in every command:
--with-library "$CALIBRE_LIBRARY". - If the user has not provided a library path, ask for it or inspect the local environment for an existing Calibre library before proceeding.
- For machine-readable outputs, use
--for-machineor JSON-capable subcommands.
Safety model
Start with read-only operations, then escalate only when needed.
Read-only (safe by default)
listsearchshow_metadatacustom_columnslist_categoriescheck_libraryfts_searchfts_index status
Mutating (confirm intent for destructive/irreversible)
- Usually safe with clear intent:
add,set_metadata,set_custom,add_format,embed_metadata,backup_metadata - Confirm before destructive actions:
remove,remove_format,remove_custom_column,restore_database,fts_index reindexon full library
Core workflow
- Identify target library and set
--with-library. - Discover relevant book IDs with
search(orlist --search). - Inspect records with
show_metadataorlist --for-machine. - Apply minimal required mutations.
- Validate with follow-up
list/search/show_metadata.
Quick command patterns
1) List books
export CALIBRE_LIBRARY="/path/to/Calibre Library"
calibredb list --with-library "$CALIBRE_LIBRARY" --fields id,title,authors,formats --limit 20
Machine output:
calibredb list --with-library "$CALIBRE_LIBRARY" --fields id,title,authors,tags,formats --for-machine
2) Search and get IDs
calibredb search --with-library "$CALIBRE_LIBRARY" "title:python"
Use IDs in follow-up commands.
3) Show metadata
calibredb show_metadata --with-library "$CALIBRE_LIBRARY" 123
As OPF:
calibredb show_metadata --with-library "$CALIBRE_LIBRARY" --as-opf 123
4) Update metadata fields
calibredb set_metadata --with-library "$CALIBRE_LIBRARY" 123 \
--field title:"Example Book" \
--field tags:"python,reference"
5) Add/export books
calibredb add --with-library "$CALIBRE_LIBRARY" "/path/to/book.epub"
calibredb export --with-library "$CALIBRE_LIBRARY" 123 --to-dir "/tmp/export"
6) Library health check
calibredb check_library --with-library "$CALIBRE_LIBRARY"
Content server usage
To target a running Calibre Content server:
calibredb list --with-library "http://hostname:8080/#library_id" --username <user> --password <pass>
From docs: use special #- library id to list server libraries.
Security note: a literal --password <pass> value is passed as a process
argument and may be visible to other users on shared machines via
process-listing tools. Prefer --password '<stdin>' with the password piped
from a password manager, or --password '<f:/path/to/file>' with a 0600
credential file stored outside the repository. Prefer local or trusted hosts
for authenticated Content server commands, and redact credentials from shell
history, logs, and task transcripts.
Reference files
- Command matrix + options:
references/command-matrix.md - Safe operational playbooks:
references/safe-workflows.md
04 同仓库更多 Skills
zenifra
Use when the user wants to manage Zenifra projects, profiles, organizations, deployments, builds, authentication, or supported Git providers from Codex.
hyper-review
暂无简介
hyper-debate
暂无简介
hyper-cleanup
Use this skill when someone asks to clean up, delete, or consolidate code, tests, comments, or dead weight in a repository that already works, and the cleanup must not change behavior. It names each in-scope unit as a slop category or a keeper, walks a delete-reuse-platform-simplify ladder, locks behavior with a runnable baseline before the first edit, proves each test deletion or consolidation with a source mutation that is restored byte for byte, and writes a report under `.hyper/cleanup/`. Do not use for authoring new behavior, refactoring a public API, migrating dependencies, or formatting a whole repository.
graymatter-onboarding
Welcome a new GrayMatter user, complete first-use setup, demonstrate a useful save-and-recall result, or recover an interrupted connection. Use for getting started, activation, setup, and requests to make GrayMatter primary agent memory.
risk-xva
Run a trusted local ORE (Open Source Risk Engine) project for counterparty exposure and valuation adjustments (risk_xva), and read its XVA and exposure reports. Use for ORE CVA, DVA, funding and other XVA reports, or to produce the netting-set exposure profile that risk_exposure_profile summarises. Not for historical VaR (use risk-tail), not for SA-CCR (use risk-counterparty), and not for a project you have not inspected.