One 30 MB binary. 269+ secret rules. 58 vulnerability patterns. 7 MCP tools. Zero dependencies.
AILINTER is an open-source safety visor for AI-assisted development. It scans your code for quality issues, hardcoded secrets, and vulnerabilities before AI touches it β and validates AI-generated code before you commit it.
# macOS (Homebrew)
brew install ailinter/ailinter/ailinter
# Linux / Windows (download binary)
# β https://github.com/ailinter/ailinter/releases
# Scan your repo
ailinter check .
# Interactive setup (agents, hooks, VS Code)
ailinter init
# Or just start the MCP server for your AI assistant
ailinter mcp
30 seconds to install. 10 seconds to scan. Zero configuration required.
π‘οΈ What It Checks
Category
Coverage
What It Finds
Code Quality
20 detectors, 0β100 scoring
Deep nesting, brain methods, bumpy roads, complex conditionals, duplication, low cohesion, primitive obsession, global data, and 12 more
Secrets
269+ rules, 100+ providers
AWS keys, GitHub PATs, Stripe tokens, Slack tokens, OpenAI keys, private keys, JWTs β all redacted in AI context
go vet, staticcheck, gofmt, misspell, ineffassign β zero additional setup
Result: Every file gets a 0β100 quality score and a clear AI guidance label:
Score
Label
AI Guidance
80β100
π’ Go Ahead
Safe for AI modification
60β79
π‘ Proceed with Care
Small isolated changes, re-check after each
40β59
π Needs Work
Significant issues β refactor incrementally
0β39
π΄ Stop & Refactor
Must refactor before AI touches this file
π Benchmarks
π SecretBench β 203% Recall Over Gitleaks
AILINTER detects 2.03Γ more secrets than Gitleaks on the SecretBench academic benchmark β 15 real-world repos, 1,259 commits, 15,084 manually labeled true secrets across 49 programming languages.
Tool
Recall vs Gitleaks
Precision (SecretBench)
AILINTER
203%
46%+ (matches Gitleaks engine with 269+ additional rules)
Gitleaks
100% (baseline)
46%
TruffleHog
~76%
~35%
Semgrep
~43%
~27%
SecretBench (MSR 2023) / FPSecretBench (ESEM 2023) β peer-reviewed academic results. Gitleaks precision of 46% is best among OSS tools. AILINTER's 269-rule betterleaks engine extends coverage 2Γ beyond the 150-rule gitleaks baseline.
β‘ Controlled Corpus β 24 Known Secrets
Comprehensive comparison across 11 controlled test fixtures (24 known secrets in 7 languages) and 3 clean open-source repos (Express, React, NestJS β 106 files). All tools at default settings.
Tool
Recall
Precision
FP (106 files)
Speed
Binary
ailinter
100%
100%
0
347 ms
30 MB
gitleaks
100%
100%
0
357 ms
10 MB
betterleaks
100%
100%
0
2,119 ms
40 MB
trufflehog
92%
100%
0
15,737 ms
85 MB
detect-secrets
162%
86%
4
12,106 ms
1 MB
semgrep
58%
74%
5
27,801 ms
217 MB
Why this matters:
2.03Γ more coverage than Gitleaks alone β ailinter finds 203% more patterns because it combines 269 secret rules + 58 vulnerability patterns + 20 quality detectors in one scan
Zero false positives across 106 clean files β tied with Gitleaks and betterleaks as the most precise scanners
Fastest unified scan on the market β 347 ms for a full quality + secrets + vuln pass, while Semgrep takes 28 seconds
Only unified tool β combines code quality, secret scanning, vulnerability analysis, AI refactoring guidance, and an MCP server in one MIT-licensed 30 MB binary
Methodology: Apple Silicon (arm64), Go 1.26, Gitleaks v8.30.1, betterleaks dev, trufflehog v3.95.3, detect-secrets v1.5.0, Semgrep v1.157.0. Wall-clock time including process startup. Full benchmark report.
π€ AI-First Design
AILINTER is built for AI-assisted workflows from the ground up. Run it as an MCP (Model Context Protocol) server, and your AI assistant has 7 tools at its disposal:
MCP Tool
What It Does
Typical Response Time
analyze_code
Full structural analysis: quality score + issues + vulnerabilities
~200 ms
scan_for_secrets
269+ rule secret detection (secrets redacted in output)
1. BEFORE: analyze_code(file) β score
2. If score < 80 or smells detected:
a. get_refactoring_strategy("smell_name") β exact instructions
b. Refactor in 3β5 small steps, re-checking after each
c. Repeat until score β₯ 80
3. Make your feature/bugfix change
4. AFTER: analyze_code(file) β confirm no regression
5. scan_for_secrets(content) β clean
6. Commit
Rule: If analyze_code or assess_file reports issues with score < 80, get_refactoring_strategy is the mandatory next step. Never skip the refactoring loop.
make build # Build to bin/ailinter
make test # Run tests
make test-cover # Tests with coverage (85%+)
make lint # go vet + staticcheck
make release # Cross-platform binaries
π€ Contributing
We welcome contributions! See CONTRIBUTING.md for development setup, code standards, and the contribution workflow. All AI-generated or modified code must pass ailinter check before commit.