CLI Reference
BookLife provides CLI subcommands for setup and standalone operations.
Commands
serve
Start the MCP server (default command).
booklife serve --config booklife.kdl
booklife --config booklife.kdl # same thing
| Flag | Description |
|---|---|
--config PATH | Path to KDL configuration file |
libby-connect
Connect a Libby/OverDrive account using a clone code.
booklife libby-connect <8-digit-code> [--skip-tls-verify]
Steps:
- Open Libby app → Settings → Copy To Another Device → Sonos Speakers
- Note the 8-digit code displayed
- Run the command within ~40 seconds
| Flag | Description |
|---|---|
--skip-tls-verify | Skip TLS certificate verification (for OverDrive cert issues) |
Identity is saved to:
- Linux:
~/.config/booklife/libby-identity.json - macOS:
~/Library/Application Support/booklife/libby-identity.json
sync
Sync returned Libby books to Hardcover as "read".
booklife sync --config booklife.kdl [--dry-run] [--limit N]
| Flag | Description |
|---|---|
--config PATH | Path to KDL configuration file |
--dry-run | Preview sync without making changes |
--limit N | Limit number of entries to sync |
Output includes:
- Book matching results (ISBN and title+author matching)
- Hardcover IDs for successfully matched books
- Error details for failed matches
import-timeline
Import a Libby timeline JSON export to local history.
booklife import-timeline <json-file> --config booklife.kdl
version
Show version information.
booklife version