//! A shadow of `hk.usage.kdl` in usage's vocabulary, generated by
//! `cargo run -p xtask -- gen-shadow`.
//!
//! Do not edit: regenerate it. It exists to be compiled and parsed against, so
//! that the parser can be measured at a real CLI's scale rather than a toy one.
#![allow(dead_code, unused_imports)]

use usage_derive::{Args, Cli, Subcommands, ValueEnum};

/// Print a hook configuration for an agent or editor
#[derive(Args)]
#[usage(effect = "read")]
pub struct AgentHooksArgs {
    #[usage(long = "target", value_name = "TARGET", value_enum)]
    pub target: AgentHooksTargetValue,
}

#[derive(ValueEnum)]
pub enum AgentHooksTargetValue {
    #[usage(name = "codex")]
    Codex,
    #[usage(name = "claude-code")]
    ClaudeCode,
    #[usage(name = "vscode")]
    Vscode,
}

/// Print project instructions for a coding agent
#[derive(Args)]
#[usage(effect = "read")]
pub struct AgentInstructionsArgs {
    #[usage(long = "target", value_name = "TARGET", value_enum)]
    pub target: AgentInstructionsTargetValue,
}

#[derive(ValueEnum)]
pub enum AgentInstructionsTargetValue {
    #[usage(name = "codex")]
    Codex,
    #[usage(name = "claude-code")]
    ClaudeCode,
    #[usage(name = "generic")]
    Generic,
}

/// Print an MCP server configuration
#[derive(Args)]
#[usage(effect = "read")]
pub struct AgentMcpArgs {
    #[usage(long = "target", value_name = "TARGET", value_enum)]
    pub target: AgentMcpTargetValue,
}

#[derive(ValueEnum)]
pub enum AgentMcpTargetValue {
    #[usage(name = "codex")]
    Codex,
    #[usage(name = "claude-desktop")]
    ClaudeDesktop,
    #[usage(name = "claude-code")]
    ClaudeCode,
    #[usage(name = "vscode")]
    Vscode,
}

/// Generate integration snippets for coding agents
#[derive(Args)]
#[usage(effect = "read")]
pub struct AgentArgs {
    #[usage(subcommand)]
    pub command: AgentCommands,
}

#[derive(Subcommands)]
pub enum AgentCommands {
    /// Print a hook configuration for an agent or editor
    #[usage(name = "hooks")]
    Hooks(Box<AgentHooksArgs>),
    /// Print project instructions for a coding agent
    #[usage(name = "instructions")]
    Instructions(Box<AgentInstructionsArgs>),
    /// Print an MCP server configuration
    #[usage(name = "mcp")]
    Mcp(Box<AgentMcpArgs>),
}

/// Lists all available builtin linters
#[derive(Args)]
#[usage(effect = "read")]
pub struct BuiltinsArgs {}

/// Clear the cache directory
#[derive(Args)]
#[usage(effect = "write")]
pub struct CacheClearArgs {}

/// Manage hk internal cache
#[derive(Args)]
#[usage(effect = "read")]
pub struct CacheArgs {
    #[usage(subcommand)]
    pub command: CacheCommands,
}

#[derive(Subcommands)]
pub enum CacheCommands {
    /// Clear the cache directory
    #[usage(name = "clear")]
    Clear(Box<CacheClearArgs>),
}

/// Checks code
#[derive(Args)]
pub struct CheckArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<CheckFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum CheckFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

/// Generates shell completion scripts
#[derive(Args)]
#[usage(effect = "read")]
pub struct CompletionArgs {
    /// The shell to generate completion for
    #[usage(arg, name = "SHELL")]
    pub shell: ::std::string::String,
}

/// Print effective runtime settings (JSON format)
///
/// Shows the merged configuration from all sources including CLI flags, environment variables, git config, user config, and project config.
#[derive(Args)]
#[usage(effect = "read")]
pub struct ConfigDumpArgs {
    /// Output format (json or toml)
    #[usage(
        long = "format",
        value_name = "FORMAT",
        choices("json", "toml"),
        default = "json"
    )]
    pub format: ::std::option::Option<::std::string::String>,
}

/// Explain where a configuration value comes from
///
/// Shows the resolved value, its source (env/git/cli/default), and the full precedence chain showing all layers that could affect it.
#[derive(Args)]
#[usage(effect = "read")]
pub struct ConfigExplainArgs {
    /// Configuration key to explain
    #[usage(arg, name = "KEY")]
    pub key: ::std::string::String,
}

/// Get a specific configuration value
///
/// Available keys: jobs, enabled_profiles, disabled_profiles, fail_fast, display_skip_reasons, warnings, exclude, skip_steps, skip_hooks, stage
#[derive(Args)]
#[usage(effect = "read")]
pub struct ConfigGetArgs {
    /// Configuration key to retrieve
    ///
    /// Available keys: jobs, enabled_profiles, disabled_profiles, fail_fast, display_skip_reasons, warnings, exclude, skip_steps, skip_hooks, stage
    #[usage(arg, name = "KEY")]
    pub key: ::std::string::String,
}

/// Show the configuration source precedence order
///
/// Lists all configuration sources in order of precedence to help understand where configuration values come from.
#[derive(Args)]
#[usage(effect = "read")]
pub struct ConfigSourcesArgs {}

/// Configuration introspection and management
///
/// View and inspect hk's configuration from all sources. Configuration is merged from multiple sources in precedence order: CLI flags > Environment variables > Git config (local) > User config (.hkrc.pkl) > Git config (global) > Project config (hk.pkl) > Built-in defaults.
#[derive(Args)]
#[usage(effect = "read")]
pub struct ConfigArgs {
    #[usage(subcommand)]
    pub command: ::std::option::Option<ConfigCommands>,
}

#[derive(Subcommands)]
pub enum ConfigCommands {
    /// Print effective runtime settings (JSON format)
    #[usage(name = "dump")]
    Dump(Box<ConfigDumpArgs>),
    /// Explain where a configuration value comes from
    #[usage(name = "explain")]
    Explain(Box<ConfigExplainArgs>),
    /// Get a specific configuration value
    #[usage(name = "get")]
    Get(Box<ConfigGetArgs>),
    /// Show the configuration source precedence order
    #[usage(name = "sources")]
    Sources(Box<ConfigSourcesArgs>),
}

/// Fixes code
#[derive(Args)]
pub struct FixArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<FixFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum FixFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

/// Generates a new hk.pkl file for a project
#[derive(Args)]
#[usage(effect = "write")]
pub struct InitArgs {
    /// Overwrite existing hk.pkl file
    #[usage(long = "force", short = 'f')]
    pub force: bool,
    /// Interactive mode: select linters and hooks manually
    #[usage(long = "interactive", short = 'i')]
    pub interactive: bool,
    /// Generate a mise.toml file with hk configured
    ///
    /// Set HK_MISE=1 to make this default behavior.
    #[usage(long = "mise")]
    pub mise: bool,
}

/// Sets up git hooks to run hk.
///
/// The recommended setup is `hk install --global`, which installs hooks once into the user's `~/.gitconfig` so every repository on the machine picks them up automatically. In a project without an `hk.pkl`, the installed hook exits silently — no-op — so it's safe to enable everywhere. Requires Git 2.54+.
///
/// Without `--global`, hooks are installed into the current repo only. On Git 2.54+ this uses config-based hooks (`hook.<name>.command`), which keeps `.git/hooks/` untouched and composes cleanly with other hook managers. On older Git it falls back to writing script shims.
///
/// If hk is already configured globally (any `hook.hk-*` entry in `~/.gitconfig`), the per-repo install is skipped — and any stale local hooks are cleaned up — so the global install remains the single source of truth and hk doesn't fire twice per event. Pass `--force-local` to install local hooks anyway.
#[derive(Args)]
#[usage(effect = "write")]
pub struct InstallArgs {
    #[usage(
        help = "Install local hooks even when hk is already configured globally\n(any `hook.hk-*` entry in `~/.gitconfig`). By default a per-repo\ninstall is skipped in that case to avoid hk firing twice per\nevent. Not compatible with `--global`.",
        long = "force-local",
        conflicts = "--global"
    )]
    pub force_local: bool,
    #[usage(
        help = "Recommended. Install at user level (~/.gitconfig) so every repo\non this machine gets hk hooks. Requires Git 2.54 or newer. In\nrepos without an `hk.pkl`, the installed hook is a silent no-op.",
        long = "global"
    )]
    pub global: bool,
    #[usage(
        help = "Force using the legacy `.git/hooks/` script shims instead of Git\n2.54+ config-based hooks. Not compatible with `--global`.",
        long = "legacy",
        conflicts = "--global"
    )]
    pub legacy: bool,
    #[usage(
        help = "Use `mise x` to execute hooks. With this, it won't\nbe necessary to activate mise in order to run hooks\nwith mise tools.",
        long_help = "Use `mise x` to execute hooks. With this, it won't\nbe necessary to activate mise in order to run hooks\nwith mise tools.\n\nSet HK_MISE=1 to make this default behavior.",
        long = "mise"
    )]
    pub mise: bool,
}

/// Runs an MCP server for coding agents over standard input/output.
#[derive(Args)]
pub struct McpArgs {
    /// Restrict hk tools to this project root (defaults to the current directory)
    #[usage(long = "root", value_name = "PATH")]
    pub root: ::std::option::Option<::std::string::String>,
}

/// Migrate from pre-commit to hk
#[derive(Args)]
#[usage(effect = "write")]
pub struct MigratePreCommitArgs {
    /// Path to .pre-commit-config.yaml
    #[usage(
        long = "config",
        short = 'c',
        value_name = "CONFIG",
        default = ".pre-commit-config.yaml"
    )]
    pub config: ::std::option::Option<::std::string::String>,
    /// Overwrite existing hk.pkl file
    #[usage(long = "force", short = 'f')]
    pub force: bool,
    /// Output path for hk.pkl
    #[usage(
        long = "output",
        short = 'o',
        value_name = "OUTPUT",
        default = "hk.pkl"
    )]
    pub output: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Root path for hk pkl files (e.g., \"pkl\" for local, or package URL prefix) If specified, will use {root}/Config.pkl and {root}/Builtins.pkl",
        long_help = "Root path for hk pkl files (e.g., \"pkl\" for local, or package URL prefix)\nIf specified, will use {root}/Config.pkl and {root}/Builtins.pkl",
        long = "hk-pkl-root",
        value_name = "HK_PKL_ROOT"
    )]
    pub hk_pkl_root: ::std::option::Option<::std::string::String>,
}

/// Migrate from other hook managers to hk
#[derive(Args)]
#[usage(effect = "read")]
pub struct MigrateArgs {
    #[usage(subcommand)]
    pub command: MigrateCommands,
}

#[derive(Subcommands)]
pub enum MigrateCommands {
    /// Migrate from pre-commit to hk
    #[usage(name = "pre-commit")]
    PreCommit(Box<MigratePreCommitArgs>),
}

#[derive(Args)]
pub struct RunCommitMsgArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunCommitMsgFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// The path to the file that contains the commit message
    #[usage(arg, name = "COMMIT_MSG_FILE")]
    pub commit_msg_file: ::std::string::String,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunCommitMsgFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Args)]
pub struct RunPostCheckoutArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunPostCheckoutFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// SHA of the HEAD before the checkout
    #[usage(arg, name = "PREV_HEAD")]
    pub prev_head: ::std::string::String,
    /// SHA of the new HEAD
    #[usage(arg, name = "NEW_HEAD")]
    pub new_head: ::std::string::String,
    /// Flag indicating whether the checkout was a branch checkout (1) or file checkout (0)
    #[usage(arg, name = "IS_BRANCH_CHECKOUT")]
    pub is_branch_checkout: ::std::string::String,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunPostCheckoutFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Args)]
pub struct RunPostCommitArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunPostCommitFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunPostCommitFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Args)]
pub struct RunPostMergeArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunPostMergeFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// Flag indicating whether the merge was a squash merge (1) or not (0)
    #[usage(arg, name = "IS_SQUASH")]
    pub is_squash: ::std::string::String,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunPostMergeFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Args)]
pub struct RunPostRewriteArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunPostRewriteFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// The command that triggered the rewrite ("amend" or "rebase")
    #[usage(arg, name = "COMMAND")]
    pub command: ::std::string::String,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunPostRewriteFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

/// Run the pre-commit hook
#[derive(Args)]
pub struct RunPreCommitArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunPreCommitFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunPreCommitFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Args)]
pub struct RunPrePushArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunPrePushFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// Remote name
    #[usage(arg, name = "REMOTE")]
    pub remote: ::std::option::Option<::std::string::String>,
    /// Remote URL
    #[usage(arg, name = "URL")]
    pub url: ::std::option::Option<::std::string::String>,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunPrePushFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Args)]
pub struct RunPreRebaseArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunPreRebaseFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// The upstream from which the series was forked
    #[usage(arg, name = "UPSTREAM")]
    pub upstream: ::std::string::String,
    /// The branch being rebased (unset when rebasing the current branch)
    #[usage(arg, name = "BRANCH")]
    pub branch: ::std::option::Option<::std::string::String>,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunPreRebaseFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Args)]
pub struct RunPrepareCommitMsgArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunPrepareCommitMsgFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    /// The path to the file that contains the commit message so far
    #[usage(arg, name = "COMMIT_MSG_FILE")]
    pub commit_msg_file: ::std::string::String,
    /// The source of the commit message (e.g., "message", "template", "merge")
    #[usage(arg, name = "SOURCE")]
    pub source: ::std::option::Option<::std::string::String>,
    /// The SHA of the commit being amended (if applicable)
    #[usage(arg, name = "SHA")]
    pub sha: ::std::option::Option<::std::string::String>,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
}

#[derive(ValueEnum)]
pub enum RunPrepareCommitMsgFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

/// Run a hook
#[derive(Args)]
#[usage(arg_required_else_help = true)]
pub struct RunArgs {
    /// Run on all files instead of just staged files
    #[usage(long = "all", short = 'a', conflicts("--staged", "--unstaged"))]
    pub all: bool,
    /// Run check command instead of fix command
    #[usage(long = "check", short = 'c', overrides = "--fix")]
    pub check: bool,
    /// Exclude files that otherwise would have been selected
    #[usage(long = "exclude", short = 'e', value_name = "EXCLUDE", var)]
    pub exclude: ::std::vec::Vec<::std::string::String>,
    #[usage(
        help = "Run fix command instead of check command (this is the default behavior unless HK_FIX=0)",
        long_help = "Run fix command instead of check command\n(this is the default behavior unless HK_FIX=0)",
        long = "fix",
        short = 'f',
        overrides = "--check"
    )]
    pub fix: bool,
    /// Run on files that match these glob patterns
    #[usage(long = "glob", short = 'g', value_name = "GLOB", var)]
    pub glob: ::std::vec::Vec<::std::string::String>,
    /// Output the plan as JSON when combined with --plan or --why
    #[usage(long = "json", short = 'J')]
    pub json: bool,
    /// Print the plan instead of running the hook
    #[usage(long = "plan", short = 'P')]
    pub plan: bool,
    /// Run only specific step(s)
    #[usage(long = "step", short = 'S', value_name = "STEP", var)]
    pub step: ::std::vec::Vec<::std::string::String>,
    /// Show detailed reasons for inclusion/exclusion. Pass a step name to focus on one step, or omit the value to show reasons for all steps. Implies --plan.
    #[usage(
        long = "why",
        short = 'W',
        value_optional,
        default_missing = "",
        value_name = "STEP"
    )]
    pub why: ::std::option::Option<::std::string::String>,
    /// Abort on first failure
    #[usage(long = "fail-fast", overrides = "--no-fail-fast")]
    pub fail_fast: bool,
    /// Read the exact file list from a NUL-delimited file, or from stdin with `-` (except hooks that reserve stdin)
    #[usage(
        long = "files0-from",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--staged",
            "--to-ref",
            "--unstaged"
        ),
        value_name = "PATH"
    )]
    pub files0_from: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum)]
    pub format: ::std::option::Option<RunFormatValue>,
    #[usage(
        help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is present or the event isn't defined. Set automatically by `hk install`.",
        long_help = "Invoked by an installed git hook — gracefully exit 0 when no hk.pkl is\npresent or the event isn't defined. Set automatically by `hk install`.",
        long = "from-hook",
        hide
    )]
    pub from_hook: bool,
    /// Start reference for checking files (requires --to-ref)
    #[usage(long = "from-ref", value_name = "FROM_REF")]
    pub from_ref: ::std::option::Option<::std::string::String>,
    /// Continue on failures (opposite of --fail-fast)
    #[usage(long = "no-fail-fast", overrides = "--fail-fast")]
    pub no_fail_fast: bool,
    /// Disable auto-staging of fixed files
    #[usage(long = "no-stage", overrides = "--stage")]
    pub no_stage: bool,
    /// Check only files changed in the current PR/branch (shortcut for --from-ref DEFAULT_BRANCH --to-ref HEAD)
    #[usage(long = "pr", conflicts("--all", "--from-ref", "--glob", "--to-ref"))]
    pub pr: bool,
    /// Reject commands with unknown or destructive effects before execution
    #[usage(long = "safe")]
    pub safe: bool,
    /// Write normalized diagnostics as SARIF
    #[usage(long = "sarif", value_name = "PATH")]
    pub sarif: ::std::option::Option<::std::string::String>,
    /// Skip specific step(s)
    #[usage(long = "skip-step", value_name = "STEP", var)]
    pub skip_step: ::std::vec::Vec<::std::string::String>,
    /// Enable auto-staging of fixed files
    #[usage(long = "stage", overrides = "--no-stage")]
    pub stage: bool,
    /// Run on staged files only without stashing unstaged changes
    #[usage(
        long = "staged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--unstaged"
        )
    )]
    pub staged: bool,
    /// Stash method to use for git hooks
    #[usage(
        long = "stash",
        value_name = "STASH",
        choices("git", "patch-file", "none")
    )]
    pub stash: ::std::option::Option<::std::string::String>,
    /// Display statistics about files matching each step
    #[usage(long = "stats")]
    pub stats: bool,
    /// End reference for checking files (requires --from-ref)
    #[usage(long = "to-ref", value_name = "TO_REF")]
    pub to_ref: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Run on unstaged and untracked files only (excludes staged files), without stashing. Useful for linting files an agent just changed.",
        long_help = "Run on unstaged and untracked files only (excludes staged files),\nwithout stashing. Useful for linting files an agent just changed.",
        long = "unstaged",
        conflicts(
            "--all",
            "--from-ref",
            "--glob",
            "--pr",
            "--stash",
            "--to-ref",
            "--staged"
        )
    )]
    pub unstaged: bool,
    #[usage(arg, name = "OTHER", hide)]
    pub other: ::std::option::Option<::std::string::String>,
    /// Run on specific files
    #[usage(arg, name = "FILES")]
    pub files: ::std::vec::Vec<::std::string::String>,
    #[usage(subcommand)]
    pub command: ::std::option::Option<RunCommands>,
}

#[derive(ValueEnum)]
pub enum RunFormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Subcommands)]
pub enum RunCommands {
    #[usage(name = "commit-msg", alias = "cm")]
    CommitMsg(Box<RunCommitMsgArgs>),
    #[usage(name = "post-checkout")]
    PostCheckout(Box<RunPostCheckoutArgs>),
    #[usage(name = "post-commit")]
    PostCommit(Box<RunPostCommitArgs>),
    #[usage(name = "post-merge")]
    PostMerge(Box<RunPostMergeArgs>),
    #[usage(name = "post-rewrite")]
    PostRewrite(Box<RunPostRewriteArgs>),
    /// Run the pre-commit hook
    #[usage(name = "pre-commit", alias = "pc")]
    PreCommit(Box<RunPreCommitArgs>),
    #[usage(name = "pre-push", alias = "pp")]
    PrePush(Box<RunPrePushArgs>),
    #[usage(name = "pre-rebase")]
    PreRebase(Box<RunPreRebaseArgs>),
    #[usage(name = "prepare-commit-msg", alias = "pcm")]
    PrepareCommitMsg(Box<RunPrepareCommitMsgArgs>),
}

/// Show the companies sponsoring hk and the jdx.dev open source tools
#[derive(Args)]
#[usage(effect = "read")]
pub struct SponsorsArgs {}

/// Run step-defined tests
#[derive(Args)]
pub struct TestArgs {
    /// List tests without running
    #[usage(long = "list")]
    pub list: bool,
    /// Filter by test name (repeatable)
    #[usage(long = "name", value_name = "NAME", variadic, var_min = 1)]
    pub name: ::std::vec::Vec<::std::string::String>,
    /// Filter by step name (repeatable)
    #[usage(long = "step", value_name = "STEP", variadic, var_min = 1)]
    pub step: ::std::vec::Vec<::std::string::String>,
}

/// Removes hk hooks from the current git repository
#[derive(Args)]
#[usage(effect = "destructive")]
pub struct UninstallArgs {
    /// Remove hk hooks from the user's global git config (`~/.gitconfig`).
    #[usage(long = "global")]
    pub global: bool,
}

/// Generates a usage spec for the CLI
///
/// https://usage.jdx.dev
#[derive(Args)]
#[usage(effect = "read")]
pub struct UsageArgs {}

/// Check for large files being added to repository
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilCheckAddedLargeFilesArgs {
    /// Maximum file size in kilobytes (default: 500)
    #[usage(long = "maxkb", value_name = "MAXKB", default = "500")]
    pub maxkb: ::std::option::Option<::std::string::String>,
    /// Files to check
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Check for UTF-8 byte order marker (BOM)
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilCheckByteOrderMarkerArgs {
    /// Output a diff of the change.
    #[usage(long = "diff", short = 'd')]
    pub diff: bool,
    /// Files to check
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Check for case-insensitive filename conflicts
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilCheckCaseConflictArgs {
    /// Files to check for case conflicts
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Check for conventional commit message
///
/// Titles starting with `fixup! `, `squash! `, or `amend! ` (temporary commits created for `git rebase --autosquash`) skip validation.
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilCheckConventionalCommitArgs {
    #[usage(
        long = "allowed-types",
        delimiter = ',',
        value_name = "ALLOWED_TYPES",
        default = "build,chore,ci,docs,feat,fix,perf,refactor,revert,style,test",
        var
    )]
    pub allowed_types: ::std::vec::Vec<::std::string::String>,
    /// Commit message file to check
    #[usage(arg, name = "COMMIT_MSG_FILE")]
    pub commit_msg_file: ::std::string::String,
}

/// Check that executable files have shebangs
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilCheckExecutablesHaveShebangsArgs {
    /// Files to check
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Check for merge conflict markers
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilCheckMergeConflictArgs {
    /// Run the check even when not in a merge
    #[usage(long = "assume-in-merge")]
    pub assume_in_merge: bool,
    /// Files to check
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Check for broken symlinks
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilCheckSymlinksArgs {
    /// Files to check
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Detect private keys in files
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilDetectPrivateKeyArgs {
    /// Files to check
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Check for and optionally fix missing final newlines
#[derive(Args)]
#[usage(effect = "write")]
pub struct UtilEndOfFileFixerArgs {
    /// Output a diff of the change. Cannot use with `fix`.
    #[usage(long = "diff", short = 'd', conflicts = "--fix")]
    pub diff: bool,
    /// Fix files to end with exactly one newline
    #[usage(long = "fix", short = 'f')]
    pub fix: bool,
    /// Files to check/fix
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Remove UTF-8 byte order marker (BOM)
#[derive(Args)]
#[usage(effect = "write")]
pub struct UtilFixByteOrderMarkerArgs {
    /// Files to remove BOM from
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Replace UTF-8 smart quotes
#[derive(Args)]
#[usage(effect = "write")]
pub struct UtilFixSmartQuotesArgs {
    /// Check for smart quotes without fixing them
    #[usage(long = "check")]
    pub check: bool,
    /// Output a diff of the change (implies `--check`)
    #[usage(long = "diff", short = 'd')]
    pub diff: bool,
    /// Files to check/fix
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Detect and fix mixed line endings
#[derive(Args)]
#[usage(effect = "write")]
pub struct UtilMixedLineEndingArgs {
    /// Output a diff of the change. Cannot use with `fix`.
    #[usage(long = "diff", short = 'd', conflicts = "--fix")]
    pub diff: bool,
    /// Fix mixed line endings by normalizing to LF
    #[usage(long = "fix", short = 'f')]
    pub fix: bool,
    /// Files to check or fix
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Prevent commits to specific branches
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilNoCommitToBranchArgs {
    /// Branch names to protect (default: main, master)
    #[usage(long = "branch", delimiter = ',', value_name = "BRANCH", var)]
    pub branch: ::std::vec::Vec<::std::string::String>,
}

/// Check Python files for valid syntax
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilPythonCheckAstArgs {
    /// Files to check
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Detect Python debug statements
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilPythonDebugStatementsArgs {
    /// Files to check
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Check for and optionally fix trailing whitespace
#[derive(Args)]
#[usage(effect = "write")]
pub struct UtilTrailingWhitespaceArgs {
    /// Output a diff of the change. Cannot use with `fix`.
    #[usage(long = "diff", short = 'd', conflicts = "--fix")]
    pub diff: bool,
    /// Fix trailing whitespace by removing it
    #[usage(long = "fix", short = 'f')]
    pub fix: bool,
    /// Files to check/fix
    #[usage(arg, name = "FILES", required)]
    pub files: ::std::vec::Vec<::std::string::String>,
}

/// Utility commands for file operations
#[derive(Args)]
#[usage(effect = "read")]
pub struct UtilArgs {
    #[usage(subcommand)]
    pub command: UtilCommands,
}

#[derive(Subcommands)]
pub enum UtilCommands {
    /// Check for large files being added to repository
    #[usage(name = "check-added-large-files")]
    CheckAddedLargeFiles(Box<UtilCheckAddedLargeFilesArgs>),
    /// Check for UTF-8 byte order marker (BOM)
    #[usage(name = "check-byte-order-marker")]
    CheckByteOrderMarker(Box<UtilCheckByteOrderMarkerArgs>),
    /// Check for case-insensitive filename conflicts
    #[usage(name = "check-case-conflict")]
    CheckCaseConflict(Box<UtilCheckCaseConflictArgs>),
    /// Check for conventional commit message
    #[usage(name = "check-conventional-commit")]
    CheckConventionalCommit(Box<UtilCheckConventionalCommitArgs>),
    /// Check that executable files have shebangs
    #[usage(name = "check-executables-have-shebangs")]
    CheckExecutablesHaveShebangs(Box<UtilCheckExecutablesHaveShebangsArgs>),
    /// Check for merge conflict markers
    #[usage(name = "check-merge-conflict")]
    CheckMergeConflict(Box<UtilCheckMergeConflictArgs>),
    /// Check for broken symlinks
    #[usage(name = "check-symlinks")]
    CheckSymlinks(Box<UtilCheckSymlinksArgs>),
    /// Detect private keys in files
    #[usage(name = "detect-private-key")]
    DetectPrivateKey(Box<UtilDetectPrivateKeyArgs>),
    /// Check for and optionally fix missing final newlines
    #[usage(name = "end-of-file-fixer")]
    EndOfFileFixer(Box<UtilEndOfFileFixerArgs>),
    /// Remove UTF-8 byte order marker (BOM)
    #[usage(name = "fix-byte-order-marker")]
    FixByteOrderMarker(Box<UtilFixByteOrderMarkerArgs>),
    /// Replace UTF-8 smart quotes
    #[usage(name = "fix-smart-quotes")]
    FixSmartQuotes(Box<UtilFixSmartQuotesArgs>),
    /// Detect and fix mixed line endings
    #[usage(name = "mixed-line-ending")]
    MixedLineEnding(Box<UtilMixedLineEndingArgs>),
    /// Prevent commits to specific branches
    #[usage(name = "no-commit-to-branch")]
    NoCommitToBranch(Box<UtilNoCommitToBranchArgs>),
    /// Check Python files for valid syntax
    #[usage(name = "python-check-ast")]
    PythonCheckAst(Box<UtilPythonCheckAstArgs>),
    /// Detect Python debug statements
    #[usage(name = "python-debug-statements")]
    PythonDebugStatements(Box<UtilPythonDebugStatementsArgs>),
    /// Check for and optionally fix trailing whitespace
    #[usage(name = "trailing-whitespace")]
    TrailingWhitespace(Box<UtilTrailingWhitespaceArgs>),
}

/// Validate the config file
#[derive(Args)]
#[usage(effect = "read")]
pub struct ValidateArgs {}

/// Print the version of hk
#[derive(Args)]
#[usage(effect = "read")]
pub struct VersionArgs {}

#[derive(Cli)]
#[usage(bin = "hk", name = "hk", version = "1.55.0", unknown_flags = "error")]
pub struct Cli {
    /// Run as if hk was started in this directory
    #[usage(long = "cd", global, value_name = "DIRECTORY")]
    pub cd: ::std::option::Option<::std::string::String>,
    /// Select human or machine-readable execution output
    #[usage(long = "format", value_name = "FORMAT", value_enum, default = "human")]
    pub format: ::std::option::Option<FormatValue>,
    /// Path to user configuration file (deprecated: use ~/.config/hk/config.pkl or hk.local.pkl)
    #[usage(long = "hkrc", global, hide, value_name = "PATH")]
    pub hkrc: ::std::option::Option<::std::string::String>,
    /// Number of jobs to run in parallel
    #[usage(long = "jobs", short = 'j', global, value_name = "JOBS")]
    pub jobs: ::std::option::Option<::std::string::String>,
    #[usage(
        help = "Profiles to enable/disable prefix with ! to disable e.g. --profile slow --profile !fast",
        long_help = "Profiles to enable/disable\nprefix with ! to disable\ne.g. --profile slow --profile !fast",
        long = "profile",
        short = 'p',
        global,
        value_name = "PROFILE",
        var
    )]
    pub profile: ::std::vec::Vec<::std::string::String>,
    /// Shorthand for --profile=slow
    #[usage(long = "slow", short = 's', global)]
    pub slow: bool,
    /// Enables verbose output
    #[usage(
        long = "verbose",
        short = 'v',
        global,
        count,
        overrides("--quiet", "--silent")
    )]
    pub verbose: u8,
    /// Disables progress output
    #[usage(long = "no-progress", short = 'n', global)]
    pub no_progress: bool,
    /// Suppresses non-essential output (info messages, progress indicators). Failed-step diagnostics are still shown
    #[usage(
        long = "quiet",
        short = 'q',
        global,
        overrides("--verbose", "--silent")
    )]
    pub quiet: bool,
    /// Suppresses all output including warnings. Only errors are shown
    #[usage(long = "silent", global, overrides("--quiet", "--verbose"))]
    pub silent: bool,
    /// Enable tracing spans and performance diagnostics
    #[usage(long = "trace", global)]
    pub trace: bool,
    /// Output in JSON format
    #[usage(long = "json", global)]
    pub json: bool,
    #[usage(subcommand)]
    pub command: Commands,
}

#[derive(ValueEnum)]
pub enum FormatValue {
    #[usage(name = "human")]
    Human,
    #[usage(name = "json")]
    Json,
    #[usage(name = "jsonl")]
    Jsonl,
}

#[derive(Subcommands)]
pub enum Commands {
    /// Generate integration snippets for coding agents
    #[usage(name = "agent")]
    Agent(Box<AgentArgs>),
    /// Lists all available builtin linters
    #[usage(name = "builtins")]
    Builtins(Box<BuiltinsArgs>),
    /// Manage hk internal cache
    #[usage(name = "cache", hide)]
    Cache(Box<CacheArgs>),
    /// Checks code
    #[usage(name = "check", alias = "c")]
    Check(Box<CheckArgs>),
    /// Generates shell completion scripts
    #[usage(name = "completion")]
    Completion(Box<CompletionArgs>),
    /// Configuration introspection and management
    #[usage(name = "config", alias = "cfg")]
    Config(Box<ConfigArgs>),
    /// Fixes code
    #[usage(name = "fix", alias = "f")]
    Fix(Box<FixArgs>),
    /// Generates a new hk.pkl file for a project
    #[usage(name = "init", alias = "generate")]
    Init(Box<InitArgs>),
    /// Sets up git hooks to run hk.
    #[usage(name = "install", alias = "i")]
    Install(Box<InstallArgs>),
    /// Runs an MCP server for coding agents over standard input/output.
    #[usage(name = "mcp")]
    Mcp(Box<McpArgs>),
    /// Migrate from other hook managers to hk
    #[usage(name = "migrate")]
    Migrate(Box<MigrateArgs>),
    /// Run a hook
    #[usage(name = "run", alias = "r")]
    Run(Box<RunArgs>),
    /// Show the companies sponsoring hk and the jdx.dev open source tools
    #[usage(name = "sponsors")]
    Sponsors(Box<SponsorsArgs>),
    /// Run step-defined tests
    #[usage(name = "test")]
    Test(Box<TestArgs>),
    /// Removes hk hooks from the current git repository
    #[usage(name = "uninstall")]
    Uninstall(Box<UninstallArgs>),
    /// Generates a usage spec for the CLI
    #[usage(name = "usage", hide)]
    Usage(Box<UsageArgs>),
    /// Utility commands for file operations
    #[usage(name = "util")]
    Util(Box<UtilArgs>),
    /// Validate the config file
    #[usage(name = "validate")]
    Validate(Box<ValidateArgs>),
    /// Print the version of hk
    #[usage(name = "version")]
    Version(Box<VersionArgs>),
}
