4 releases
0.1.4 | Jan 20, 2024 |
---|---|
0.1.3 | Jan 18, 2024 |
0.1.1 | Dec 31, 2023 |
0.1.0 | Dec 29, 2023 |
#2494 in Command line utilities
38 downloads per month
9KB
185 lines
Todo CLI JFC
This is a very basic todo cli tool, mainly written to learn rust.
These are the basic commands as of version 0.1.4
#[derive(Debug, Parser)]
#[command(name = "todo")]
#[command(author, version)]
#[command(about = "A simple todo cli tool.", long_about = None)]
pub struct Cli {
#[command(subcommand)]
command: Commands,
}
#[derive(Debug, Subcommand)]
enum Commands {
#[command(about = "add a new todo to your database")]
Add {
#[arg(value_name = "description", long, short)]
description: String,
},
#[command(about = "toggle a todo done or undone with this")]
Toggle {
#[arg(value_name = "todo nr", long, short)]
number: i64,
},
#[command(about = "sweep away all todos that are done")]
Sweep {},
#[command(about = "remove a todo from your database")]
Remove {
#[arg(value_name = "todo nr")]
number: i64,
},
#[command(about = "show all your todos saved to the database")]
Show {},
}
Version
0.1.4 Added sweep command
Added a sweep command that removes all todos marked done.
Dependencies
~23–31MB
~498K SLoC