Tools
Developer tools
English

RepoRefit / Developer tools

RepoRefit CLI

The same checks as the web scanner, on your own machine. Useful for large projects, scripts and AI coding agents. Nothing is uploaded and no network request is made.

Install

You need Node.js 20 or later. Install once with npm, or run without installing through npx.

npm install -g github:reporefit/action
reporefit scan

# or without installing
npx -y github:reporefit/action scan

These commands install straight from the official repository github.com/reporefit/action. RepoRefit is not on the npm registry yet, so do not install a package named reporefit from npm until this page says so.

Quick start

Run it in a project folder. Without a command, reporefit runs scan on the current folder.

npx -y github:reporefit/action scan                 # check the current folder
npx -y github:reporefit/action scan ./my-app --tool secrets --fail-on high
npx -y github:reporefit/action fix > reporefit-fix-plan.md
npx -y github:reporefit/action report --out ./reports
npx -y github:reporefit/action badge
npx -y github:reporefit/action compare ./before ./after
npx -y github:reporefit/action help

Commands

CommandWhat it does
scan [folder]Run the checks and print one line per finding, most severe first, with a summary.
fix [folder]Write an AI fix plan (Markdown) to paste into Claude Code, Codex or another assistant.
report [folder]Write reporefit-report.md and reporefit-report.json (same format as the web download).
badge [folder]Write a README badge SVG with counts only.
compare <before> <after>Compare two copies of a project: findings per rule and estimated tokens for Claude Code.
rulesList rule IDs with links to their explanations.
help, versionShow usage with the documentation link, or the CLI, engine and ruleset versions.

Options

OptionMeaning
--tool <id>all (default), tokens, markdown, secrets, dependencies, mcp, agent-rules, duplicates, architecture or deploy.
--format text|json|mdOutput of scan: text (default), json or md.
--out <path>Write to a file (scan, fix, badge) or folder (report).
--lang en|ko|ja|zh-HansLanguage of messages and reports.
--fail-on high|medium|low|noneExit with 1 when a finding is at least this severe. Default none.
--ignore <glob>Extra ignore pattern in gitignore syntax. Repeat for more.
--no-gitignoreDo not apply the root .gitignore and .reporefitignore (same scope as the web folder picker).
--max-files <n>Stop listing after n files (default 50,000). The result is marked partial.
--max-read-mb <n>Stop reading after n MiB of text (default 512). The result is marked partial.
--quietHide the progress line (shown only in a terminal).

Windows, macOS and Linux

Exit codes

CodeMeaning
0No finding at or above --fail-on (or --fail-on none).
1At least one finding at or above --fail-on.
2Wrong option, or the folder could not be read.
130Stopped with Ctrl+C. No partial result is printed.

Large projects

The CLI reads each file at most once and only when a rule needs it. .git, node_modules and common build and cache folders are never walked. The root .gitignore and a .reporefitignore file are applied, and you can add --ignore patterns.

When a limit is reached, the report says so and lists what was not read. A partial result is never shown as a full pass.

# .reporefitignore (gitignore syntax, read in addition to the root .gitignore)
fixtures/
**/*.snap
docs/generated/

Measured on 2026-12-01 (Windows 11, Node 24): 30,500 files in 16 seconds with about 250 MB of memory. Larger projects work within the limits above but are not measured.

For AI coding agents

Claude Code, Codex and other agents can run the CLI and read --format json. The JSON has a schema version and, for every finding, the rule ID, severity, confidence, file and line, masked evidence, the recommended fix and how to verify it. Use the exit code for pass or fail.

reporefit scan --format json --quiet > reporefit.json
# exit code: 0 ok, 1 findings at or above --fail-on, 2 usage/read error, 130 cancelled

Privacy

The CLI only reads files on your machine. It does not upload anything and makes no network request. The dependency vulnerability lookup (OSV) is available only in the web scanner, after you agree.