v1.18.0 - CLI UX Overhaul
Release Date: March 24, 2026
Version 1.18.0 is a significant feature release that completely reworks the CLI output layer. All commands now produce styled, structured terminal output through a centralized renderer. An interactive wizard guides new users through project initialization. Global flags provide full control over color and interactivity. This release also resolves several accumulated correctness issues.
Notable Changes
- All CLI output now includes ANSI color codes by default. Scripts or CI pipelines parsing raw output should pass
--no-coloror setNO_COLOR=1. - Generated file summaries are rendered as tables instead of plain lists.
- File creation messages follow a consistent
Created: <path>format across all commands.
What Changed
CLI Output Rendering System
A new UIRenderer type (cmd/ui.go) is now the single output layer for all cmd/*.go files. No command calls fmt.Printf or fmt.Println directly for user-facing messages.
The renderer provides:
| Method | Purpose |
|---|---|
Header | Section title with separator |
Step | Numbered progress step |
Success | Green confirmation message |
Error | Red error message |
Warning | Yellow non-fatal warning |
Info | Informational note |
DryRun | Dry-run preview indicator |
FileCreated / FileBackedUp | File operation confirmation |
KeyValue / KeyValueFromConfig | Labeled value pair |
Feature | Feature flag confirmation |
Table | Column-aligned table from headers and rows |
Section / NextSteps | Grouped guidance blocks |
Spinner | Animated progress indicator for long operations |
Color output relies on lipgloss and termenv. The Spinner method runs a goroutine-based braille animation (⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏) and returns a stop function.
Interactive Initialization Wizard
When goca init <project> is run without a --module flag in an interactive terminal, a guided wizard launches automatically using huh forms. The wizard collects:
- Module path
- Database backend (sqlite, postgres, mysql, mongodb, sqlserver, dynamodb, elasticsearch)
- API type (rest, grpc, graphql)
- Optional: authentication scaffolding, configuration file generation
When --no-interactive is set or output is redirected, the wizard is bypassed and missing required flags produce an informative error.
Global Flags
Two persistent flags are now available on every command:
| Flag | Behavior |
|---|---|
--no-color | Disables all ANSI escape codes. Equivalent to setting NO_COLOR=1 |
--no-interactive | Disables all interactive prompts. Suitable for CI and automation |
Table Output for Generated File Listings
Commands that produce files now display a summary table instead of a plain list:
goca entityshows aFile / Descriptiontablegoca featureshows aLayer / File / Descriptiontable across all generated layersgoca di,goca mocks, and the safety manager's conflict summary use the same table format
Handler Dependency Auto-injection
goca handler --type http with validation enabled now automatically adds github.com/go-playground/validator/v10 to go.mod and runs go mod tidy. Previously this dependency had to be added manually after generation.
Unified English Output
All user-facing strings across cmd/*.go have been standardised to English. Mixed-language output from earlier releases is fully resolved.
Bug Fixes
Duplicate command registration — configCmd was added to rootCmd in both root.go and config_debug.go, causing config to appear twice in --help. The duplicate in root.go has been removed.
Debug output in production — usecase.go printed DEBUG: Generating interface with name: ... to standard output during normal use. This line has been removed.
Error messages during init — Twenty fmt.Printf("Error writing ...") calls in cmd/init.go were printing outside the UI rendering system, causing output to appear inline with the spinner animation. All have been migrated to ui.Warning.
Dependencies Added
| Package | Version | Purpose |
|---|---|---|
github.com/charmbracelet/lipgloss | v1.1.0 | Terminal styling |
github.com/charmbracelet/huh | v1.0.0 | Interactive forms |
github.com/charmbracelet/bubbletea | v1.3.10 | Terminal UI runtime |
github.com/charmbracelet/bubbles | v1.0.0 | UI components |
github.com/muesli/termenv | v0.16.0 | Terminal capability detection |
Migration Guide
Disabling Color Output
# Per-invocation
goca entity User --fields "name:string" --no-color
# Environment-wide
export NO_COLOR=1
goca feature Product --fields "name:string,price:float64"Non-interactive Mode for CI
goca init myapp --module github.com/org/myapp --database postgres --no-interactiveParsing Output in Scripts
If your scripts relied on parsing goca output, add --no-color to strip escape codes. The structural content (file paths, messages) is unchanged; only the format markers differ.
Verified Commands
All commands were tested against generated projects after this release:
| Command | Status |
|---|---|
goca init (with flags) | Verified |
goca init (interactive wizard) | Verified |
goca entity | Verified |
goca feature | Verified |
goca repository | Verified |
goca usecase | Verified |
goca handler | Verified |
goca mocks | Verified |
goca interfaces | Verified |
goca messages | Verified |
goca di | Verified |
goca config show | Verified |
goca config validate | Verified |
goca version | Verified |
--no-color flag | Verified |
--no-interactive flag | Verified |