cli

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 67 Imported by: 0

Documentation

Overview

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). 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

This section is empty.

Variables

View Source
var BuildTime string

BuildTime is optionally set at build time via ldflags targeting the main package.

View Source
var Version = "1.0.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 Execute

func Execute() error

func NewRootCommand

func NewRootCommand() (*cobra.Command, error)

NewRootCommand creates and returns the root command. This is exported for testing purposes to allow in-process command execution.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL