Skip to content

0xpetersatoshi/todo-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

todo-rs

A simple Rust "todo" CLI app that uses the clap_v3 crate and the diesel ORM.

Installation

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

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

Adding a new todo

todo-rs add --name "feed the cat"

Listing todos

todo-rs list

List completed todos:

todo-rs list --completed

Update a todo

todo-rs update --id 1 --name "feed the cat when I get home"

Note: The id of the todo can be found by running todo-rs list

Complete a todo

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.

Delete a todo

todo-rs delete --id 1

About

A simple Rust "todo" CLI app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages