goca config
Manage .goca.yaml configuration files for your project.
Syntax
goca config [subcommand] [flags]Description
The goca config command provides tools to initialize, display, validate, and manage your project's .goca.yaml configuration file. When run without a subcommand, it defaults to show.
Configuration First
Running goca config init before generating features ensures consistent code generation settings across your team.
Subcommands
show
Display the current project configuration loaded from .goca.yaml.
goca config showinit
Initialize a new .goca.yaml configuration file in the current directory with intelligent defaults based on your project structure.
goca config init [flags]Flags:
| Flag | Type | Default | Description |
|---|---|---|---|
--template | string | "" | Use predefined template (web, api, microservice, full) |
--force | bool | false | Overwrite existing configuration file |
--database | string | "" | Database type (postgres, mysql, sqlite) |
--handlers | strings | [] | Handler types (http, grpc, cli) |
validate
Validate the current .goca.yaml configuration file for errors and warnings.
goca config validatetemplate
Show available predefined configuration templates for different project types.
goca config templateUsage Examples
Initialize with defaults
goca config initInitialize from a template
goca config init --template api --database postgresValidate existing config
goca config validateView current settings
goca config
# or
goca config showConfiguration File Format
The .goca.yaml file controls code generation behavior:
project:
name: myproject
module: github.com/user/myproject
database:
type: postgres
handlers:
- http
templates:
directory: .goca/templates
naming:
file_convention: snake_caseRelated Commands
goca init— Initialize a new project (can generate.goca.yaml)goca doctor— Verify project health including configgoca template— Manage custom code templates