use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser)]
#[command(
name = "agentignore",
about = "Policy-filtered FUSE filesystem for AI agents",
version,
after_help = "EXAMPLES:\n agentignore init Create example .agentignore and .agentallow files in the current folder\n agentignore run bash Mount the current folder and run bash in it\n agentignore run pi Mount the current folder and run pi coding agent in it\n agentignore run -- bash -c 'ls && cat .env' Run a multi-word command inside the filtered view\n agentignore explain /etc Show why /etc would be hidden"
)]
pub struct Args {
#[command(subcommand)]
pub command: Command,
}
#[derive(Subcommand)]
pub enum Command {
Run {
#[arg(trailing_var_arg = true, required = true, num_args = 1..)]
command: Vec<String>,
#[arg(short = 's', long = "source")]
source: Option<PathBuf>,
#[arg(short = 'c', long = "show-config-files", default_value_t = false)]
show_config_files: bool,
},
Init {
folder: Option<PathBuf>,
},
Explain { path: PathBuf },
Mount {
source: PathBuf,
mountpoint: PathBuf,
#[arg(long = "show-dashboard", short = 'D', default_value_t = false)]
show_dashboard: bool,
#[arg(short = 'c', long = "show-config-files", default_value_t = false)]
show_config_files: bool,
},
Unmount { mountpoint: PathBuf },
Check,
Doctor,
}