Strip the noise. Keep the code. Lint what's left.
uncomment is a comment remover and a comment linter, both built on tree-sitter's AST — so both are
100% accurate and never touch comment-like text inside strings. Removal keeps what matters by
default (TODO/FIXME, docs, and linting directives) across 300+ languages; linting checks that
tag comments (TODO, FIXME, HACK, XXX) carry a real issue key instead of going stale. Either one can
gate a commit or a pull request — scoped to a whole tree, to what a branch changed, or line by
line — with parallel processing and a safe dry-run mode.
AST-accurate · 306 languages · zero false positives · tag-comment linting · changed-lines scoping · parallel · dry-run

Install · Features · Usage · Linting · GitHub Action · Configuration · How it works · Contributing
Why uncomment
Regex-based comment strippers guess. They delete a // inside a string literal, mangle a URL in a
docstring, or leave a linting directive your CI depends on. uncomment doesn't guess: it parses your
code into a real syntax tree and acts only on the nodes that are genuinely comments.
Originally built to clean up AI-generated code drowning in explanatory comments, it now works on
anything with a tree-sitter grammar — and it grew a second job alongside the first. Deleting
comments and keeping the ones that track work are the same problem seen from two sides: both need
to know, precisely, which comments exist and what they say. uncomment removes; uncomment lint
checks that a TODO or FIXME still points at a live issue key instead of quietly rotting; uncomment --check gates a commit or a pull request on either policy without writing anything.
Features
- 100% accurate — tree-sitter AST parsing identifies comments structurally, not by pattern matching
- No false positives — never removes or misreads comment-like content inside strings
- Smart preservation — keeps TODO/FIXME, docs, and language-specific linting directives by default
- Tag-comment linting —
uncomment lint checks TODO/FIXME/HACK/XXX for a canonical form and a real issue key, with --fix and a baseline for adopting it on an existing codebase
- Gate-ready —
--check and lint both exit non-zero on a violation, scoped to a whole tree, --changed-only/--changed-lines against a base ref, or --staged
- 306 languages — powered by tree-sitter-language-pack, every grammar compiled into the binary
- Parallel — multi-threaded processing that scales across cores
- Safe — dry-run mode with line-by-line diffs previews every change before you write
- Configurable — hierarchical TOML config with a smart
init command
- Built-in benchmarking — optional performance analysis and profiling tools
Installation
| Channel | Command |
|---|
| Homebrew (macOS/Linux) | brew install polylint/tap/uncomment |
| Scoop (Windows) | scoop bucket add polylint https://github.com/polylint/scoop-bucket && scoop install uncomment |
| Cargo (Rust) | cargo install uncomment |
| npm (Node.js) | npm i -g @polylint/uncomment |
| pip (Python) | pip install uncomment |