One 30 MB binary. 269+ secret rules. 58 vulnerability patterns. 24 refactoring strategies. 7 MCP tools. SARIF output. 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. With VS Code extension, SARIF output for GitHub Code Scanning, and diff-aware analysis, v1.0.0 is the most comprehensive AI code safety tool available.
# macOS (Homebrew)
brew install ailinter/ailinter/ailinter
# Linux / Windows (download binary)
# β https://github.com/ailinter/ailinter/releases
# Any platform (Go)
go install github.com/ailinter/ailinter/cmd/ailinter@latest
# Docker
docker pull ailinter/ailinter
VS Code
Install from the VS Code Marketplace β inline diagnostics, status bar score, and problem matcher.
Scan Your Project
ailinter check . # Full scan (quality + secrets + vulns)
ailinter check --format sarif . # SARIF for GitHub Code Scanning
ailinter check --format problems . # Problem matcher output for VS Code
Interactive Setup
ailinter init # Setup agents, hooks, VS Code config
ailinter init --agent all --vscode --hook # Everything at once
ailinter mcp # Start MCP server for your AI assistant
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
Deep nesting, brain method, god class, long parameter list, magic numbers, shotgun surgery, parallel inheritance, and 17 more
Go Metalinting
5 embedded linters
go vet, staticcheck, gofmt, misspell, ineffassign β zero additional setup
VS Code Extension
Diagnostics + status bar
Inline problems panel, file quality score, issue count, problem matcher
SARIF Output
v2.1.0 compatible
GitHub Code Scanning, enterprise CI, rich metadata with refactoring guidance
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)
When analyze_code finds code smells, ailinter provides step-by-step remediation for 24 patterns:
Smell
Strategy
Smell
Strategy
Deep Nesting
Guard Clauses + Extract
Brain Method
Extract + SRP
God Class
Extract Class + SRP
Long Parameter List
Parameter Object
Primitive Obsession
Type Wrapper
Duplicated Code
Template Method
Complex Conditional
Guard + Strategy
File Bloat
Extract Module
Bumpy Road
Extract + Flatten
Low Cohesion
Extract Class
Long Method
Extract Method
Data Class
Move Logic In
Lazy Element
Inline Element
Global Data
Encapsulate
Message Chains
Hide Delegate
Long Scope Variable
Reduce Scope
Long Switch
Replace with Map
Magic Number
Named Constant
Excessive Comments
Self-Documenting
Paragraph of Code
Extract Method
Shotgun Surgery
Move + Combine
Refused Bequest
Replace Delegation
Complex Method
Extract + Simplify
Parallel Inheritance
Strategy Pattern
Call get_refactoring_strategy("smell_name") via MCP for step-by-step instructions with before/after examples.
The Refactoring Loop (Most Important Pattern)
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.