Help us shape the future of Go! Take the 2026 Go Developer Survey

disable

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package disable is the gtb-only `disable` command, the inverse of internal/cmd/enable. It turns off a capability of a generated tool and rewrites the generated wiring to match.

Simple on/off built-in features (ai, config, telemetry, init, update, mcp, docs, doctor, changelog) are a positional argument on `disable` itself — `gtb disable doctor` flips properties.features in .gtb/manifest.yaml and re-renders the root command. Capabilities with their own configuration are scoped subcommands: `gtb disable signing` turns off consumer-side release-signing verification (dropping the Signing field and signing.go, keeping internal/trustkeys and any *.asc keys).

See https://gitlab.com/phpboyscout/go-tool-base/-/wikis/specs/0086-enable-disable-features and https://gitlab.com/phpboyscout/go-tool-base/-/wikis/specs/0071-signing-generator-feature.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdDisable

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

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

func NewCmdDisableMCP

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

NewCmdDisableMCP returns the dual-purpose `gtb disable mcp` subcommand. With no arguments it turns the mcp feature off (the MCP server subsystem). With one or more slash-separated command paths it withholds those commands from the MCP tool surface — recording mcp_enabled: false and re-rendering each command's cmd.go with the setup.ExcludeFromMCP marker (which also withholds the subtree). The commands stay fully runnable on the CLI; only the MCP surface is narrowed. Use it for publish/spend/secret commands an assistant should not invoke unprompted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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