1use clap::Parser;
2
3use crate::{commands::RootCommand, output::OutputFormat};
4
5#[derive(Debug, Parser)]
6#[command(
7 name = "wekan",
8 version,
9 about = "Agent-first, human-friendly command-line client for Wekan",
10 arg_required_else_help = true,
11 after_help = "Examples:\n wekan profile add local http://localhost:3000 --use\n wekan auth login --username alice\n wekan --output json board list\n wekan card get card-id --board board-id --list list-id"
12)]
13pub struct Cli {
14 #[arg(long, global = true, help_heading = "Global options")]
17 pub server: Option<String>,
18
19 #[arg(
22 long = "profile",
23 global = true, help_heading = "Global options",
24 value_parser = crate::config::profiles::parse_profile_name
25 )]
26 pub profile_name: Option<String>,
27
28 #[arg(long, global = true, help_heading = "Global options", value_enum, default_value_t = OutputFormat::Human)]
30 pub output: OutputFormat,
31
32 #[arg(long, global = true, help_heading = "Global options")]
34 pub allow_insecure_http: bool,
35
36 #[command(subcommand)]
37 pub command: RootCommand,
38}