How samirkoirala/devops-doctor works
devops-doctor is a Go CLI for diagnosing a local machine and its DevOps toolchain. A user selects a full or targeted check; the CLI delegates selection and optional-suite detection to the runner, which invokes the relevant diagnostic suites. Suites inspect system health, nginx, Docker, Compose, and Kubernetes, then return findings for human or JSON formatting. The README documents these capabilities; sampled source confirms the principal calls and command execution layer.
Main entry points: result.go Result model · runner.go Check runner · exec.go Command executor · checks.go System checks
Components 16
CLI and orchestration
- CLI entrypoint
cmd/devops-doctor/main.go - Check runner
internal/runner/runner.go
Diagnostic suites
- System checks
internal/system/checks.go - Disk checks
internal/system/disk.go - nginx checks
internal/nginx/checks.go - Docker checks
internal/docker/checks.go - Compose checks
internal/compose/checks.go - Kubernetes checks
internal/k8s/checks.go - Port checks
internal/network/ports.go
Results and reporting
- Result model
internal/output/result.go - Output formatter
internal/output/formatter.go
Command execution
- Command executor
pkg/utils/exec.go
Other components
- User
- Host tools and OS
- Kubernetes cluster
- Terminal or JSON consumer
Connections 29
- User → CLI entrypoint: invokes
- CLI entrypoint → Check runner: selects checks
- CLI entrypoint → Output formatter: configures and calls
- Check runner → System checks: runs
- Check runner → nginx checks: runs
- Check runner → Docker checks: runs
- Check runner → Compose checks: discovers and runs
- Check runner → Kubernetes checks: detects and runs
- System checks → Disk checks: calls disk check
- Docker checks → Port checks: calls port check
- System checks → Command executor: runs commands
- Disk checks → Command executor: runs df
- nginx checks → Command executor: runs commands
- Docker checks → Command executor: runs commands
- Compose checks → Command executor: runs commands
- Kubernetes checks → Command executor: runs commands
- Port checks → Command executor: checks listeners
- Command executor → Host tools and OS: executes commands and reads OS
- Kubernetes checks → Kubernetes cluster: queries via kubectl
- System checks → Result model: creates findings
- Disk checks → Result model: creates findings
- nginx checks → Result model: creates findings
- Docker checks → Result model: creates findings
- Compose checks → Result model: creates findings
- Kubernetes checks → Result model: creates findings
- Port checks → Result model: creates findings
- Check runner → Result model: orders findings
- Output formatter → Result model: renders findings
- Output formatter → Terminal or JSON consumer: prints output