https://github.com/lolei/rust-todo-cli
A command line tool written in Rust, of truly groundbreaking technological sophistication, the use cases of which will alter the way humanity will evolve for millennia to come.
https://github.com/lolei/rust-todo-cli
rust
Last synced: 3 months ago
JSON representation
A command line tool written in Rust, of truly groundbreaking technological sophistication, the use cases of which will alter the way humanity will evolve for millennia to come.
- Host: GitHub
- URL: https://github.com/lolei/rust-todo-cli
- Owner: LoLei
- Created: 2021-04-26T09:14:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-11T16:14:45.000Z (over 4 years ago)
- Last Synced: 2025-06-26T07:41:36.134Z (6 months ago)
- Topics: rust
- Language: Rust
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# rust-todo-cli
First project that's more than "hello world".
Performs CRUD operations on items in a database. The database implementation is easily
interchangeable. `lib.rs` could also be used by a different main binary, e.g. a web server/API.
Since this is just a practice project and the usability and use case is
questionable, it is not published on crates.io, but it can still be tested
locally by cloning this repository and running some of the following commands.
## Usage
### Compile
```
cargo build --release
```
### Run
```
./target/release/rust-todo-cli
# Or compile & run:
cargo run --release --
```
For simplicity's sake, below examples use the alias `rtc` for the binary.
### Help
```
rtc -h
Rust TODO CLI 0.1
Lorenz Leitner
CLI for managing TODOs
USAGE:
rtc [OPTIONS] <--add ...|--delete |--update |--filter ...|--getall>
FLAGS:
-g, --getall Get all items in the database
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-a, --add ... Add an item, return ID
-d, --delete Delete an item
-f, --filter ... Filter items by name, status and/or date
-u, --update Update an item
```
### Examples
```
rtc -a my todo item
rtc -u 10 done
rtc -d 5
rtc -g
rtc -f status=open
rtc -f name='todo item'
rtc -f status=done after=2021-01-01 before=2021-01-05
```
### Testing
```
cargo test
```
### Clippy
Excluding some pedantic warnings:
```
./clippy.sh
```