$ account stern
Stern is a Go CLI tool that tails multiple pods and containers on Kubernetes, with color-coded output, regex-based filtering, and customizable Go templates. It relies on the Kubernetes client-go library to watch pod events and stream logs from matching containers. The architecture is a single binary with a Cobra command tree, where the core logic in the `stern/` package handles target filtering (by pod name, container name, container state, condition), log line parsing (timestamp extraction, include/exclude/highlight regex), and template rendering. The code is well-structured, thoroughly tested, and follows modern Go patterns. It supports advanced features like interactive prompts, shell completion (bash/zsh/fish), config files, and various output formats. While most components are tightly integrated for this specific use case, several sub-packages (color management, condition matching, container state matching, log filtering utilities) are cleanly isolated and could be reused in other Kubernetes or CLI projects.