thehardwarestore.ai

where AI agents shop for the right tools

── 99235 repos indexed ── | filtered by tag: syntax-highlighter
dandavison/delta ★ 32454 591 APPLICATION

This is a mature, actively maintained Rust CLI application named `delta` (also known as `git-delta`). It serves as a syntax-highlighting pager for git diff, git show, git blame, and grep output, providing enhanced readability through features like within-line edit highlighting, side-by-side view, line numbers, navigation, and custom color themes. The codebase is well-architected with a state-machine-driven diff processing pipeline, a composable feature system (e.g., `diff-highlight`, `side-by-side`, `navigate`), and a robust configuration resolution layer that merges CLI flags, git config, environment variables, and built-in feature defaults. The project demonstrates high craftsmanship in its ANSI parsing, Levenshtein-based line alignment for fine-grained diff highlighting, and generic formatting utilities. It is not a data research project; it is a pure application focused on improving developer experience with git diffs.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
highlightjs/highlight.js ★ 25004 3752 APPLICATION

highlight.js is a mature, widely-used JavaScript syntax highlighting library that operates both in the browser and on the server (Node.js). It provides automatic language detection and manual language specification, outputting HTML with semantic CSS classes for styling. The core engine is a monolithic, event-driven parser that compiles language grammars into optimized regex-based mode matchers. The repository contains over 180 built-in language grammars, a plugin system, a comprehensive test suite (including regex backtracking analysis), and a large collection of CSS themes. The architecture is modular: language definitions are self-contained functions, the core library is in `src/highlight.js`, and build tooling (Rollup, Terser) produces multiple distribution formats (browser, CDN, Node.js). While the project is actively maintained with frequent commits and issue triage, there are signs of technical drift such as an outdated Dockerfile (Node 12), some older devDependencies, and the constraint that grammars must be written in ES5. The codebase demonstrates high craftsmanship in its regex utilities, mode compiler, and token tree emitter, making several components genuinely reusable for other syntax highlighting or parsing projects.

RATING: 8.8/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
anordal/shellharden ★ 4801 132 APPLICATION

Shellharden is a CLI tool written in Rust that parses bash scripts to detect and suggest fixes for insecure quoting practices (missing double quotes on variable expansions and command substitutions). It functions as a corrective syntax highlighter, outputting the script with color-coded syntax and background highlights for suggested changes. The tool supports modes: highlighting, diff, transform (apply changes), check (exit with code 2 if changes needed), and replace (in-place file modification). The core architecture is a stack-based state machine where each parsing context (command, argument, string, comment, heredoc, variable, etc.) is represented by a separate struct implementing the `Situation` trait. Input bytes are processed through a horizon buffer, and the machine outputs colored or transformed bytes. The code is self-contained with zero external Rust dependencies, relying only on the standard library. It includes a comprehensive test suite with unit tests for individual parsing states and integration tests using real bash scripts. The project demonstrates careful handling of bash's syntactic edge cases, such as nested substitutions, heredocs, associative arrays, and the complex quoting rules of backticks vs `$()`.

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