feat: add goose info command to display directories in use + config (#1239)

This commit is contained in:
Kalvin C
2025-02-18 10:29:03 -08:00
committed by GitHub
parent c58275c38a
commit b22af1d4c8
4 changed files with 94 additions and 9 deletions

View File

@@ -5,6 +5,7 @@ use console::style;
use goose::config::Config;
use goose_cli::commands::agent_version::AgentCommand;
use goose_cli::commands::configure::handle_configure;
use goose_cli::commands::info::handle_info;
use goose_cli::commands::mcp::run_server;
use goose_cli::logging::setup_logging;
use goose_cli::session::build_session;
@@ -23,6 +24,14 @@ enum Command {
#[command(about = "Configure Goose settings")]
Configure {},
/// Display Goose configuration information
#[command(about = "Display Goose information")]
Info {
/// Show verbose information including current configuration
#[arg(short, long, help = "Show verbose information including config.yaml")]
verbose: bool,
},
/// Manage system prompts and behaviors
#[command(about = "Run one of the mcp servers bundled with goose")]
Mcp { name: String },
@@ -158,6 +167,10 @@ async fn main() -> Result<()> {
let _ = handle_configure().await;
return Ok(());
}
Some(Command::Info { verbose }) => {
handle_info(verbose)?;
return Ok(());
}
Some(Command::Mcp { name }) => {
let _ = run_server(&name).await;
}