Documentation
¶
Overview ¶
Hand-written (NOT generated). Surfaces GrowthBook confirmation holds: a write the server holds for a person to approve (HTTP 202), and the outcome reported by `meta get-confirmation`. Either way the response body still prints as usual; this adds a stderr notice and an exit code a script or agent can't miss.
Hand-written (NOT generated). Ported from the legacy TS CLI's `features generate-types`; preserved across regen via persistentEdits.
Hand-written (NOT generated). `growthbook profiles` — manage named credential/server profiles (parity with the legacy CLI's profiles). Registered from root.go via a same-package reference, so the generated import block is never touched.
Hand-written (NOT generated). Pins flag shorthands the generator would otherwise move: it gives a flag its first letter only while no sibling flag shares it.
Hand-written (NOT generated). All customization of the generated root command is funneled through customRegister, so the ONLY edit to the generated root.go is a single `customRegister(rootCmd)` line (see .speakeasy/patches/). Keeping the patch to one line makes it robust across regenerations — there are no multi-line hunks whose context can drift.
Hand-written (NOT generated). Helper for the patched whoami command.
Index ¶
Constants ¶
const ExitConfirmationPending = 3
ExitConfirmationPending is the exit code while an action waits on a person.
Variables ¶
var BuildTime string
BuildTime is optionally set at build time via ldflags targeting the main package.
var Version = "4.1.0"
Version is the current version of the CLI, defaulting to the version from gen.yaml. It can be overridden at build time via ldflags targeting the main package, which propagates the value here (see cmd/growthbook/main.go):
go build -ldflags "-X main.version=x.y.z" ./cmd/growthbook
Functions ¶
func NewRootCommand ¶
NewRootCommand creates and returns the root command. This is exported for testing purposes to allow in-process command execution.
Types ¶
This section is empty.