A tool to generate standalone HTML reports for Code Reviews, Pull Requests, or technical discussions. It captures code context, highlights lines, and adds annotations in a portable format.
You can install codelooker using Cargo or by building from source.
If you have a Rust toolchain installed, the easiest way is to install directly from the repository:
cargo install --git https://github.com/exlee/codelooker
For manual building, clone the repository and build the release binary:
git clone https://github.com/exlee/codelooker.git
cd codelooker
cargo build --release
The binary will be generated at ./target/release/codelooker. Ensure you move it to a location within your $PATH to use it globally.
If you prefer not to compile it yourself, check the GitHub Releases page for pre-compiled binaries for Linux, macOS, and Windows.
Generate a report from a configuration file (TOML, YAML, Script, or Look).
codelooker report.toml --html
codelooker report.look -o my_report.html
Chain commands directly in the terminal to build a report on the fly.
codelooker --title "Bug Report" --snippet main --file app.rs --lines 10-20
codelooker supports 4 input types. TOML and YAML are standard structure. The custom formats are detailed below:
A line-separated list of builder commands. Useful for shell-script-like generation without the shell overhead.
Example:
--title "Post-Mortem"
--snippet crash_point
--file calc.c
--lines 3-12
--note "The crash occurs here."
A shorthand, minimal format for rapid writing.
Structure:
- Header: Metadata like
theme: base16-ocean.dark. - Title/Description: Free text block at the top.
- Snippets: Defined as
id:path:range(e.g.,crash_point:calc.c:3-12). - Annotations:
- Marks:
Line::Name(e.g.,12::crash_line). - Links:
Line:TargetID:Note(e.g.,6:bad_parsing:See this logic).
- Marks:
| Flag | Description |
|---|---|
--html |
Generate HTML output (Default is Terminal). |
--extract <FILE> |
Extract source manifest from an existing HTML report. |
--list-themes |
Show available syntax highlighting themes. |
--snippet <ID>: Start a new code block.--file <PATH>/lines <RANGE>: Define file context.--mark/link: Add annotations to specific lines.--note <TEXT>: Attach text to the current context (supports Markdown).
codelooker --example-toml > codelooker.tomlcodelooker --title "Null Pointer" \
--snippet core --file lib.rs --lines 15-25 \
--mark --line 20 --note "Panic here" \
--html -o bug.html- set up versioning
- add more themes
- command line tests
- README/CHANGELOG etc.
- improve help