CALIBREDB(1) calibre CALIBREDB(1) NAME calibredb - calibredb calibredb command [options] [arguments] calibredb is the command line interface to the calibre database. It has several sub-commands, documented below. calibredb can be used to manipulate either a calibre database specified by path or a calibre Content server running either on the local machine or over the internet. You can start a calibre Content server using either the calibre-server program or in the main calibre program click Connect/share -> Start Content server. Since calibredb can make changes to your calibre libraries, you must setup authentication on the server first. There are two ways to do that: o If you plan to connect only to a server running on the same computer, you can simply use the --enable-local-write option of the Content server, to allow any program, including calibredb, running on the local computer to make changes to your calibre data. When running the server from the main calibre program, this option is in Preferences->Sharing over the net->Advanced. Be careful though, because some browsers, primarily Firefox, allow arbitrary websites to also access local servers. If you use Firefox, it is better to setup username and password, as described below. Local Network Access restriction has still not been implemented as of Firefox v149. o If you want to enable access over the internet, then you should setup user accounts on the server and use the --username and --password options to calibredb to give it access. You can setup user authentication for calibre-server by using the --enable-auth option and using --manage-users to create the user accounts. If you are running the server from the main calibre program, use Preferences->Sharing over the net->Require username/password. To connect to a running Content server, pass the URL of the server to the --with-library option, see the documentation of that option for details and examples. o ENIKE EIOE o list o add o POHKH AO AKEOY o remove o add_format o remove_format o show_metadata o set_metadata o export o catalog o EPUB EIOE o saved_searches o add_custom_column o custom_columns o remove_custom_column o set_custom o restore_database o check_library o list_categories o backup_metadata o clone o embed_metadata o search o fts_index o fts_search ENIKE EIOE --help, -h E o o oo --library-path, --with-library Path to the calibre library. Default is to use the path stored in the settings. You can also connect to a calibre Content server to perform actions on remote libraries. To do so use a URL of the form: for example, . library_id is the library id of the library you want to connect to on the Content server. You can use the special library_id value of - to get a list of library ids available on the server. For details on how to setup access via a Content server, see . --password K o oo calibre. o oo, oo : . o o, oo: ( oooo o o o o >). O , oo o shell . --timeout O o o, , o calibre o. H oo o . --username o o o calibre --version o o o oo LIST calibredb list [options] K o o calibre. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --ascending T o o --fields, -f T o o o. . : author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, template, timestamp, title, uuid oo: title,authors. To o "all" o oo o . E , oo *field_name, , ooo o #rating, oo o o: *rating --for-machine o oo o JSON, oo o . o o o . --limit O o o o o. E oo: --line-width, -w To o o o oo. A oo o o o. --prefix To o . H oo o o o o. --search, -s o o . o o o , o Eo X. oo --separator H oo o oo . o o o. --sort-by To o o ooo oo o. Mo o o o . : author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, template, timestamp, title, uuid oo: id. E , oo *field_name, , ooo o #rating, oo o o: *rating --template To o o o "template" . oo o calibre. oo: K --template_file, -t o o o o o o "template" . oo: K --template_heading E oo. oo: template. A o o o o --for-machine. ADD calibredb add [options] file1 file2 file3 ... o o o. Mo o o. o o, . Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --authors, -a Ko o o() o o --automerge, -m A o oo o , o () o . H <<>> o o oo. H <<>> o o o o o o. H <<_>> o o oo o. --cover, -c o o o o oo o o o o --duplicates, -d o o o . H o . o --automerge o. --empty, -e o o (E o o) --identifier, -I O o o, .. -I asin:XXX -I isbn:YYY --isbn, -i Ko ISBN o o() o o --languages, -l oo o o ( ooo o ISO639, o o oo o) --series, -s Ko o oo o ( o ). --series-index, -S Ko o o oo o ( o ). --tags, -T Ko o o() o o --title, -t Ko o o o oo o() POHKH AO AKEOY Eo o o o o. E oo, o o oo o o. --add o oo o (glob). T o ooo o o o o o oo, o o o oo o. Mo o o o o . --ignore oo (glob) oo o, o o o oo oo . Mo o o o o o. : *.pdf o PDF --one-book-per-directory, -1 N oo o o o o o o o o. --recurse, -r K' REMOVE calibredb remove ids A o o ids o. T ids id o (o o o id oo o search). , 23,34,57-85 ( oo o, o o o o ). Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --permanent M oo o Ko ADD_FORMAT calibredb add_format [options] id ebook_file o o o o o o ebook o o o o o oo o id. Mo o id oo o . A o , , o o .. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --as-extra-data-file o o o o o o o o, o oo o --dont-replace N o o o o REMOVE_FORMAT calibredb remove_format [options] id fmt A o fmt o o o o o id. Mo o id oo o search. fmt o LRF TXT EPUB. A o o o o o fmt, o. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" SHOW_METADATA calibredb show_metadata [options] id E o o oo o o Calibre o o o o id. To id o o . Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --as-opf E o o OPF (XML) SET_METADATA calibredb set_metadata [options] book_id [/path/to/metadata.opf] O o o oo o calibre o o o oo book_id o o OPF metadata.opf. To book_id id o o o o . Mo o o o OPF oo o --as-opf o show_metadata. Mo o o o o --field. A oo o --field, o o OPF. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --field, -f To o o. H o field_name:value, : --field tags:tag1,tag2. Xoo --list-fields o . Mo o o o o o o . : oo o o ISO639 (.. en A, fr ..). , --field identifiers:isbn:XXXX,doi:YYYYY. o (/) oo true false yes no. --list-fields, -l K o o o oo ooo o --field EXPORT calibredb export [options] ids E o oo ids ( o ) o . H o o o o o, o o o o ( o OPF). Aoo o o o o o. Mo o id o . Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --all E o, o ids. --dont-asciiize Have calibre convert all non English characters into English equivalents for the file names. This is useful if saving to a legacy filesystem without full support for Unicode filenames. H o o o . --dont-save-cover Ko, o calibre o o o o, . H o o o . --dont-save-extra-files Save any data files associated with the book when saving the book H o o o . --dont-update-metadata Ko, o calibre o o o , o o o. A o o. H o o o . --dont-write-opf Ko, o calibre o o OPF . H o o o . --formats o oo o o oo o. oo oo o o. --progress Ao oo --replace-whitespace A . --single-dir E o o o --template The template to control the filename and folder structure of the saved files. Default is "{author_sort}/{title}/{title} - {authors}" which will save books into a per-author subfolder with filenames containing title and author. Available controls are: {author_sort, authors, id, isbn, languages, last_modified, pages, pubdate, publisher, rating, series, series_index, tags, timestamp, title} --timefmt H o oo o o o. %d - , %b - , %m - , %Y - o. H oo : %b, %Y --to-dir E o oo o. E oo . --to-lowercase Mo o . CATALOG calibredb catalog /path/to/destination.(csv|epub|mobi|xml...) [options] E o o o o path/to/destination . O o o o o oo o o o. o o oo o o o. o o, o o o o o o o --help. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --ids, -i o o oo. A , o --search o. oo: --search, -s o o . o o o , o Eo X. oo: --verbose, -v o o oo. Xo o. EPUB EIOE --catalog-title Title of generated catalog used as title in metadata. Default: 'My Books' Applies to: AZW3, EPUB, MOBI output formats --cross-reference-authors Create cross-references in Authors section for books with multiple authors. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats --debug-pipeline Save the output from different stages of the conversion pipeline to the specified folder. Useful if you are unsure at which stage of the conversion process a bug is occurring. Default: 'None' Applies to: AZW3, EPUB, MOBI output formats --exclude-genre Regex describing tags to exclude as genres. Default: '[.+]|^+$' excludes bracketed tags, e.g. '[Project Gutenberg]', and '+', the default tag for read books. Applies to: AZW3, EPUB, MOBI output formats --exclusion-rules Specifies the rules used to exclude books from the generated catalog. The model for an exclusion rule is either ('','Tags','') or ('','',''). For example: (('Archived books','#status','Archived'),) will exclude a book with a value of 'Archived' in the custom column 'status'. When multiple rules are defined, all rules will be applied. Default: "(('Catalogs','Tags','Catalog'),)" Applies to: AZW3, EPUB, MOBI output formats --generate-authors Include 'Authors' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats --generate-descriptions Include 'Descriptions' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats --generate-genres Include 'Genres' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats --generate-recently-added Include 'Recently Added' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats --generate-series Include 'Series' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats --generate-titles Include 'Titles' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats --genre-source-field Source field for 'Genres' section. Default: 'E' Applies to: AZW3, EPUB, MOBI output formats --header-note-source-field Custom field containing note text to insert in Description header. Default: '' Applies to: AZW3, EPUB, MOBI output formats --merge-comments-rule #:[before|after]:[True|False] specifying: Custom field containing notes to merge with comments [before|after] Placement of notes with respect to comments [True|False] - A horizontal rule is inserted between notes and comments Default: '::' Applies to: AZW3, EPUB, MOBI output formats --output-profile Specifies the output profile. In some cases, an output profile is required to optimize the catalog for the device. For example, 'kindle' or 'kindle_dx' creates a structured Table of Contents with Sections and Articles. Default: 'None' Applies to: AZW3, EPUB, MOBI output formats --prefix-rules Specifies the rules used to include prefixes indicating read books, wishlist items and other user-specified prefixes. The model for a prefix rule is ('','','',''). When multiple rules are defined, the first matching rule will be used. Default: "(('Read books','tags','+','\/'),('Wishlist item','tags','Wishlist','x'))" Applies to: AZW3, EPUB, MOBI output formats --preset Use a named preset created with the GUI catalog builder. A preset specifies all settings for building a catalog. Default: 'None' Applies to: AZW3, EPUB, MOBI output formats --thumb-width Size hint (in inches) for book covers in catalog. Range: 1.0 - 2.0 Default: '1.0' Applies to: AZW3, EPUB, MOBI output formats --use-existing-cover Replace existing cover when generating the catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats SAVED_SEARCHES calibredb saved_searches [options] (list|add|remove) o o o o. A o o o o , . o: calibredb saved_searches add search_name search_expression : calibredb saved_searches remove search_name Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" ADD_CUSTOM_COLUMN calibredb add_custom_column [options] label name datatype o oo . label o o . . name o o o . datatype : bool, comments, composite, datetime, enumeration, float, int, rating, series, text Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --display o oo o o o . oo JSON. , oo --display"{\ "enum_values\ ":[\ "val1\ ", \ "val2\ "]}" Yo o o o oo o . O o o : composite: composite_template, composite_sort, make_category,contains_html, use_decorations datetime: date_format enumeration: enum_values, enum_colors, use_decorations int, float: number_format text: is_names, use_decorations O o o o o o o oo o o o o GUI o OPF o ( o o OPF o o ). o JSON o "display" o OPF. --is-multiple oo o o ( o o o ). B o o o o o o. CUSTOM_COLUMNS calibredb custom_columns [options] oo . E . Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --details, -d oo o . REMOVE_CUSTOM_COLUMN calibredb remove_custom_column [options] label A oo o oo . Mo o custom_columns. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --force, -f N SET_CUSTOM calibredb set_custom [options] column id value O oo o o o oo o id. Mo ids oo o . Mo o oo oo custom_columns o. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --append, -a A oo o , oo o o o o. RESTORE_DATABASE calibredb restore_database [options] E o o o oo OPF o o calibre. A o o o metadata.db . POEIOOIHH: A o o o . o , o , plugboards, o o o oo o. T o o o o o OPF. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --really-do-it, -r K . H o o o. CHECK_LIBRARY calibredb check_library [options] E oo o o o o o. O o invalid_titles, extra_titles, invalid_authors, extra_authors, missing_formats, extra_formats, extra_files, missing_covers, extra_covers, malformed_formats, malformed_paths, failed_folders Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --csv, -c E CSV --ignore_extensions, -e o oo. oo: --ignore_names, -n o o oo. oo: --report, -r o. oo: --vacuum-fts-db o o o o. A o o , o o o o. LIST_CATEGORIES calibredb list_categories [options] o oo o o. O oo oo o o o E. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --categories, -r oo o o. oo: --csv, -c E CSV --dialect O o o o CSV o o. Eo: excel, excel-tab, unix --item_count, -i E o o o o o --width, -w To o o o oo. A oo o o o. BACKUP_METADATA calibredb backup_metadata [options] o o o o o o OPF o . A , o o o o OPF, o --all. : o o , OPF oo . , o o o o. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --all Ko, o o o o OPF. M o . CLONE calibredb clone path/to/new/library o o o o. A o , o o oo , o o o o. H oo o o. E o o, o , oo o o o o o. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" EMBED_METADATA calibredb embed_metadata [options] book_id E o o oo o calibre o o o calibre. Ko, o o o o calibre, o o o. o o oo o o o. Mo oo 'all' o book_id o . Mo o o . : calibredb embed_metadata 1 2 10-15 23 Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --only-formats, -f E o o o o. Ko o o o o o. A oo, o o o. SEARCH calibredb search [options] search expression A o o oo o , o o o . H o o ooo o o o o oo. H o oo o calibre, : calibredb search author:asimov 'title:"i robot"' Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --limit, -l O o o o . H o o. FTS_INDEX calibredb fts_index [options] enable/disable/status/reindex o o o. enable Eoo K o disable Aoo K o status E o reindex Mo oo o o. o , o o o o reindex. E oo o o. Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --indexing-speed H . Xoo o 'o' o oo o o o o oo '' o o o. '' . --wait-for-completion o , o o oo FTS_SEARCH calibredb fts_search [options] search expression oo o o o o oo . Whenever you pass arguments to calibredb that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces" --do-not-match-on-related-words T o . , . --include-snippets o o o o. o o . --indexing-threshold o o o o o , oo. oo 90 --match-end-marker O o oo o o o --match-start-marker O o oo o --output-format H o oo o o . E "text" o "json" oo JSON. --restrict-to o o o, oo ids. : ids:1,2,3 o ids search:tag:foo o o o foo. Author Kovid Goyal Copyright Kovid Goyal 9.14.0 Aoo 28, 2026 CALIBREDB(1)