use std::path::PathBuf; #[derive(Debug, clap::Parser)] pub struct Args { // clap attr matches typst #[clap(long, env = "TYPST_PACKAGE_PATH", value_name = "DIR")] pub package_path: Option, #[clap(long)] #[cfg_attr(feature = "git2", clap(hide = true))] /// Path to the git binary pub git: Option, #[clap(subcommand)] pub command: Subcommand, } #[derive(Debug, clap::Subcommand)] pub enum Subcommand { /// Create a new local package New { /// The name of the local package name: String, }, /// Initialize a local package Init {}, /// Print the path of a local package #[clap(name = "path")] PrintPath { /// The name of the local package name: String, }, /// Increase the version of a local package by one Bump { /// The name of the local package name: String, /// Increase the major instead of the minor version #[clap(long, conflicts_with = "patch")] major: bool, /// Increase the patch instead of the minor version #[clap(long)] patch: bool, }, /// Remove a local package #[clap(name = "rm")] Remove { /// The name of the local package name: String, }, }