Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
changelog
command
|
|
|
docs
command
|
|
|
e2e
command
Package main provides a test-only CLI binary for E2E/BDD testing of framework features.
|
Package main provides a test-only CLI binary for E2E/BDD testing of framework features. |
|
gtb
command
|
|
|
gtb-no-aws-smoke
command
Command gtb-no-aws-smoke is a compile-time fixture that proves internal/cmd/keys and internal/cmd/root do not pull the AWS SDK into the linked binary transitively.
|
Command gtb-no-aws-smoke is a compile-time fixture that proves internal/cmd/keys and internal/cmd/root do not pull the AWS SDK into the linked binary transitively. |
|
internal
|
|
|
agent
Package agent provides tool definitions for the autonomous agentic verification loop used during code generation.
|
Package agent provides tool definitions for the autonomous agentic verification loop used during code generation. |
|
circuitbreaker
Package circuitbreaker implements the transport-agnostic Closed/Open/HalfOpen state machine shared by the HTTP and gRPC client circuit breakers.
|
Package circuitbreaker implements the transport-agnostic Closed/Open/HalfOpen state machine shared by the HTTP and gRPC client circuit breakers. |
|
cmd
Package cmd provides shared utilities for internal CLI commands.
|
Package cmd provides shared utilities for internal CLI commands. |
|
cmd/disable
Package disable is the gtb-only `disable` command, the inverse of internal/cmd/enable.
|
Package disable is the gtb-only `disable` command, the inverse of internal/cmd/enable. |
|
cmd/enable
Package enable is the gtb-only `enable` command.
|
Package enable is the gtb-only `enable` command. |
|
cmd/generate
Package generate provides Cobra commands for scaffolding new CLI projects (project/skeleton), adding commands to existing projects, converting implementations to AI-generated code, and adding flags to commands β all driven by manifest definitions and interactive wizards.
|
Package generate provides Cobra commands for scaffolding new CLI projects (project/skeleton), adding commands to existing projects, converting implementations to AI-generated code, and adding flags to commands β all driven by manifest definitions and interactive wizards. |
|
cmd/keys
Package keys is the gtb-only `keys` command group.
|
Package keys is the gtb-only `keys` command group. |
|
cmd/regenerate
Package regenerate provides Cobra commands for regenerating project command registration files (cmd.go) and manifests from existing project structure, without overwriting implementation files unless explicitly forced.
|
Package regenerate provides Cobra commands for regenerating project command registration files (cmd.go) and manifests from existing project structure, without overwriting implementation files unless explicitly forced. |
|
cmd/remove
Package remove provides the Cobra command for removing commands and their associated generated files from a project, updating the manifest accordingly.
|
Package remove provides the Cobra command for removing commands and their associated generated files from a project, updating the manifest accordingly. |
|
cmd/root
Package root provides the internal root command for the gtb CLI itself, registering the generate, regenerate, and remove subcommand groups.
|
Package root provides the internal root command for the gtb CLI itself, registering the generate, regenerate, and remove subcommand groups. |
|
cmd/sign
Package sign is the gtb-only `gtb sign` command.
|
Package sign is the gtb-only `gtb sign` command. |
|
cmd/template
Package template is the gtb-only `template` command group.
|
Package template is the gtb-only `template` command group. |
|
generator
Package generator implements the code generation engine that powers project scaffolding, command generation, and regeneration from manifest definitions.
|
Package generator implements the code generation engine that powers project scaffolding, command generation, and regeneration from manifest definitions. |
|
generator/templates
Package templates provides Go template definitions and data structures used by the generator to produce CLI command scaffolding, registration code (cmd.go), and implementation stubs (main.go).
|
Package templates provides Go template definitions and data structures used by the generator to produce CLI command scaffolding, registration code (cmd.go), and implementation stubs (main.go). |
|
generator/verifier
Package verifier provides post-generation verification strategies that validate generated projects compile and pass tests.
|
Package verifier provides post-generation verification strategies that validate generated projects compile and pass tests. |
|
ratelimit
Package ratelimit provides the bounded, LRU-evicting per-key token-bucket store shared by the HTTP and gRPC server-side rate limiters.
|
Package ratelimit provides the bounded, LRU-evicting per-key token-bucket store shared by the HTTP and gRPC server-side rate limiters. |
|
testutil
Package testutil provides shared test helpers for the go-tool-base module.
|
Package testutil provides shared test helpers for the go-tool-base module. |
|
trustkeys
Package trustkeys exposes the public keys embedded in the gtb binary for self-update signature verification (Phase 2 of the remote-update-checksum-verification spec).
|
Package trustkeys exposes the public keys embedded in the gtb binary for self-update signature verification (Phase 2 of the remote-update-checksum-verification spec). |
|
version
Package version holds the build-time version variable injected via ldflags for the gtb binary.
|
Package version holds the build-time version variable injected via ldflags for the gtb binary. |
|
mocks
|
|
|
pkg
|
|
|
authn
Package authn provides transport-agnostic credential verification primitives for the HTTP and gRPC server transports.
|
Package authn provides transport-agnostic credential verification primitives for the HTTP and gRPC server transports. |
|
browser
Package browser provides a safe entry point for opening URLs in the user's default browser or mail client.
|
Package browser provides a safe entry point for opening URLs in the user's default browser or mail client. |
|
changelog
Package changelog generates and parses changelogs from Conventional Commits, in pure Go.
|
Package changelog generates and parses changelogs from Conventional Commits, in pure Go. |
|
chat
Package chat provides a unified multi-provider AI chat client supporting Claude, OpenAI, Gemini, Claude Local (via CLI binary), and OpenAI-compatible endpoints.
|
Package chat provides a unified multi-provider AI chat client supporting Claude, OpenAI, Gemini, Claude Local (via CLI binary), and OpenAI-compatible endpoints. |
|
cmd/changelog
Package changelog provides the `changelog` command for displaying version history from an embedded CHANGELOG.md, with optional version and since-tag filtering.
|
Package changelog provides the `changelog` command for displaying version history from an embedded CHANGELOG.md, with optional version and since-tag filtering. |
|
cmd/config
Package config implements the "config" CLI command and its subcommands for programmatic read/write access to individual configuration keys.
|
Package config implements the "config" CLI command and its subcommands for programmatic read/write access to individual configuration keys. |
|
cmd/docs
Package docs provides the Cobra `docs` command for browsing this tool's embedded documentation in a terminal (an interactive Bubble Tea browser), with two subcommands: `serve` (host the docs as a static HTTP site) and `ask` (AI-assisted Q&A grounded in the bundled docs at runtime).
|
Package docs provides the Cobra `docs` command for browsing this tool's embedded documentation in a terminal (an interactive Bubble Tea browser), with two subcommands: `serve` (host the docs as a static HTTP site) and `ask` (AI-assisted Q&A grounded in the bundled docs at runtime). |
|
cmd/doctor
Package doctor provides a diagnostic command that validates configuration, checks environment health, and reports runtime details.
|
Package doctor provides a diagnostic command that validates configuration, checks environment health, and reports runtime details. |
|
cmd/initialise
Package initialise provides the Cobra command for bootstrapping a new tool's configuration directory and default config file, running registered setup.Initialiser hooks in sequence.
|
Package initialise provides the Cobra command for bootstrapping a new tool's configuration directory and default config file, running registered setup.Initialiser hooks in sequence. |
|
cmd/man
Package man implements the hidden, opt-in "man" command that emits roff man pages for a tool's own command tree at runtime β for packaging postinstall scripts or ad-hoc preview β without re-running the source-tree generator.
|
Package man implements the hidden, opt-in "man" command that emits roff man pages for a tool's own command tree at runtime β for packaging postinstall scripts or ad-hoc preview β without re-running the source-tree generator. |
|
cmd/root
Package root provides the reusable root Cobra command constructor that wires configuration loading, logging setup, update checks, and feature-flagged subcommand registration (version, update, init, doctor, config, telemetry, changelog, man, MCP, docs).
|
Package root provides the reusable root Cobra command constructor that wires configuration loading, logging setup, update checks, and feature-flagged subcommand registration (version, update, init, doctor, config, telemetry, changelog, man, MCP, docs). |
|
cmd/telemetry
Package telemetry provides the `telemetry` command group for managing pseudonymous usage telemetry: enable, disable, status, and reset subcommands.
|
Package telemetry provides the `telemetry` command group for managing pseudonymous usage telemetry: enable, disable, status, and reset subcommands. |
|
cmd/update
Package update provides the Cobra command for self-updating the CLI binary to the latest released version from the configured release source (GitHub or GitLab), with support for private repositories via token authentication.
|
Package update provides the Cobra command for self-updating the CLI binary to the latest released version from the configured release source (GitHub or GitLab), with support for private repositories via token authentication. |
|
cmd/version
Package version provides the Cobra command for displaying the CLI's current version, build date, and commit information.
|
Package version provides the Cobra command for displaying the CLI's current version, build date, and commit information. |
|
config
Package config provides configuration loading, merging, and access via the Containable interface backed by Viper.
|
Package config provides configuration loading, merging, and access via the Containable interface backed by Viper. |
|
controls
Package controls provides a lifecycle controller for managing concurrent, long-running services such as HTTP servers, background workers, and schedulers.
|
Package controls provides a lifecycle controller for managing concurrent, long-running services such as HTTP servers, background workers, and schedulers. |
|
credentials
Package credentials describes how a user-supplied secret (VCS token, AI-provider API key, Bitbucket dual-credential blob) is persisted by the interactive setup wizard and resolved by the runtime config chain.
|
Package credentials describes how a user-supplied secret (VCS token, AI-provider API key, Bitbucket dual-credential blob) is persisted by the interactive setup wizard and resolved by the runtime config chain. |
|
credentials/credtest
Package credtest provides test-only credential backends so downstream tests can exercise keychain-mode behaviour without pulling in github.com/zalando/go-keyring.
|
Package credtest provides test-only credential backends so downstream tests can exercise keychain-mode behaviour without pulling in github.com/zalando/go-keyring. |
|
credentials/keychain
Package keychain is the optional OS-keychain backend for gitlab.com/phpboyscout/go-tool-base/pkg/credentials.
|
Package keychain is the optional OS-keychain backend for gitlab.com/phpboyscout/go-tool-base/pkg/credentials. |
|
docs
Package docs provides a documentation system with two subsystems: a generation engine that parses Cobra command trees into Markdown files with hierarchy-aware index management, and a TUI browser built on Bubbles with split-pane navigation, async search, and AI-powered Q&A via retrieval-augmented generation (RAG).
|
Package docs provides a documentation system with two subsystems: a generation engine that parses Cobra command trees into Markdown files with hierarchy-aware index management, and a TUI browser built on Bubbles with split-pane navigation, async search, and AI-powered Q&A via retrieval-augmented generation (RAG). |
|
errorhandling
Package errorhandling provides structured, user-friendly error reporting for CLI tools built with GTB.
|
Package errorhandling provides structured, user-friendly error reporting for CLI tools built with GTB. |
|
forms
Package forms provides multi-stage interactive form wizards built on top of the huh library, supporting forward/back navigation, dynamic stage construction, and navigable form groups for CLI project configuration workflows.
|
Package forms provides multi-stage interactive form wizards built on top of the huh library, supporting forward/back navigation, dynamic stage construction, and navigable form groups for CLI project configuration workflows. |
|
gateway
Package gateway makes a grpc-gateway a first-class transport for generated REST handlers.
|
Package gateway makes a grpc-gateway a first-class transport for generated REST handlers. |
|
grpc
Package grpc provides a gRPC server toolkit for GTB services: a server bootstrap that integrates with the pkg/controls lifecycle and the standard gRPC health protocol, plus a suite of composable server interceptors β authentication (AuthInterceptor), logging, OpenTelemetry stats handlers, rate limiting, and circuit breaking β and TLS credential helpers.
|
Package grpc provides a gRPC server toolkit for GTB services: a server bootstrap that integrates with the pkg/controls lifecycle and the standard gRPC health protocol, plus a suite of composable server interceptors β authentication (AuthInterceptor), logging, OpenTelemetry stats handlers, rate limiting, and circuit breaking β and TLS credential helpers. |
|
http
Package http provides an HTTP server and client toolkit for GTB services.
|
Package http provides an HTTP server and client toolkit for GTB services. |
|
logger
Package logger provides GTB's logging boundary.
|
Package logger provides GTB's logging boundary. |
|
openapi
Package openapi serves an OpenAPI specification and a Stoplight Elements docs site (interactive, with a "try it" console) from a single Register call.
|
Package openapi serves an OpenAPI specification and a Stoplight Elements docs site (interactive, with a "try it" console) from a single Register call. |
|
osinfo
Package osinfo reports a human-readable operating-system version string.
|
Package osinfo reports a human-readable operating-system version string. |
|
output
Package output provides structured output formatting, table rendering, and progress indicators for CLI commands.
|
Package output provides structured output formatting, table rendering, and progress indicators for CLI commands. |
|
props
Package props defines the Props dependency container, the central type-safe dependency injection mechanism used throughout GTB.
|
Package props defines the Props dependency container, the central type-safe dependency injection mechanism used throughout GTB. |
|
props/propstest
Package propstest provides a public test-fixture helper for constructing a fully-wired *props.Props with hermetic, safe defaults.
|
Package propstest provides a public test-fixture helper for constructing a fully-wired *props.Props with hermetic, safe defaults. |
|
redact
Package redact strips credential-like content from free-form strings at the boundary between trusted and untrusted observability surfaces (telemetry vendors, log aggregators, metric stores).
|
Package redact strips credential-like content from free-form strings at the boundary between trusted and untrusted observability surfaces (telemetry vendors, log aggregators, metric stores). |
|
regexutil
Package regexutil provides bounded, DoS-safe wrappers around regexp.Compile for every call path that takes a user- or config-supplied regex pattern.
|
Package regexutil provides bounded, DoS-safe wrappers around regexp.Compile for every call path that takes a user- or config-supplied regex pattern. |
|
setup
Package setup provides initialisation helpers for GTB-based tools, including configuration directory bootstrapping, default config file creation, and self-update orchestration.
|
Package setup provides initialisation helpers for GTB-based tools, including configuration directory bootstrapping, default config file creation, and self-update orchestration. |
|
setup/ai
Package ai provides the interactive AI-provider setup initialiser.
|
Package ai provides the interactive AI-provider setup initialiser. |
|
setup/bitbucket
Package bitbucket implements the interactive setup wizard for Bitbucket Cloud authentication.
|
Package bitbucket implements the interactive setup wizard for Bitbucket Cloud authentication. |
|
setup/github
Package github provides the interactive GitHub setup initialiser.
|
Package github provides the interactive GitHub setup initialiser. |
|
setup/telemetry
Package telemetry registers the telemetry initialiser with the setup system.
|
Package telemetry registers the telemetry initialiser with the setup system. |
|
telemetry
Package telemetry provides an opt-in telemetry framework with pluggable backends, privacy controls, bounded buffering, and GDPR-compliant data deletion for CLI tools built on GTB.
|
Package telemetry provides an opt-in telemetry framework with pluggable backends, privacy controls, bounded buffering, and GDPR-compliant data deletion for CLI tools built on GTB. |
|
telemetry/datadog
Package datadog provides a telemetry backend that sends events to Datadog's HTTP Logs Intake API.
|
Package datadog provides a telemetry backend that sends events to Datadog's HTTP Logs Intake API. |
|
telemetry/logs
Package logs builds an OpenTelemetry LoggerProvider that batches log records to an OTLP/HTTP collector, and an slog.Handler bridge so the GTB logger can emit OTel records as well as its human-readable stderr output.
|
Package logs builds an OpenTelemetry LoggerProvider that batches log records to an OTLP/HTTP collector, and an slog.Handler bridge so the GTB logger can emit OTel records as well as its human-readable stderr output. |
|
telemetry/metrics
Package metrics builds an OpenTelemetry MeterProvider that pushes metrics to an OTLP/HTTP collector on a periodic interval, configured from a resolved otelcore.Settings.
|
Package metrics builds an OpenTelemetry MeterProvider that pushes metrics to an OTLP/HTTP collector on a periodic interval, configured from a resolved otelcore.Settings. |
|
telemetry/otelcore
Package otelcore holds the OTLP/OTel export plumbing shared by GTB's analytics pipeline and its web-service observability signals: OTLP/HTTP endpoint parsing, the service resource, telemetry.* configuration resolution, and the GTB config adapter that can observe a resolved signal settings source.
|
Package otelcore holds the OTLP/OTel export plumbing shared by GTB's analytics pipeline and its web-service observability signals: OTLP/HTTP endpoint parsing, the service resource, telemetry.* configuration resolution, and the GTB config adapter that can observe a resolved signal settings source. |
|
telemetry/posthog
Package posthog provides a telemetry backend that sends events to PostHog's Capture API (batch payload form).
|
Package posthog provides a telemetry backend that sends events to PostHog's Capture API (batch payload form). |
|
telemetry/tracing
Package tracing builds an OpenTelemetry TracerProvider that batches spans to an OTLP/HTTP collector, configured from a resolved otelcore.Settings.
|
Package tracing builds an OpenTelemetry TracerProvider that batches spans to an OTLP/HTTP collector, configured from a resolved otelcore.Settings. |
|
telemetrytypes
Package telemetrytypes holds the telemetry value types shared between GTB's dependency-injection container (pkg/props) and the collector implementation (pkg/telemetry).
|
Package telemetrytypes holds the telemetry value types shared between GTB's dependency-injection container (pkg/props) and the collector implementation (pkg/telemetry). |
|
tls
Package tls holds the shared TLS plumbing used across every transport in the framework (HTTP, gRPC and the gateway): the hardened default config, the typed Pair config shape with shared/per-transport resolution, and the client-side cert-pool helpers.
|
Package tls holds the shared TLS plumbing used across every transport in the framework (HTTP, gRPC and the gateway): the hardened default config, the typed Pair config shape with shared/per-transport resolution, and the client-side cert-pool helpers. |
|
utils
Package utils provides small shared utility functions used across the GTB framework: PATH/executable resolution with install-instruction hints (GracefulGetPath) and terminal-interactivity detection (IsInteractive).
|
Package utils provides small shared utility functions used across the GTB framework: PATH/executable resolution with install-instruction hints (GracefulGetPath) and terminal-interactivity detection (IsInteractive). |
|
vcs
Package vcs defines the version-control abstraction layer for querying releases and repository metadata across multiple forge backends.
|
Package vcs defines the version-control abstraction layer for querying releases and repository metadata across multiple forge backends. |
|
vcs/bitbucket
Package bitbucket provides a release.Provider implementation for Bitbucket Cloud using the Downloads API.
|
Package bitbucket provides a release.Provider implementation for Bitbucket Cloud using the Downloads API. |
|
vcs/direct
Package direct provides a release.Provider implementation for tools distributed via arbitrary HTTP servers.
|
Package direct provides a release.Provider implementation for tools distributed via arbitrary HTTP servers. |
|
vcs/gitea
Package gitea provides a release.Provider implementation for Gitea and Forgejo instances, including Codeberg (codeberg.org).
|
Package gitea provides a release.Provider implementation for Gitea and Forgejo instances, including Codeberg (codeberg.org). |
|
vcs/github
Package github implements the VCS release provider and API client for GitHub repositories, supporting both public and token-authenticated access.
|
Package github implements the VCS release provider and API client for GitHub repositories, supporting both public and token-authenticated access. |
|
vcs/gitlab
Package gitlab implements the VCS release provider for GitLab repositories, supporting both public and token-authenticated access; the owner may be a slash-separated group path passed through to the GitLab API.
|
Package gitlab implements the VCS release provider for GitLab repositories, supporting both public and token-authenticated access; the owner may be a slash-separated group path passed through to the GitLab API. |
|
vcs/release
Package release provides the shared release abstractions (Release, ReleaseAsset) and a pluggable Provider registry and factory.
|
Package release provides the shared release abstractions (Release, ReleaseAsset) and a pluggable Provider registry and factory. |
|
vcs/release/releasetest
Package releasetest provides an in-memory release.Provider test double and asset builders for exercising the self-update pipeline without network or disk access.
|
Package releasetest provides an in-memory release.Provider test double and asset builders for exercising the self-update pipeline without network or disk access. |
|
vcs/repo
Package repo provides git repository operations (clone, checkout, commit, push, tree inspection) backed by go-git, behind the RepoLike abstraction with local-filesystem and in-memory storage backends.
|
Package repo provides git repository operations (clone, checkout, commit, push, tree inspection) backed by go-git, behind the RepoLike abstraction with local-filesystem and in-memory storage backends. |
|
vcs/repo/aferobilly
Package aferobilly adapts a go-billy/v5 Filesystem to an afero.Fs.
|
Package aferobilly adapts a go-billy/v5 Filesystem to an afero.Fs. |
|
version
Package version provides semantic version parsing, comparison, and development-build detection via the Version interface.
|
Package version provides semantic version parsing, comparison, and development-build detection via the Version interface. |
|
workspace
Package workspace provides project root detection by walking up from a starting directory to find marker files (.gtb/manifest.yaml, go.mod, .git).
|
Package workspace provides project root detection by walking up from a starting directory to find marker files (.gtb/manifest.yaml, go.mod, .git). |
|
test
|
|
|
e2e/support
Package support provides shared test harness helpers for E2E/BDD tests.
|
Package support provides shared test harness helpers for E2E/BDD tests. |
Click to show internal directories.
Click to hide internal directories.