1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(
name = "fnp",
version,
about = "Quick one-line memos with automatic timestamps"
)]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand)]
pub enum Command {
/// Save a one-line memo with an automatic timestamp
Add {
/// Memo text (multiple words are joined with spaces)
#[arg(required = true, num_args = 1..)]
text: Vec<String>,
},
/// List saved memos
List {
/// Filter to memos created today
#[arg(long)]
today: bool,
/// Reverse order (oldest first)
#[arg(short, long)]
reverse: bool,
/// Output raw JSONL for scripting
#[arg(long)]
json: bool,
},
/// Show resolved configuration
Config {
/// Print config file path only
#[arg(long)]
path: bool,
},
/// Delete all saved memos after confirmation
Clear {
/// Skip the confirmation prompt
#[arg(short = 'y', long)]
yes: bool,
},
}