Skip to content

Enable / Disable Commands

gtb enable and gtb disable change a generated tool's capabilities after creation and re-render the generated wiring to match β€” without hand-editing the // Code generated by gtb. DO NOT EDIT. root command (which regenerate project would faithfully rewrite, dropping a manual edit). Because the change is recorded in .gtb/manifest.yaml, it is regenerate-safe.

The capability is a positional argument:

  • A built-in feature name (ai, config, telemetry, init, update, mcp, docs, doctor, changelog) β€” a simple on/off toggle handled by the enable/disable command itself.
  • signing β€” a configuration-heavy capability that is a scoped subcommand with its own flags (gtb enable signing --email …); see signing. cobra routes a first argument matching the subcommand there, and any other value falls through to the positional feature handler.

Features

gtb enable ai                  # turn the AI feature on
gtb enable ai config telemetry # turn several on in one invocation
gtb disable doctor             # turn the doctor feature off
gtb enable                     # no name β†’ interactive multi-select picker

One or more feature names may be given; each is toggled (the operation is atomic per invocation β€” the root is re-rendered once). signing cannot be mixed into a feature batch (it is a scoped subcommand with its own flags); naming it alongside features is rejected as an unknown feature.

Each invocation:

  1. Loads .gtb/manifest.yaml (errors clearly if the directory is not a gtb project). Use -p/--path to point at a project other than the working dir.
  2. Validates the feature name against the toggleable set (a clear unknown feature (valid: …) error otherwise).
  3. Sets properties.features[<feature>].enabled, normalised against the framework defaults: an entry is kept only when it differs from the default, so returning a feature to its default state removes the entry (and the rendered root drops the now-redundant props.SetFeatures(...) call).
  4. Re-renders pkg/cmd/root/cmd.go so props.Tool.Features matches.
  5. Reports what changed, or that it was already in the requested state (idempotent).

With no feature name, an interactive multi-select of the candidate features is shown β€” the currently-disabled ones for enable, the currently-enabled ones for disable. Under --ci / a non-interactive session the picker is suppressed and a name is required.

The update ⇄ ForcedUpdate interaction

disable update removes the self-update subsystem entirely, including the ForcedUpdate check β€” the tool will no longer detect or apply new releases. enable/disable warns when you turn update off.

Signing

gtb enable signing / gtb disable signing toggle consumer-side release-signing verification. Unlike the feature toggles, enable signing scaffolds internal/trustkeys, wires props.Signing, and emits the enforcement defaults from its own flag set; disable signing drops the Signing field and signing.go while keeping internal/trustkeys and any *.asc keys. Run gtb enable signing --help for the full flag surface, and see signing.

Composition with generate and regenerate

  • gtb generate project --features … sets the initial feature set at creation.
  • gtb enable/disable <feature> is the post-generation editor of that same manifest block.
  • gtb regenerate project renders from the manifest, so a toggle made via these commands persists across regenerations.

See docs/development/specs/2026-06-16-enable-disable-features.md.