Chronicle is a Go-based CLI tool for managing and querying a personal book database using ISBNs.
It acts as the entry point for a book ingestion and analytics pipeline, allowing you to normalize ISBNs, search your database, and (in the future) enrich book data automatically.
Chronicle is not just an ISBN normalizer anymore.
It currently allows you to:
- normalize ISBN inputs (ISBN10 / ISBN13)
- search a PostgreSQL book database by ISBN
- retrieve structured book data (title, author, etc.)
- act as a CLI interface for your personal book system
👉 In short:
Chronicle = CLI layer for your personal book database + analytics system
I use other tools to keep track of what I read, like Goodreads and TheStoryGraph, but what I do not like is that they either do not provide everything on their site, or if I want more stuff it is behind a paywall. I am not against paying for stuff, but if I can build the items I want myself, while also learning, why not? This is how this small CLI tool was born. I have linked a postgres DB to my Grafana instance and I have populate in that DB all the books I have read so far, but I wanted a simpler way to add items in my DB, query for books or modify items, without having to go each time in pgadmin, or connect using postgres tools to the db.
I wanted to learn Go and saw this as a great method to learn while building what I am interested.
Chronicle solves this today by:
- Taking raw ISBN input
- Normalizing and validating it
- Querying a central database
- Returning structured data
flowchart TD
A[User CLI Input] --> B[Chronicle CLI]
B --> C[Normalize ISBN]
C --> D[Validate ISBN]
D --> E[PostgreSQL Books DB]
E --> F[Book Data]
F --> G[CLI Output]
E --> H[Grafana Dashboards]
go run ./cmd/chronicle normalize 978-1804940822go run ./cmd/chronicle search 9781835418581Output:
Title: Jitterbug
Author: Gareth L. Powell
ISBN13: 9781835418581
go build -o chronicle ./cmd/chronicleRun:
./chronicle search 9781835418581- CLI-based architecture
- ISBN normalization (strip spaces, hyphens)
- PostgreSQL integration
- search by ISBN13 (exact match) - For now it is only ISBN13 while it is the most used in my DB.
- modular Go project structure (cmd / internal separation)
chronicle/
├── cmd/
│ └── chronicle/
│ └── main.go
├── internal/
│ ├── db/
│ │ └── db.go
│ ├── isbn/
│ │ ├── normalize.go
│ │ └── validate.go
│ ├── models/
│ │ └── models.go
│ ├── repository/
│ │ └── query_isbn.go
│ └── output/
│ └── print.go
├── docs/
│ └── screenshots/
├── README.md
├── go.mod
└── LICENSE
Chronicle queries a PostgreSQL database that is used for analytics via Grafana.
My Grafana Dashboard recreates most of the stats I like to see in the StoryGraph site while allow me to query across multiple years.
- books per author
- genre distribution
- reading trends
- page count insights
- collection overview
- search by title (partial match)
- add books via ISBN (
chronicle add <isbn>) - delete / update commands
- better CLI output formatting
- Google Books API integration
- Open Library fallback
- automatic metadata ingestion
- unified Book model
- automatic DB insertion if book not found
- JSON output mode
- web interface (optional)
- automation pipelines (n8n / Discord integration via slash commands)
- multi-source ingestion system
Clone:
git clone https://github.com/anubis619/chronicle.git
cd chronicleRun:
go run ./cmd/chronicle search 9781835418581Current:
- Go
- PostgreSQL
- Docker (for DB)
- Grafana (analytics)
- Terraform (infrastructure for deploying Grafana in my homelab, the db and also all my dashboards)
Future:
- Google Books API
- Open Library API
- n8n (automation)
Chronicle is part of a broader system combining:
- CLI tools
- database design
- data ingestion pipelines
- analytics dashboards
- homelab infrastructure
It is both a practical tool and a learning platform for:
- Go development
- backend architecture
- data pipelines
- self-hosted systems
MIT License

