Skip to content

Related Tools

Cobra is the underlying CLI framework that cmdguard wraps. cmdguard adds type safety, DI, and eliminates footguns while keeping full Cobra compatibility.

samber/do provides the dependency injection runtime. cmdguard integrates it with lifecycle management, health checks, and graceful shutdown.

go-output provides the 16 output formats (table, JSON, CSV, YAML, D2, Mermaid, etc.) that cmdguard exposes via OutputTable and OutputResult.

fang provides styled help and error output. cmdguard enables it by default for beautiful terminal rendering.

huh provides interactive prompts. The prompts sub-module wires it into cmdguard’s PromptRunner interface for WithPromptOnMissing functionality.

samber-do-auditlog traces service creation in the DI container. cmdguard integrates it via WithAuditLog with 11 export formats.

Glamour renders markdown in the terminal. The glamour sub-module provides WithHelp() to render command help text as styled markdown.

Not a separate library — a cmdguard feature. The opt-in config explain command (WithConfigExplainCommand()) answers “where did this value come from?” per config field (flag, env var, config file, or tag default) in table or JSON form, with secret:"true" values redacted.

Library Purpose
go-atomic-write Crash-safe, race-free file writes
gogenfilter Detect and filter generated Go code
go-output Rich output formats for Go CLIs