Skip to content

Commit

Permalink
add rest of the help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lily-de committed Nov 26, 2024
1 parent a95f1a7 commit fa16ca7
Showing 1 changed file with 91 additions and 13 deletions.
104 changes: 91 additions & 13 deletions crates/goose-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,48 +62,126 @@ struct Cli {

#[derive(Subcommand)]
enum Command {
/// Configure Goose settings and profiles
#[command(about = "Configure Goose settings and profiles")]
Configure {
/// Name of the profile to configure. Use 'default' for the default profile.
/// Name of the profile to configure
#[arg(
help = "Profile name to configure",
long_help = "Create or modify a named configuration profile. Profiles store settings like API keys and model preferences."
long_help = "Create or modify a named configuration profile. Use 'default' for the default profile."
)]
profile_name: Option<String>,
},

/// Manage system prompts and behaviors
#[command(about = "Manage system prompts and behaviors")]
System {
#[command(subcommand)]
action: SystemCommands,
},
/// Start or resume sessions with an optional session name

/// Start or resume interactive chat sessions
#[command(
about = "Start or resume interactive chat sessions",
alias = "s",
)]
Session {
#[arg(short, long)]
/// Name for the chat session
#[arg(
short,
long,
value_name = "NAME",
help = "Name for the chat session (e.g., 'project-x')",
long_help = "Specify a name for your chat session. When used with --resume, will resume this specific session if it exists."
)]
session: Option<String>,
#[arg(short, long)]

/// Configuration profile to use
#[arg(
short,
long,
value_name = "PROFILE",
help = "Configuration profile to use (e.g., 'default')",
long_help = "Use a specific configuration profile. Profiles contain settings like API keys and model preferences."
)]
profile: Option<String>,
#[arg(short, long, action = clap::ArgAction::SetTrue)]

/// Resume a previous session
#[arg(
short,
long,
help = "Resume a previous session (last used or specified by --session)",
long_help = "Continue from a previous chat session. If --session is provided, resumes that specific session. Otherwise resumes the last used session."
)]
resume: bool,
},
/// Run Goose operations once-off using a specified instruction file containing commands

/// Execute commands from an instruction file
#[command(about = "Execute commands from an instruction file")]
Run {
#[arg(short, long)]
/// Path to instruction file containing commands
#[arg(
short,
long,
required = true,
value_name = "FILE",
help = "Path to instruction file containing commands",
long_help = "Path to a file containing commands to execute. Each command should be on a new line. \
The file will be executed in order from top to bottom."
)]
instructions: Option<String>,
#[arg(short, long)]

/// Configuration profile to use
#[arg(
short,
long,
value_name = "PROFILE",
help = "Configuration profile to use (e.g., 'default')",
long_help = "Use a specific configuration profile. Profiles contain settings like API keys and model preferences."
)]
profile: Option<String>,
#[arg(short, long)]

/// Name for this run session
#[arg(
short,
long,
value_name = "NAME",
help = "Name for this run session (e.g., 'daily-tasks')",
long_help = "Specify a name for this run session. This helps identify and resume specific runs later."
)]
session: Option<String>,
#[arg(short, long, action = clap::ArgAction::SetTrue)]

/// Resume a previous run
#[arg(
short,
long,
action = clap::ArgAction::SetTrue,
help = "Resume from a previous run",
long_help = "Continue from a previous run, maintaining the execution state and context."
)]
resume: bool,
},
}

#[derive(Subcommand)]
enum SystemCommands {
/// Add a new system prompt
#[command(about = "Add a new system prompt from URL")]
Add {
#[arg(help = "The URL to add system")]
#[arg(
help = "URL of the system prompt to add",
long_help = "URL pointing to a file containing the system prompt to be added."
)]
url: String,
},

/// Remove an existing system prompt
#[command(about = "Remove an existing system prompt")]
Remove {
#[arg(help = "The URL to remove system")]
#[arg(
help = "URL of the system prompt to remove",
long_help = "URL of the system prompt that should be removed from the configuration."
)]
url: String,
},
}
Expand Down

0 comments on commit fa16ca7

Please sign in to comment.