Commands Overview¶
GTB provides a set of essential built-in commands that are automatically included in every CLI tool. These commands provide core functionality for configuration management, version checking, self-updating, interactive documentation, and AI agent integration.
Available Commands¶
| Command | Purpose |
|---|---|
| Root | Application entry point and service orchestration. |
| Init | Tool configuration and environment setup. |
| Config | Programmatic config access for CI and scripted setup. (opt-in) |
| Version | Version display and update checking. |
| Update | Automated binary updates and migration. |
| Docs | Interactive TUI documentation browser, plus roff man-page generation. |
| Man | Hidden, opt-in roff man-page emitter for packaging/preview. See Docs › Man-page generation. (opt-in) |
| Doctor | Environment and configuration health checks, plus doctor report — a redacted, paste-ready support bundle. |
| Changelog | Embedded changelog display. |
| MCP | AI agent integration (Model Context Protocol). |
| Telemetry | Opt-in usage telemetry status and management. (opt-in) |
Framework-developer commands (gtb)¶
These commands are part of the gtb binary itself — the tooling you use to build
a CLI on GTB. They are not shipped in your generated tool.
| Command | Purpose |
|---|---|
| generate | Scaffold projects, commands, flags, docs, and man pages. |
| regenerate | Rebuild a project from its manifest, or the manifest from source. |
| remove | Remove a generated command from a project. |
| keys | Generate, mint, and publish OpenPGP signing keys. |
| sign | Produce an OpenPGP detached signature for a file. |
| enable / disable | Toggle capabilities (signing, MCP, features) on a project. |
| template | Manage custom template-overlay sources. |
Feature flags¶
Built-in commands are registered automatically by root.NewCmdRoot. Each is gated
by a feature-flag constant in props; the default-enabled set ships in every tool,
and the opt-in set must be turned on explicitly.
| Constant | Command | Default |
|---|---|---|
props.UpdateCmd |
update |
enabled |
props.InitCmd |
init |
enabled |
props.McpCmd |
mcp |
enabled |
props.DocsCmd |
docs |
enabled |
props.DoctorCmd |
doctor |
enabled |
props.ChangelogCmd |
changelog |
enabled |
props.AiCmd |
AI config in init |
opt-in |
props.ConfigCmd |
config |
opt-in |
props.TelemetryCmd |
telemetry |
opt-in |
props.ManCmd |
man |
opt-in |
The version command is always registered and cannot be disabled.
To toggle these (via props.SetFeatures(props.Enable(…)/props.Disable(…))) see
Configuring Built-in Features; to add your own
commands see Adding Custom Commands.