goose doctor (#8342)

Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2026-04-07 10:12:16 -04:00
committed by GitHub
parent c4aa7f56df
commit 0028d97c23
8 changed files with 359 additions and 1 deletions
+5
View File
@@ -711,6 +711,9 @@ enum Command {
verbose: bool,
},
#[command(about = "Check that your Goose setup is working")]
Doctor {},
/// Manage system prompts and behaviors
#[command(about = "Run one of the mcp servers bundled with goose")]
Mcp {
@@ -1026,6 +1029,7 @@ pub struct InputConfig {
fn get_command_name(command: &Option<Command>) -> &'static str {
match command {
Some(Command::Configure {}) => "configure",
Some(Command::Doctor {}) => "doctor",
Some(Command::Info { .. }) => "info",
Some(Command::Mcp { .. }) => "mcp",
Some(Command::Acp { .. }) => "acp",
@@ -1755,6 +1759,7 @@ pub async fn cli() -> anyhow::Result<()> {
Ok(())
}
Some(Command::Configure {}) => handle_configure().await,
Some(Command::Doctor {}) => crate::commands::doctor::handle_doctor().await,
Some(Command::Info { verbose }) => handle_info(verbose),
Some(Command::Mcp { server }) => handle_mcp_command(server).await,
Some(Command::Acp { builtins }) => goose_acp::server::run(builtins).await,
+15
View File
@@ -0,0 +1,15 @@
use anyhow::Result;
use crate::session::build_session;
use crate::session::SessionBuilderConfig;
pub async fn handle_doctor() -> Result<()> {
let mut session = build_session(SessionBuilderConfig {
no_session: true,
interactive: true,
..Default::default()
})
.await;
session.interactive(Some("/doctor".to_string())).await
}
+1
View File
@@ -1,4 +1,5 @@
pub mod configure;
pub mod doctor;
pub mod gateway;
pub mod info;
pub mod project;