I got the core database and CLI working
Built the foundation today for my SQLite task store and a working CLI with four commands: add, list, done, and delete. You can actually add tasks and check them off from the terminal now.
What’s working
cargo run – add “buy milk”
cargo run – list
Output: 1: buy milk [ ]
cargo run – done 1
cargo run – list
Output: 1: buy milk [x]
The stack is rusqlite for SQLite (with the bundled feature so there are no system deps), clap for argument parsing with the derive macro, and chrono for timestamps. The project is split into models.rs, db.rs, commands.rs, and main.rs. These keep the database logic completely separate from the CLI wiring.
One thing that tripped me up: Rust’s ownership model means you can’t just pass a Connection willy nilly, you have to borrow it with &Connection everywhere. Took a few compiler errors to get the hang of it, but now it makes sense.
Next up
Building the TUI with ratatui so you can navigate tasks without typing commands. After that: publishing to crates.io and updating the README.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.