Documentation
¶
Overview ¶
Package cli is the Cobra command tree for `gombit` (D13 / ADR-014).
The framework binary (`cmd/gombit`) and generated application binaries (`cmd/gombit` inside a `gombit new` app) share NewRoot. Apps attach feature-package management commands with AddCommand — the only supported registration path. There is no second command router and no reflection discovery of commands.
Index ¶
Constants ¶
const DevVersion = "dev"
DevVersion is reported when the binary carries neither ldflags nor usable module build info (a plain `go run ./cmd/gombit` or `go build` from source).
Variables ¶
var ( Version = "" Commit = "" BuildDate = "" )
Build metadata. Release binaries stamp these with -ldflags, e.g.
-X github.com/gombit-dev/gombit/cli.Version=v0.1.0
When they are empty the values fall back to the module build info recorded by `go install`, so `go install ...@v0.1.0` still self-reports v0.1.0.
var LoadConfig = config.Load
LoadConfig is the typed config loader used by doctor, config show, db, and dev. Tests may replace it.
var ( // MaxOpenAPISize is the fetch cap for gombit openapi generate. MaxOpenAPISize int64 = defaultMaxOpenAPISize )
var RunBuild = build.Run
RunBuild performs gombit build --embed. Tests may replace it.
var RunDev = dev.Run
RunDev starts the API and Vite frontend. Tests may replace it.
Functions ¶
func AddCommand ¶
AddCommand attaches cmds to root via Cobra AddCommand. This is the only supported registration path for app-owned management commands.