reading-tracker-cli
v1.0.0
Published
A beautiful CLI tool to track your reading journey
Maintainers
Readme
📚 Reading Tracker CLI
A beautiful command-line interface tool to track your reading journey.
Features
- 📖 Track books you're reading, finished, or DNF'd
- 🔍 Search books by title, author, or ISBN
- 📚 Organize books with custom shelves
- 📊 View reading statistics
- 🎨 Beautiful terminal UI with @clack/prompts
- 💾 SQLite database (portable and fast)
- ⚙️ Configurable database location (works with future web app)
Installation
# Clone repository
git clone https://github.com/YOUR_USERNAME/reading-tracker-cli.git
cd reading-tracker-cli
# Install dependencies
pnpm install
# Build
pnpm build
# Link globally (optional)
npm link
# Or run directly
pnpm devUsage
# Initialize (first time only)
reading init
# Add a book
reading add
# List your books
reading list
reading list --status reading
reading list --format physical
# Mark a book as finished
reading finish
# Mark as Did Not Finish
reading dnf
# Update reading progress
reading update
# Manage shelves
reading shelf create "Favorites"
reading shelf add <book-id> "Favorites"
reading shelf list
# Search books
reading search "gatsby"
# View statistics
reading stats
# Configuration
reading config show
reading config set db-path ~/custom/path/library.db
reading config resetConfiguration
The CLI supports multiple ways to specify a custom database location:
1. Config File (Persistent)
reading config set db-path ~/projects/reading-web/data/library.db2. Environment Variable (Per-session)
export READING_TRACKER_DB=~/custom/library.db
reading list3. CLI Flag (Per-command)
reading add --db ~/custom/library.dbPriority Order: CLI flag > Environment variable > Config file > Default (~/.reading-tracker/library.db)
Database Schema
See src/db/schema.ts for the complete schema.
- books: Book metadata (title, author, ISBN, format, etc.)
- reading_sessions: Reading status and progress
- shelves: Custom shelves/collections
- book_shelves: Many-to-many relationship between books and shelves
Development
# Run in development mode
pnpm dev
# Type checking
pnpm typecheck
# Generate database migrations
pnpm db:generate
# Run migrations
pnpm db:migrate
# Open Drizzle Studio (GUI for database)
pnpm db:studio
# Build for production
pnpm buildFuture Plans
- Web dashboard with Nuxt.js and ECharts
- AI-powered book recommendations
- Import from Goodreads
- Export to various formats
- Reading goals and streaks
License
MIT
