Skip to content

Migration: annotation-based update-check exemption and the auxiliary fast path

Shipped with the 2026-07-23-bootstrap-auxiliary-command-exemptions spec. Two behavioural changes affect downstream tools; the function signatures are unchanged.

setup.SkipUpdateCheck no longer matches Use strings

Previously, the pre-run update check was skipped for any command whose leaf cmd.Use was exactly update, auth, init, or version — colliding with unrelated downstream commands that happened to share a name, and silently breaking when Use carried an args suffix.

Now a command is exempt when it or any ancestor:

  • carries the setup.MarkSkipUpdateCheck annotation, or
  • is wrapped (via setup.Wrap) with the UpdateCmd or InitCmd feature.

GTB's built-ins stamp themselves (version, doctor, mcp). If your tool relied on naming a command update/auth/init/version to suppress the check, stamp it explicitly:

setup.MarkSkipUpdateCheck(cmd)

Conversely, a downstream command coincidentally named auth or init now gets the normal update check — previously it was wrongly exempted.

Auxiliary commands skip the framework bootstrap

The root pre-run now returns early — no config load, telemetry consent, collector wiring, or update check; --debug still honoured — for:

  • cobra's own generated help, completion and hidden __complete commands (so tool help and shell completion work on a fresh install with no config file);
  • the whole init subtree, including provider subcommands such as init github (previously config-gated — the one tree meant to fix that state);
  • commands you list in Tool.Bootstrap.AuxiliaryCommands (matched by Name() or full CommandPath()). These run with props.Config left nil, so they must read nothing from configuration — use Tool.Bootstrap.SkipConfigCheck / setup.SkipConfigCheck instead if the command needs a tolerant config load.

The missing-config error for gated commands now also carries the hint Run '<tool> init' to create a configuration.