Commands Reference¶
HexaGo provides a set of commands to scaffold and manage hexagonal architecture projects.
Command Overview¶
| Command | Description |
|---|---|
hexago init |
Create a new hexagonal architecture project |
hexago add service |
Add a business logic service/use case |
hexago add domain |
Add a domain entity or value object |
hexago add adapter |
Add a primary or secondary adapter |
hexago add worker |
Add a background worker |
hexago add migration |
Add a database migration |
hexago add tool |
Add an infrastructure tool |
hexago validate |
Validate architecture compliance |
hexago mcp |
Start the built-in MCP server for AI assistants |
hexago version |
Print version and build information |
hexago templates |
Manage and customize code generation templates |
Global Help¶
hexago --help # General help
hexago init --help # Help for a specific command
hexago add --help # Help for add subcommands
Where to Run Commands¶
All hexago add and hexago validate commands operate on the project root — the directory that contains go.mod and internal/.
You can point to it in two ways:
The -w short form also works: