Skip to main content

A command-line tool to track books read

Project description

Libro

๐Ÿ“š Libro: A terminal-based tool to track your reading history, with your data stored locally in a SQLite database.

Core Concepts

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

Interface

Command Line Interface:

  • libro report - Reading history table
  • libro report --author - Author statistics (most read authors)
  • libro report --author "Name" - Books/reviews by specific author
  • libro report --chart - Yearly reading chart
  • libro report 123 - Book/review details for review id
  • libro add - Add book + review
  • libro book - Book management (show, add, edit)
  • libro review - Review management (show, add, edit)
  • libro list - Reading list management

Usage

Add books and review:: libro add

Book Management

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.

Review Management

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.

Reading Lists

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.

Examples

Report View

Access the 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 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Books by Year Chart

โฏ 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      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„

Author Report and Filtering

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

Reading lists allow you to organize books into curated collections. You can create lists for different genres, themes, or reading goals.

Creating and Managing Lists

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 list

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

Adding Books to Lists

Add a new book to an existing list:

libro list add 1

This will prompt you to enter book details interactively.

Importing Books to Lists

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 1

CSV 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 fiction

List Management

Edit 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 42

Remove a book from a list:

libro list remove 1 42

Delete an entire list:

libro list delete 1

View statistics for all lists:

libro list stats

View statistics for a specific list:

libro list stats 1

Install

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

Setup

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:

  1. Using the --db flag on command-line.

  2. libro.db in current directory

  3. Environment variable LIBRO_DB to specify custom file/location

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

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

Import from Goodreads

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.

Database Schema

Books table

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)

Reviews table

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

Reading Lists table

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

Reading List Books table

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)

Changelog

See GitHub Releases for the changelog.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libro_book-0.6.2.tar.gz (55.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libro_book-0.6.2-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file libro_book-0.6.2.tar.gz.

File metadata

  • Download URL: libro_book-0.6.2.tar.gz
  • Upload date:
  • Size: 55.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for libro_book-0.6.2.tar.gz
Algorithm Hash digest
SHA256 b67c0df4a37d87820eb70ff902f4a85adaf975d1328ccdca88495dd82b058d96
MD5 3f10333b69ca8f3f68952d3630e2637c
BLAKE2b-256 a685b045c60973b51475de34c0a09ceedd34b18505bca3801bdfd48dcbd2577b

See more details on using hashes here.

File details

Details for the file libro_book-0.6.2-py3-none-any.whl.

File metadata

  • Download URL: libro_book-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 30.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for libro_book-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 58ce37e88aa266b04c5f2703e8154db0f9a64dd74716959d853e89fc87a3baf2
MD5 586740417914bec2c4e828188f0e90d1
BLAKE2b-256 acd846a73abee4b224ebf459763d9c5ec416c5b9b32ff3b32620b8784cf9fa7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page