use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "tok", version, about = "tok — WIP")]
struct Cli {
#[command(subcommand)]
command: Option<Command>,
}
#[derive(Subcommand)]
enum Command {
Version,
}
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let _ = dotenvy::dotenv();
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
)
.init();
let cli = Cli::parse();
match cli.command {
Some(Command::Version) | None => {
println!("tok {}", env!("CARGO_PKG_VERSION"));
}
}
Ok(())
}