A simple Rust "todo" CLI app that uses the clap_v3 crate and the diesel ORM.
To install, clone the repo, cd
into todo-rs and run:
make install
Or alternatively, run:
cargo install --path .
Additionally, the app uses a postgres docker container for storage. To spin up the container, run:
docker-compose up -d
Note: You will need to have docker compose installed to execute the previous command.
Usage instructions can be accessed by running:
todo-rs --help
USAGE:
todo-rs <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
add Add a new todo
complete Complete an existing todo
delete Delete an existing todo
help Print this message or the help of the given subcommand(s)
list List existing todos
update Update an existing todo
todo-rs add --name "feed the cat"
todo-rs list
List completed todos:
todo-rs list --completed
todo-rs update --id 1 --name "feed the cat when I get home"
Note: The
id
of the todo can be found by runningtodo-rs list
todo-rs complete --id 1
todo-rs list
would no longer show any pending todos but running todo-rs list --completed
will show the completed todos.
todo-rs delete --id 1