gofasta doctor
Verifies that required and optional tools are installed, checks project configuration, and tests database connectivity. Useful for diagnosing setup issues and for including in bug reports.
Usage
gofasta doctorThis command takes no flags.
Examples
$ gofasta doctor
Required:
✓ go go version go1.25.0 darwin/arm64
✓ migrate v4.18.1
Optional:
✓ docker Docker version 27.4.0
✓ air available (Go tool)
✓ wire available (Go tool)
✓ gqlgen available (Go tool)
✓ swag available (Go tool)
Project:
✓ config.yaml found
✓ database reachableWhat It Checks
Required Tools
| Tool | What it checks |
|---|---|
go | Go compiler is installed and reports its version |
migrate | golang-migrate CLI is installed |
Optional Tools
| Tool | What it checks |
|---|---|
docker | Docker is installed (needed for docker compose workflows) |
air | Air hot-reload tool is available as a Go tool |
wire | Google Wire DI generator is available |
gqlgen | GraphQL code generator is available (only needed for GraphQL projects) |
swag | Swagger/OpenAPI generator is available |
Project Health
When run inside a project directory (where config.yaml exists):
| Check | What it verifies |
|---|---|
config.yaml | Configuration file exists |
database | Database is reachable using the connection details from config |
refactor | Layout-migration eligibility — runs the same full-project preflight as gofasta refactor status: a summary line, one ✗ entry per blocker (torn layout state, unparseable files, non-scaffold gqlgen.yml, no git repository), one info entry per warning (unmanaged files, renamed scaffold symbols, missing generator markers). These entries never fail the doctor run — they describe the project’s shape, not broken prerequisites |
Last updated on