Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 47 additions & 5 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ pub struct Cli {

#[derive(Subcommand)]
pub enum Command {
/// Install agent files from a manifest or remote git repository
/// Install agent files from dependencies in agentfiles.json, or add a new source
Install {
/// Source: local path, directory, or git URL (e.g., github.com/org/repo@v1.0)
#[arg(default_value = ".")]
source: String,
/// Source: local path or git URL (e.g., github.com/org/repo@v1.0).
/// If omitted, installs all dependencies from agentfiles.json.
source: Option<String>,

/// Installation scope: project or global
#[arg(short, long, default_value = "project")]
Expand All @@ -32,10 +32,23 @@ pub enum Command {
#[arg(short, long, value_delimiter = ',')]
providers: Option<Vec<AgentProvider>>,

/// File placement strategy: copy or link (symlink). Can be overridden per-file in the manifest.
/// File placement strategy: copy or link (symlink). Can be overridden per-dependency in the manifest.
#[arg(long)]
strategy: Option<FileStrategy>,

/// Cherry-pick specific items by name (comma-separated).
/// Supports kind prefix: skills/review, commands/deploy, or plain: review
#[arg(long, value_delimiter = ',')]
pick: Option<Vec<String>>,

/// Do not save the source to agentfiles.json after installing
#[arg(long)]
no_save: bool,

/// Preview what would be installed without making changes
#[arg(long)]
dry_run: bool,

/// Project root directory (for project scope installations)
#[arg(long, default_value = ".")]
root: PathBuf,
Expand All @@ -59,6 +72,35 @@ pub enum Command {
source: String,
},

/// Remove a dependency from agentfiles.json
Remove {
/// Source to remove (matches by normalized URL)
source: String,

/// Also delete installed files from provider directories
#[arg(long)]
clean: bool,

/// Installation scope used when installing (for --clean)
#[arg(short, long, default_value = "project")]
scope: FileScope,

/// Target providers to clean (for --clean). Defaults to all.
#[arg(short, long, value_delimiter = ',')]
providers: Option<Vec<AgentProvider>>,

/// Project root directory
#[arg(long, default_value = ".")]
root: PathBuf,
},

/// List dependencies from agentfiles.json
List {
/// Project root directory
#[arg(default_value = ".")]
root: PathBuf,
},

/// Show the provider compatibility matrix
Matrix,
}
Loading