Implements a comprehensive 'doctor' command that diagnoses oh-my-opencode installation health with a beautiful TUI output. Checks performed: - OpenCode installation (version, path, binary) - Plugin registration in opencode.json - Configuration file validity (oh-my-opencode.json) - Auth providers (Anthropic, OpenAI, Google) - Dependencies (ast-grep CLI/NAPI, comment-checker) - LSP servers availability - MCP servers (builtin and user) - Version status and updates Features: - Beautiful TUI with symbols and colors - --verbose flag for detailed output - --json flag for machine-readable output - --category flag for running specific checks - Exit code 1 on failures for CI integration Closes #333 Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
12 lines
338 B
TypeScript
12 lines
338 B
TypeScript
import type { DoctorOptions } from "./types"
|
|
import { runDoctor } from "./runner"
|
|
|
|
export async function doctor(options: DoctorOptions = {}): Promise<number> {
|
|
const result = await runDoctor(options)
|
|
return result.exitCode
|
|
}
|
|
|
|
export * from "./types"
|
|
export { runDoctor } from "./runner"
|
|
export { formatJsonOutput } from "./formatter"
|