doctor

package
v0.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteInstall

func ExecuteInstall(plan *InstallPlan, autoConfirm bool) error

ExecuteInstall runs the install plan, printing each command before running it.

func RunAuthStep

func RunAuthStep(step AuthStep, envFile string) bool

RunAuthStep executes a single authentication step interactively. Returns true if the step was completed successfully.

Types

type AILandscape added in v0.40.0

type AILandscape struct {
	Providers   []AIProviderStatus `json:"providers"`
	LocalReady  bool               `json:"local_ready"`  // At least one local LLM is running
	CloudReady  bool               `json:"cloud_ready"`  // At least one cloud API key is set
	AgentsFound int                `json:"agents_found"` // Number of coding agents detected
}

AILandscape holds the detected AI providers and coding agents.

func CheckAILandscape added in v0.40.0

func CheckAILandscape() AILandscape

CheckAILandscape probes for available AI providers and coding agents.

type AIProviderStatus added in v0.40.0

type AIProviderStatus struct {
	Name      string `json:"name"`
	Type      string `json:"type"` // "local_llm", "cloud_api", or "coding_agent"
	Available bool   `json:"available"`
	Detail    string `json:"detail,omitempty"`
	Note      string `json:"note,omitempty"`
}

AIProviderStatus represents the state of a single AI provider.

type AuthStep

type AuthStep struct {
	Name       string `json:"name"`
	RequiredBy string `json:"required_by"`
	Configured bool   `json:"configured"`
	Detail     string `json:"detail"`
	Action     string `json:"action,omitempty"` // human-readable action to take
}

AuthStep represents a single authentication step.

func AuthPlan

func AuthPlan(envFile string) []AuthStep

AuthPlan returns the list of authentication steps with their current status.

type CredentialStatus

type CredentialStatus struct {
	Name       string `json:"name"`
	RequiredBy string `json:"required_by"`
	Configured bool   `json:"configured"`
	Detail     string `json:"detail,omitempty"`
	HowToFix   string `json:"how_to_fix,omitempty"`
}

CredentialStatus represents the state of a credential or auth session.

func CheckCredentials

func CheckCredentials(envFile string) []CredentialStatus

CheckCredentials audits all credentials and auth sessions.

type InstallPlan

type InstallPlan struct {
	PackageManager string        `json:"package_manager"`
	Steps          []InstallStep `json:"steps"`
}

InstallPlan describes what will be installed and the commands to run.

func PlanInstall

func PlanInstall(requiredOnly bool) (*InstallPlan, error)

PlanInstall looks at missing tools and returns the commands needed to install them. If requiredOnly is true, only required tools are included.

type InstallStep

type InstallStep struct {
	Tool        string `json:"tool"`
	Command     string `json:"command"`
	Tap         string `json:"tap,omitempty"`
	IsRequired  bool   `json:"required"`
	FeatureArea string `json:"feature_area,omitempty"`
}

InstallStep is a single install action.

type Report

type Report struct {
	System      SystemInfo         `json:"system"`
	Tools       []ToolStatus       `json:"tools"`
	Credentials []CredentialStatus `json:"credentials"`
	AI          AILandscape        `json:"ai"`
}

Report is the full doctor audit result.

func RunFullAudit

func RunFullAudit(envFile string) Report

RunFullAudit runs the complete doctor check.

type SystemInfo

type SystemInfo struct {
	OS             string `json:"os"`
	Arch           string `json:"arch"`
	PackageManager string `json:"package_manager"`
	PMVersion      string `json:"pm_version,omitempty"`
}

SystemInfo holds detected system information.

func DetectSystem

func DetectSystem() SystemInfo

DetectSystem detects the OS, architecture, and package manager.

type ToolStatus

type ToolStatus struct {
	Name        string `json:"name"`
	Binary      string `json:"binary"`
	FeatureArea string `json:"feature_area"`
	Required    bool   `json:"required"`
	Installed   bool   `json:"installed"`
	Version     string `json:"version,omitempty"`
	Path        string `json:"path,omitempty"`
	InstallCmd  string `json:"install_cmd,omitempty"`
	InstallTap  string `json:"install_tap,omitempty"`
	Note        string `json:"note,omitempty"`
}

ToolStatus represents the state of a single prerequisite tool.

func CheckTools

func CheckTools() []ToolStatus

CheckTools audits all prerequisite CLI tools.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL