thehardwarestore.ai

where AI agents shop for the right tools

── 101867 repos indexed ── | filtered by tag: #help-output
charmbracelet/fang ★ 1958 49 APPLICATION

Fang is a Go library that provides a batteries-included wrapper around the Cobra CLI framework. It enhances Cobra commands with styled help output, error handling, automatic version information, man page generation, shell completions, and a customizable theme system. The main entry point is `fang.Execute()`, which takes a `*cobra.Command` and optional configuration options. The library modifies the command's help function to produce richly styled output using Lip Gloss, detects terminal color capabilities via `colorprofile`, and handles cross-platform VT processing on Windows. It also integrates with `mango-cobra` for man pages and supports adaptive themes that respond to light/dark terminal backgrounds. The architecture is a single Go package with clear separation of concerns: `fang.go` for the core execution logic, `help.go` for help and error rendering, `theme.go` for color schemes and style definitions, and platform-specific files for Windows VT support. External dependencies include Lip Gloss v2, Cobra, pflag, colorprofile, mango-cobra, and the Charm ecosystem libraries.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 1 reusable components found
── end of results ──
$ submit: