π Libro: A terminal-based tool to track your reading history, with your data stored locally in a SQLite database.
Libro separates books and reviews to give you flexibility in how you track your reading:
- Books: Store information about the book itself (title, author, pages, genre, publication year)
- Reviews: Track your personal reading experience (date read, rating, review text)
This separation allows you to:
- Add books to your database without having read them yet
- Add multiple reviews for the same book (re-reads)
- Maintain a clean library of books separate from your reading history
Libro provides two ways to interact with your reading data:
Interactive TUI (Default):
libro- Launch the interactive terminal interface with search and navigation- Navigate with arrow keys, search with
/, add books witha, view lists withl - Press
qto quit,?for help with key bindings
Command Line Interface:
libro report- Reading history tablelibro report --author- Author statistics (most read authors)libro report --author "Name"- Books/reviews by specific authorlibro report --chart- Yearly reading chartlibro report 123- Book/review details for review idlibro add- Add book + reviewlibro book- Book management (show, add, edit)libro review- Review management (show, add, edit)libro list- Reading list management
Add books and review:: libro add
Add book only (no review): libro book add
Show recent books: libro book (shows latest 20 books by default)
Show specific book: libro book 42
Edit book details only: libro book edit 42
Search and filter books:
Show books by author: libro book --author "Stephen King"
Show books by title: libro book --title "Foundation"
Show books published in specific year: libro book --year 2024
All search options support partial matching, so --author "King" will find "Stephen King", "Tabitha King", etc.
Show recent reviews: libro review (shows latest 20 reviews by default)
Show specific review: libro review 123
Add review to existing book: libro review add 42
Edit review details only: libro review edit 123
Search and filter reviews:
Show reviews by author: libro review --author "Stephen King" (searches book authors)
Show reviews by book title: libro review --title "Foundation" (searches book titles)
Show reviews from specific year: libro review --year 2024 (searches by date_read)
All search options support partial matching, and year filtering uses the date the review was made, not the book's publication year.
Create a reading list: libro list create "My Reading List" --description "Books to read"
Show all reading lists: libro list show
Show specific list: libro list show 1
Import books to a new list: libro list import books.csv --name "Sci-Fi Classics" --description "Science fiction must-reads"
See: libro --help for more information.
The default interface is an interactive terminal application with search capabilities:
- Launch with
libro(no arguments) - Use arrow keys to navigate between books
- Press
/to search by title or author - Press
Enterto view book details - Press
ato add new books - Press
lto view reading lists
Access the traditional table view with libro report:
β― libro report
Books Read in 2025
ββββββββββββββ³βββββββββββββββββββββββββββββββ³βββββββββββββββββββββββ³βββββββββ³βββββββββββββββ
β ID β Title β Author β Rating β Date Read β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Fiction β β β β β
β 1 β Cujo β Stephen King β 3 β Jan 05, 2025 β
β 585 β The Midnight Library β Matt Haig β 5 β Jan 13, 2025 β
β 587 β The Maid β Nita Prose β 4 β Jan 20, 2025 β
β 589 β Into the Water β Paula Hawkins β 2 β Feb 02, 2025 β
β 584 β Salem's Lot β Stephen King β 3 β Mar 12, 2025 β
β 595 β The Thursday Murder Club β Richard Osman β 3 β Mar 20, 2025 β
β 596 β Remarkably Bright Creatures β Shelby Van Pelt β 5 β Mar 27, 2025 β
β 598 β Colorless Tsukuru Tazaki β Haruki Murakami β 3 β Apr 09, 2025 β
β 599 β Ten β Gretchen McNeil β 3 β Apr 16, 2025 β
β β β β β β
β Nonfiction β β β β β
β 586 β The Art Thief β Michael Finkel β 4 β Jan 14, 2025 β
β 588 β All the Pieces Matter β Jonathan Abrams β 3 β Jan 27, 2025 β
β 590 β Supercommunicators β Charles Duhigg β 4 β Feb 04, 2025 β
β 593 β Leonardo da Vinci β Walter Isaacson β 3 β Mar 02, 2025 β
β 594 β The Leap to Leader β Adam Bryant β 3 β Mar 08, 2025 β
β 597 β Team of Rivals β Doris Kearns Goodwin β 3 β Apr 06, 2025 β
ββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββ
β― libro report --chart
Books Read by Year
Year Count Bar
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2013 3 ββββ
2014 4 ββββββ
2015 11 βββββββββββββββββ
2016 30 ββββββββββββββββββββββββββββββββββββββββββββββ
2017 21 ββββββββββββββββββββββββββββββββ
2018 27 ββββββββββββββββββββββββββββββββββββββββββ
2019 29 βββββββββββββββββββββββββββββββββββββββββββββ
2020 27 ββββββββββββββββββββββββββββββββββββββββββ
2021 28 βββββββββββββββββββββββββββββββββββββββββββ
2022 27 ββββββββββββββββββββββββββββββββββββββββββ
2023 32 ββββββββββββββββββββββββββββββββββββββββββββββββββ
2024 30 ββββββββββββββββββββββββββββββββββββββββββββββ
2025 17 ββββββββββββββββββββββββββ
Show author statistics (most read authors):
β― libro report --author
Most Read Authors
Author Books Read
ββββββββββββββββββββββββββββββββββ
Stephen King 15
George R.R. Martin 5
Timothy Zahn 4
Grady Hendrix 4
Andy Weir 4
William Zinsser 3
Roald Dahl 3
Riley Sager 3
Philip K. Dick 3
Neil Gaiman 3
Natalie D. Richards 3
Lucy Foley 3
Cory Doctorow 3
Show books/reviews by specific author:
β― libro report --author "Stephen King"
Books by Stephen King
ββββββ³βββββββββββββββββββββββββββββββ³ββββββββββββββββ³βββββββββ³βββββββββββββββ
β ID β Title β Author β Rating β Date Read β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β 1 β Cujo β Stephen King β 3 β Jan 05, 2025 β
β 584β Salem's Lot β Stephen King β 3 β Mar 12, 2025 β
ββββββ΄βββββββββββββββββββββββββββββββ΄ββββββββββββββββ΄βββββββββ΄βββββββββββββββ
Reading lists allow you to organize books into curated collections. You can create lists for different genres, themes, or reading goals.
Create a new reading list:
libro list create "2025 Reading Goals" --description "Books I want to read this year"View all your reading lists:
β― libro list show
Reading Lists
ββββββ³βββββββββββββββββββββ³βββββββββββββββββββββββββββββββββββ³ββββββββββββββ³βββββββ³βββββββββ³βββββββββββββββββββ
β ID β Name β Description β Total Books β Read β Unread β Progress β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β 1 β Sci-Fi Classics β Science fiction must-reads β 50 β 12 β 38 β ββββββββββ 24.0% β
β 2 β Horror Collection β Spine-tingling tales β 30 β 8 β 22 β ββββββββββ 26.7% β
β 3 β Literary Classics β Timeless masterpieces β 45 β 15 β 30 β ββββββββββ 33.3% β
ββββββ΄βββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄ββββββββββββββ΄βββββββ΄βββββββββ΄βββββββββββββββββββ
Use 'libro list show <id>' to see books in a specific listView books in a specific list:
β― libro list show 1
π Sci-Fi Classics - Science fiction must-reads
ββββββ³βββββββββ³βββββββββββββββββββββββββββββββββββββββββββ³βββββββββββββββββββββββββ³ββββββββββββββββββ³βββββββββ³βββββββββββββ
β ID β Status β Title β Author β Genre β Rating β Date Read β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β 42 β π β Foundation β Isaac Asimov β science fiction β β β β β
β 43 β π β Dune β Frank Herbert β science fiction β β β β β
β 44 β β
β The Left Hand of Darkness β Ursula K. Le Guin β science fiction β 5 β 2024-12-15 β
β 45 β β
β Neuromancer β William Gibson β science fiction β 4 β 2024-11-20 β
ββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββ΄ββββββββββββββββββ΄βββββββββ΄βββββββββββββ
π Progress: 12 read, 38 unread (24.0% complete)Add a new book to an existing list:
libro list add 1This will prompt you to enter book details interactively.
Import books from a CSV file and create a new list at the same time:
libro list import books.csv --name "Mystery Novels" --description "Page-turners and whodunits"Import books to an existing list:
libro list import more-books.csv --id 1CSV Format: The CSV file should have the following columns in order:
- Title
- Author
- Publication Year (optional)
- Pages (optional)
- Genre (optional)
Example CSV:
Title,Author,Publication Year,Pages,Genre
The Martian,Andy Weir,2011,369,science fiction
Klara and the Sun,Kazuo Ishiguro,2021,303,literary fictionEdit a list's name or description:
libro list edit 1 --name "Updated Name" --description "New description"Add a book to a list:
libro list add 1 42Remove a book from a list:
libro list remove 1 42Delete an entire list:
libro list delete 1View statistics for all lists:
libro list statsView statistics for a specific list:
libro list stats 1Libro is packaged as libro-book on PyPI.
pip install libro-book
You can also clone this repository and install it locally:
git clone https://github.com/mkaz/libro.git
cd libro
pip install -e .
On first run, libro will create a libro.db database file based on database location. It will prompt for confirmation to proceed which also shows the location where the file will be created.
Database locations:
The following order is used to determine the database location:
-
Using the
--dbflag on command-line. -
libro.dbin current directory -
Environment variable
LIBRO_DBto specify custom file/location -
Finally, the user's platform-specific data directory
- Linux:
~/.local/share/libro/libro.db - macOS:
~/Library/Application Support/libro/libro.db - Windows:
%APPDATA%\libro\libro.db
- Linux:
For example, if you want to create a new database file in the current directory, you can use the following command:
libro --db ./libro.db
Libro can import your reading history from a Goodreads export CSV file.
libro import goodreads_library_export.csv
There is a genre field that accepts any string value, but this data is not available in the Goodreads export. You can edit books to add or change the genre after import.
| Field | Type | Description |
|---|---|---|
| id | primary key | Unique identifier |
| title | string | Book title |
| author | string | Book author |
| pages | int | Number of pages in book |
| pub_year | int | Year book was published |
| genre | string | Genre (any string value) |
| Field | Type | Description |
|---|---|---|
| id | primary key | Unique identifier |
| book_id | foreign key | Book identifier |
| date_read | date | Date book was read |
| rating | float | Number between 0 and 5 |
| review | text | Review of book |
| Field | Type | Description |
|---|---|---|
| id | primary key | Unique identifier |
| name | string | Reading list name (unique) |
| description | string | Optional description |
| created_date | date | Date the list was created |
| Field | Type | Description |
|---|---|---|
| id | primary key | Unique identifier |
| list_id | foreign key | Reading list identifier |
| book_id | foreign key | Book identifier |
| added_date | date | Date book was added to list |
| priority | int | Priority/order in list (default: 0) |
See GitHub Releases for the changelog.