Skip to content

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:

CheckWhat it verifies
go.modModule file exists in the project root
.goca.yamlGoca configuration file present
Clean Architecture dirsinternal/domain, internal/usecase, internal/repository, internal/handler all exist
go build ./...Project compiles without errors
go vet ./...No vet warnings
DI containerinternal/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:

bash
goca doctor --fix

goca doctor exits with code 1 when any check fails, making it safe to use in CI pipelines:

yaml
# .github/workflows/ci.yml
- name: Goca health check
  run: goca doctor

goca 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  deploy

Flags:

FlagDescription
--updateWrites 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-runPreviews any file writes without modifying .goca.yaml
bash
# 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 "..." --force

New Global Flags: --quiet and --verbose

Two persistent flags are now available on every command:

FlagShortVerbosityBehavior
--quiet-q0Suppresses all output except Success and Error messages
(default)1Normal output (unchanged from previous behavior)
--verbose-v2Enables Debug and Trace output from UIRenderer
bash
# 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" --verbose

Two new UIRenderer methods are available to commands at verbosity level 2:

go
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.md version example corrected from the stale v2.0.0 reference to v1.18.2

Released under the MIT License.