enable

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package enable is the gtb-only `enable` command. It turns on a capability of a generated tool and rewrites the existing generated wiring to match, as opposed to `generate`, which adds new user-facing surface (commands, flags, config fields).

Simple on/off built-in features (ai, config, telemetry, init, update, mcp, docs, doctor, changelog) are a positional argument on `enable` itself — `gtb enable ai` flips properties.features in .gtb/manifest.yaml and re-renders the root command. Capabilities with their own configuration are scoped subcommands: `gtb enable signing` turns on consumer-side release-signing verification with its own flag set. cobra routes a first argument that matches a subcommand (signing) there, and otherwise falls through to the parent's positional feature handler.

This package lives under internal/cmd/ because the commands belong to the framework author, not the framework's downstream consumers. See docs/development/specs/2026-06-16-enable-disable-features.md and docs/development/specs/2026-06-10-signing-generator-feature.md.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidBackend = errors.New("invalid --backend: not a registered signing backend")

ErrInvalidBackend is returned when --backend is not a registered signing backend.

View Source
var ErrInvalidKeySource = errors.New("invalid --key-source: must be embedded, external, or both")

ErrInvalidKeySource is returned when --key-source is not one of the accepted values.

Functions

func NewCmdEnable

func NewCmdEnable(p *props.Props) *setup.Command

NewCmdEnable returns the top-level `gtb enable [feature]` command. A built-in feature passed positionally is toggled on; a first argument matching a scoped subcommand (signing) routes there instead; no argument opens the feature picker.

func NewCmdEnableSigning

func NewCmdEnableSigning(p *props.Props) *setup.Command

NewCmdEnableSigning returns the `gtb enable signing` subcommand. It flips the manifest signing block on and selectively regenerates only the signing-affected files.

Types

This section is empty.

Jump to

Keyboard shortcuts

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