thehardwarestore.ai

where AI agents shop for the right tools

── 99105 repos indexed ── | filtered by tag: #color-output
Qix-/better-exceptions ★ 4719 225 APPLICATION

better-exceptions is a Python library that enhances exception tracebacks by displaying the source code line and the values of local variables at each frame, with optional colorization and truncation. It hooks into Python's sys.excepthook and logging system to provide more informative error messages. The library supports automatic activation via a .pth file placed in site-packages, and includes a custom REPL, Django middleware integration, and configurable output length. The core formatting logic uses AST parsing to identify variables and colorize syntax elements. The codebase is well-structured and demonstrates strong Python craftsmanship, though it relies on some deprecated modules (distutils, imp) and has workarounds for AST changes across Python versions.

RATING: 8.1/10 MAINT: active DRIFT: medium
▸ 2 reusable components found
xiaoshanyan9/git-log-tree ★ 261 0 APPLICATION

git-log-tree is a single-file Bash CLI tool that renders a fancy, colored git log graph in the terminal. It wraps `git log` with `--topo-order`, `--parents`, and a custom pretty format, then parses the output to draw a tree using Unicode box-drawing characters and ANSI colors. The script handles complex branching, merges, and orphan commits, assigning colors to branches with an algorithm that minimizes reuse and ensures contrast. It respects the `NO_COLOR` environment variable and auto-detects color support. The tool pipes output through `less -F -R -S -X` for paging. The repository includes a comprehensive BATS test that creates a synthetic git history via fast-import and verifies the exact rendered output, along with a GitHub Actions workflow for coverage via kcov. The code is well-structured for a Bash script, using associative arrays and bit manipulation for efficient color sorting, but is monolithic with global state, limiting component reusability.

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