Documentation
¶
Overview ¶
Package doctor checks that the Claude Code plugin and the f10 binary are present, agree with each other and are wired into their environment. Every check reads and none writes, so `f10 doctor` is always safe to run.
Index ¶
Constants ¶
const ( CheckVersion = "version" CheckScripts = "scripts" CheckHooks = "hooks" CheckStatusline = "statusline" CheckHerdr = "herdr" CheckRemote = "remote" CheckHost = "host" CheckDriver = "driver" CheckProject = "project" )
Check names, in the order Run reports them.
const ( StatusOK = "ok" StatusProblem = "problem" StatusNotNeeded = "not_needed" // the check does not apply here; it never fails the run )
The three outcomes of a check.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env struct {
ClaudeDir string // CLAUDE_CONFIG_DIR or ~/.claude
Home string // the statusline symlink lives under ~/.claude/f10 whatever ClaudeDir is
Layout *layout.Layout
Probes *probe.Probes
Facts *facts.Effective
Version string // the binary's, as `f10 --version` prints it
Driver *trackerdriver.Driver // the project's tracker driver; nil when it has none
NeedsDriver bool // the tracker reads only through a driver, as Notion or Jira does
Remote *RemoteState // the tailnet listener and the service; nil reads as both off
Getenv func(string) string
LookPath func(string) (string, error)
Run func(ctx context.Context, dir, name string, args ...string) (shell.Result, error)
}
Env is everything the checks read from outside, so a test can hand them a temp directory and fakes instead of the real home and PATH.
type RemoteState ¶ added in v0.62.0
type RemoteState struct {
Enabled bool
Port int
MCP bool // MCP tools served on the listener at /mcp
ConfigErr string // the setting does not read
Tailnet string // this machine's Tailscale address; "" when Tailscale is down
DaemonRunning bool
Bound string // the address the daemon listens on
Reason string // why it does not
URL string // the web client's address while bound
HTTPSReason string // why the listener serves plain HTTP
ServiceFile string // "" on a platform with no service
ServiceInstalled bool
ServiceProgram string
ProgramMissing bool // the program the service runs is gone
}
RemoteState is what the remote check reads: the listener's setting, the Tailscale address, what the running daemon bound, and the service.
type Result ¶
type Result struct {
Name string `json:"name"`
Status string `json:"status"`
Scope []string `json:"scope"` // what a problem affects (commands, or the badge); empty means every command
Detail string `json:"detail"` // the evidence, one line
Remedy string `json:"remedy"` // empty unless the status is problem
}
A Result is one check's answer.