clap's global flag, except in a passthrough subtree
Why a clap global flag stops working inside a passthrough subtree: the tokens get captured as trailing args before the flag is ever parsed.

Why a clap global flag stops working inside a passthrough subtree: the tokens get captured as trailing args before the flag is ever parsed.

Rust has no init or pre-main phase, so self-registering commands need another mechanism. Using a distributed slice to get the same shape.

A sibling to go-tool-base rather than a port, filling the gap between excellent Rust crates and a coherent way to assemble them.

Credential storage for a Go CLI: an env-var reference by default, an opt-in OS keychain, and plaintext only as a last resort and banned in CI.

Opt-in telemetry for a command-line tool: off until someone says yes, no personal data, a pluggable backend, and a consent flow that meets GDPR.

The other audience for a CLI is the script that greps its output and breaks. Giving every command a JSON output mode with one response envelope.

Timing, auth, recovery and logging are cross-cutting in a CLI too. Wrapping Cobra commands in web-style middleware rather than PreRun hooks.

go-tool-base keeps an entire CLI command tree in one manifest file and generates the wiring from it, without locking you out of hand-written Go.

A well-built CLI already has what an agent needs: named operations, descriptions and typed parameters. Exposing one over MCP takes no AI code.

How a pile of separate Go CLI plumbing packages became one library, with a typed container for dependencies and a generator on top.
