use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser)]
#[command(
name = "lific",
version,
about = "Local-first, lightweight issue tracker"
)]
pub struct Cli {
#[arg(long, global = true)]
pub config: Option<PathBuf>,
#[arg(long, global = true)]
pub db: Option<PathBuf>,
#[command(subcommand)]
pub command: Command,
}
#[derive(Subcommand)]
pub enum Command {
Start {
#[arg(short, long)]
port: Option<u16>,
#[arg(long)]
host: Option<String>,
},
Mcp,
Init,
ImportPlane {
#[arg(long, env = "PLANE_BASE_URL")]
url: String,
#[arg(long, env = "PLANE_API_KEY")]
api_key: String,
#[arg(long, env = "PLANE_WORKSPACE_SLUG")]
workspace: String,
#[arg(long, value_delimiter = ',')]
skip: Vec<String>,
},
ImportFile {
file: PathBuf,
#[arg(long, value_delimiter = ',')]
skip: Vec<String>,
},
Key {
#[command(subcommand)]
action: KeyAction,
},
}
#[derive(Subcommand)]
pub enum KeyAction {
Create {
#[arg(short, long)]
name: String,
},
List,
Revoke {
#[arg(short, long)]
name: String,
},
Rotate {
#[arg(short, long)]
name: String,
},
}