journey/journeyctl/mod.rs
1use clap::{Parser, Subcommand};
2use std::path::PathBuf;
3
4#[derive(Parser)]
5#[command(name = "journeyctl")]
6#[command(about = "Journey vault management tool")]
7pub struct JourneyCtlCli {
8 #[command(subcommand)]
9 pub command: Option<Commands>,
10
11 /// Show version information
12 #[arg(short = 'v', long = "version")]
13 pub version: bool,
14}
15
16#[derive(Subcommand)]
17pub enum Commands {
18 /// Initialize a new vault
19 Init {
20 /// Path to the vault directory
21 #[arg(short, long)]
22 path: PathBuf,
23
24 /// Name of the vault (defaults to path basename if not provided)
25 #[arg(short, long)]
26 name: Option<String>,
27
28 /// Type of vault (table|bullet)
29 #[arg(short, long)]
30 vault_type: Option<String>,
31
32 /// Detect and configure from an existing Obsidian vault
33 #[arg(long)]
34 obsidian: bool,
35 },
36 /// List all configured vaults
37 List,
38 /// Set the default vault
39 SetDefault {
40 /// Name of the vault to set as default
41 vault_name: String,
42 },
43 /// Unset the default vault
44 UnsetDefault,
45 /// Show current default vault
46 ShowDefault,
47 /// Unlist a vault (remove from configuration)
48 UnlistVault {
49 /// Name of the vault to unlist
50 vault_name: String,
51 },
52 /// Show the location of today's file
53 Today {
54 /// Name of the vault (uses default if not specified)
55 #[arg(short, long)]
56 vault: Option<String>,
57
58 /// Show detailed information including file existence
59 #[arg(long)]
60 verbose: bool,
61 },
62}