v1.18.2 - Doctor, Upgrade & Quiet Mode
Release Date: March 25, 2026
Version 1.18.2 adds two new project-management commands (goca doctor and goca upgrade), two new global verbosity flags (--quiet and --verbose), and an improved dry-run preview table that distinguishes create from overwrite actions.
New Commands
goca doctor — Project Health Checks
goca doctor runs six automated checks against your project and reports results in a styled table:
| Check | What it verifies |
|---|---|
go.mod | Module file exists in the project root |
.goca.yaml | Goca configuration file present |
| Clean Architecture dirs | internal/domain, internal/usecase, internal/repository, internal/handler all exist |
go build ./... | Project compiles without errors |
go vet ./... | No vet warnings |
| DI container | internal/di/container.go present |
Each check reports one of three statuses:
✓ go.mod found
✓ .goca.yaml found
✗ Missing directories: internal/repository, internal/handler
→ Run goca doctor --fix to create them
✓ go build passed
✓ go vet passed
⚠ DI container not found — run goca di <name> to generate one--fix flag — automatically creates any missing Clean Architecture directories:
goca doctor --fixgoca doctor exits with code 1 when any check fails, making it safe to use in CI pipelines:
# .github/workflows/ci.yml
- name: Goca health check
run: goca doctorgoca upgrade — Config & Metadata Management
goca upgrade reads .goca.yaml, compares the recorded goca_version against the installed binary version, and reports the state of each configuration section:
Installed version: v1.18.2
Config version: v1.18.0
Configuration sections:
✓ set project
✓ set architecture
✓ set database
○ default generation
○ default testing
✓ set features
○ default templates
○ default deployFlags:
| Flag | Description |
|---|---|
--update | Writes the current binary version to project.metadata.goca_version in .goca.yaml (preserves formatting and comments) |
--regenerate <feature> | Prints the exact goca feature <name> --force command to re-run generation for a specific feature |
--dry-run | Previews any file writes without modifying .goca.yaml |
# Check without changing anything
goca upgrade
# Record the current version in config
goca upgrade --update
# Get the regeneration command for the Order feature
goca upgrade --regenerate Order
# Output: goca feature Order --fields "..." --forceNew Global Flags: --quiet and --verbose
Two persistent flags are now available on every command:
| Flag | Short | Verbosity | Behavior |
|---|---|---|---|
--quiet | -q | 0 | Suppresses all output except Success and Error messages |
| (default) | 1 | Normal output (unchanged from previous behavior) | |
--verbose | -v | 2 | Enables Debug and Trace output from UIRenderer |
# Silent generation — only show success/error
goca feature Product --fields "Name:string,Price:float64" --quiet
# Verbose — show debug info during generation
goca feature Product --fields "Name:string,Price:float64" --verboseTwo new UIRenderer methods are available to commands at verbosity level 2:
ui.Debug("resolved template path: /tmp/goca/entity.tmpl")
ui.Trace("field parser: processing token 'Name:string'")All non-critical output methods (Header, Step, Info, Warning, KeyValue, etc.) are now gated by verbosity >= 1 and silenced by --quiet.
Improved Dry-Run Preview Table
The dry-run summary now shows a three-column table distinguishing create (new file) from overwrite (existing file):
DRY-RUN MODE: Previewing changes without creating files
File Action Size
internal/domain/product.go create 1.2 KB
internal/usecase/product_service.go overwrite 2.4 KB
internal/repository/product_repository.go create 1.6 KB
DRY-RUN SUMMARY: Would create 2 files, overwrite 1 file
Run without --dry-run to apply changes.Previously, the table showed only two columns (File / Status) with no size information.
Bug Fixes
docs/guide/installation.mdversion example corrected from the stalev2.0.0reference tov1.18.2
Related
- Safety & Dependency Management —
--dry-run,--force,--backupdocumentation - v1.18.7 Release Notes — safety flags universally applied to all commands
- v1.18.0 Release Notes — UIRenderer and initial SafetyManager introduction