https://github.com/nmdra/booktrack-cli
A simple command-line tool to track your books using SQLite and Go.
https://github.com/nmdra/booktrack-cli
cobra-cli golang goreleaser sqlc sqlite3
Last synced: 4 months ago
JSON representation
A simple command-line tool to track your books using SQLite and Go.
- Host: GitHub
- URL: https://github.com/nmdra/booktrack-cli
- Owner: nmdra
- License: gpl-3.0
- Created: 2025-07-07T14:21:48.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-07-10T05:06:48.000Z (6 months ago)
- Last Synced: 2025-07-10T14:18:51.407Z (6 months ago)
- Topics: cobra-cli, golang, goreleaser, sqlc, sqlite3
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Booktrack CLI
A simple command-line tool to track your books using SQLite and Go.
---
## Features
- Add books with title, author, and optional year
- Stores data in a local SQLite database (`books.db`)
- Built using Go, Cobra (CLI), and sqlc (type-safe SQL)
---
## Installation
```bash
git clone https://github.com/nmdra/Booktrack-CLI.git
cd Booktrack-CLI
make build
````
This generates the binary at `./bin/booktrack-cli`.
## 🛠️ Usage
### 1. Initialize the database (run once)
```bash
./bin/booktrack-cli initdb
```
This creates the required table in `books.db`.
---
### 2. Add a new book
```bash
./bin/booktrack-cli add --title "Morning Star" --author "Pierce Brown" --year 2016
```