Rust-powered static analysis for Flutter/Dart — designed for AI-generated code.
Falcon is the only Flutter linter specifically designed to catch the bugs AI tools leave behind — missing dispose() calls, empty catch blocks, unawaited futures, hardcoded credentials, and 60 other rules. It's 10-100x faster than alternatives, scores your code 0-100, and integrates with AI tools via MCP for real-time self-correction.
# Install (macOS/Linux, no Rust toolchain needed)
curl -fsSL https://raw.githubusercontent.com/viveky259259/falcon/master/scripts/install.sh | sh
# Or with Rust installed — cargo binstall fetches a prebuilt binary,
# cargo install builds from source
cargo binstall falcon-flutter
cargo install falcon-flutter
# Or run without installing anything
npx falcon-flutter@latest review
# Score your project (2 seconds)
falcon score .
# Review changed Dart files for a PR
falcon review . --base-ref origin/main --format gh
# Full analysis
falcon check .
See Installation for platform notes and other package managers.
falcon review runs semantic analysis automatically when a Dart project has
.dart_tool/package_config.json. Semantic mode shells out to
dart analyze --format=json, then lets analyzer diagnostics win on the same
file, line, and rule class. Falcon still reports behavioral and security
findings that the analyzer does not own. Use --semantic to opt in explicitly
or --no-defer-to-analyzer (--no-defer) when you need to audit the raw
Falcon output.
falcon check stays syntactic by default, including in editor-save and
pre-commit flows. Use falcon check --semantic in CI when the Dart analyzer
shellout is acceptable.
$ falcon score .
AI Code Quality Score: 72/100 (Grade: C)
Resource Safety 85/100 ████████████████░░░░
Error Handling 45/100 █████████░░░░░░░░░░░ · 8 empty catches
Type Safety 90/100 ██████████████████░░
Security 100/100 ████████████████████
Convention Match 68/100 █████████████░░░░░░░
Complexity 55/100 ███████████░░░░░░░░░
| Feature | Command | Description |
|---|---|---|
| App Manager | falcon x manage health | Unified 0-100 health score across 6 dimensions |
| Dep Manager | falcon x manage deps | Unused deps, version issues, path/git deps |
| Architect | falcon x manage arch | Architecture governance, layer violations, hotspots |
| Maintenance | falcon x manage maint | Tech debt score, cleanup tasks, auto-fix pipeline |
| AI Score | falcon score | 0-100 AI Code Quality Score with 6-dimension breakdown |
| 61+ Rules | falcon check | Flutter, BLoC, Riverpod, accessibility rules |
| MCP Server | falcon-mcp | AI tools call Falcon during code generation |
| PR Comments | falcon review --format gh | Generate GitHub-ready PR review markdown |
| Vulnerability | falcon x vuln-scan | Security radar with CWE classification |
| Risk Prediction | falcon x predict | Predict production issues from patterns |
| Test Generation | falcon x test-gen | Generate test stubs from code analysis |
| Refactoring Sim | falcon x refactor-sim | "What if we migrate to Riverpod?" impact |
| Enterprise | falcon x enterprise | Policies, audit logs, compliance |
| HTTP API | falcon x api | REST API for integrations |
falcon doctor — fix your toolchainfalcon doctor # diagnose, then offer to fix what's broken
falcon doctor --fix --yes # unattended: install everything with recommended defaults
falcon doctor --dry-run # show the plan without touching anything
falcon doctor --only flutter --channel stable --flutter-version 3.24.5
falcon doctor --offline # diagnose only — never fetch the release manifest
--fix --yes installs unattended, but one step never happens for you: Falcon
does not edit your shell rc file. It prints the export PATH= line and names
the rc file your shell reads — flutter stays off PATH in your current shell
until you run that line yourself (or open a new one).
Falcon checks Flutter, Dart, CocoaPods, the Android SDK and Xcode — but only
the ones your project actually needs. A project with no ios/ directory is
never asked about Xcode.
When the Flutter SDK is missing, Falcon reads Google's release manifest,
offers the version your project pins (.fvmrc, .tool-versions, your CI
workflow, or the constraints in pubspec.yaml) alongside the latest on your
chosen channel, downloads it, verifies its checksum, and extracts it. Pass
--dir to choose where it goes — the SDK archive contains a top-level
flutter/ directory, so the path you name must itself end in flutter
(~/sdks/flutter, not ~/sdks/myflutter). A mismatched --dir is rejected
at plan-build time, before anything is downloaded.
Even without --fix, plain falcon doctor fetches Google's release manifest
so it can name a concrete version to offer. On a locked-down network that
fetch can stall for many seconds before giving up. Pass --offline to skip
it entirely — every check still runs and reports real information, but any
offered fix degrades to a manual instruction instead of an automatic install.
Two things Falcon will never do: run sudo, or accept a licence agreement for
you. Those steps are printed for you to run — Falcon does not re-check
afterwards; re-run falcon doctor yourself once you've done them.
Exit codes: 0 healthy, 1 warnings, 2 a check or fix failed, or the
command was used incorrectly, 3 manual action required. --format json
is diagnosis-only — it never prompts and never installs, even with --fix
— and reports fixes_applied: false with a reason instead. Agents that
need to drive an install use the MCP doctor tool instead.
Add Falcon to Cursor, Windsurf, or any MCP-compatible AI tool:
{
"mcpServers": {
"falcon": { "command": "falcon-mcp" }
}
}
Falcon analyzes Flutter code in real-time during generation — the AI self-corrects before showing you buggy code.
- name: Install Falcon
run: cargo install falcon-flutter
- name: Analyze
run: falcon check . --fail-on error
- name: PR Comment
run: falcon review . --base-ref origin/main --format gh | gh pr comment --body-file -
falcon check --preset ai-generated # 20 rules for AI code
falcon check --preset strict # All rules, max severity
falcon check --preset flutter # Flutter best practices
| Tier | Price | What You Get |
|---|---|---|
| Core CLI | Free forever | All 90+ commands, MCP server, LSP, API |
| Team | $9/seat/month | GitHub App, team dashboard, score trends |
| Enterprise | $29/seat/month | SSO, audit logs, policies, compliance |
The tool that makes AI code safe is free. The platform that proves it to your boss is paid.
Falcon is written in Rust with rayon parallelism and tree-sitter parsing:
| Project Size | Analysis Time |
|---|---|
| 50 files | ~0.5s |
| 200 files | ~1.5s |
| 500 files | ~3s |
Compare: dart analyze takes 30-70 seconds on the same projects.
Contributions welcome! Falcon is MIT-licensed.
git clone https://github.com/viveky259259/falcon
cd falcon
cargo test # 2435 tests
cargo build # Fast build
MIT — free for everyone, forever.
Built by Vivek Yadav
Rust
66.4%
HTML
31.6%
Rust-powered static analysis for Flutter/Dart — designed for AI-generated code.
Falcon is the only Flutter linter specifically designed to catch the bugs AI tools leave behind — missing dispose() calls, empty catch blocks, unawaited futures, hardcoded credentials, and 60 other rules. It's 10-100x faster than alternatives, scores your code 0-100, and integrates with AI tools via MCP for real-time self-correction.
# Install (macOS/Linux, no Rust toolchain needed)
curl -fsSL https://raw.githubusercontent.com/viveky259259/falcon/master/scripts/install.sh | sh
# Or with Rust installed — cargo binstall fetches a prebuilt binary,
# cargo install builds from source
cargo binstall falcon-flutter
cargo install falcon-flutter
# Or run without installing anything
npx falcon-flutter@latest review
# Score your project (2 seconds)
falcon score .
# Review changed Dart files for a PR
falcon review . --base-ref origin/main --format gh
# Full analysis
falcon check .
See Installation for platform notes and other package managers.
falcon review runs semantic analysis automatically when a Dart project has
.dart_tool/package_config.json. Semantic mode shells out to
dart analyze --format=json, then lets analyzer diagnostics win on the same
file, line, and rule class. Falcon still reports behavioral and security
findings that the analyzer does not own. Use --semantic to opt in explicitly
or --no-defer-to-analyzer (--no-defer) when you need to audit the raw
Falcon output.
falcon check stays syntactic by default, including in editor-save and
pre-commit flows. Use falcon check --semantic in CI when the Dart analyzer
shellout is acceptable.
$ falcon score .
AI Code Quality Score: 72/100 (Grade: C)
Resource Safety 85/100 ████████████████░░░░
Error Handling 45/100 █████████░░░░░░░░░░░ · 8 empty catches
Type Safety 90/100 ██████████████████░░
Security 100/100 ████████████████████
Convention Match 68/100 █████████████░░░░░░░
Complexity 55/100 ███████████░░░░░░░░░
| Feature | Command | Description |
|---|---|---|
| App Manager | falcon x manage health | Unified 0-100 health score across 6 dimensions |
| Dep Manager | falcon x manage deps | Unused deps, version issues, path/git deps |
| Architect | falcon x manage arch | Architecture governance, layer violations, hotspots |
| Maintenance | falcon x manage maint | Tech debt score, cleanup tasks, auto-fix pipeline |
| AI Score | falcon score | 0-100 AI Code Quality Score with 6-dimension breakdown |
| 61+ Rules | falcon check | Flutter, BLoC, Riverpod, accessibility rules |
| MCP Server | falcon-mcp | AI tools call Falcon during code generation |
| PR Comments | falcon review --format gh | Generate GitHub-ready PR review markdown |
| Vulnerability | falcon x vuln-scan | Security radar with CWE classification |
| Risk Prediction | falcon x predict | Predict production issues from patterns |
| Test Generation | falcon x test-gen | Generate test stubs from code analysis |
| Refactoring Sim | falcon x refactor-sim | "What if we migrate to Riverpod?" impact |
| Enterprise | falcon x enterprise | Policies, audit logs, compliance |
| HTTP API | falcon x api | REST API for integrations |
falcon doctor — fix your toolchainfalcon doctor # diagnose, then offer to fix what's broken
falcon doctor --fix --yes # unattended: install everything with recommended defaults
falcon doctor --dry-run # show the plan without touching anything
falcon doctor --only flutter --channel stable --flutter-version 3.24.5
falcon doctor --offline # diagnose only — never fetch the release manifest
--fix --yes installs unattended, but one step never happens for you: Falcon
does not edit your shell rc file. It prints the export PATH= line and names
the rc file your shell reads — flutter stays off PATH in your current shell
until you run that line yourself (or open a new one).
Falcon checks Flutter, Dart, CocoaPods, the Android SDK and Xcode — but only
the ones your project actually needs. A project with no ios/ directory is
never asked about Xcode.
When the Flutter SDK is missing, Falcon reads Google's release manifest,
offers the version your project pins (.fvmrc, .tool-versions, your CI
workflow, or the constraints in pubspec.yaml) alongside the latest on your
chosen channel, downloads it, verifies its checksum, and extracts it. Pass
--dir to choose where it goes — the SDK archive contains a top-level
flutter/ directory, so the path you name must itself end in flutter
(~/sdks/flutter, not ~/sdks/myflutter). A mismatched --dir is rejected
at plan-build time, before anything is downloaded.
Even without --fix, plain falcon doctor fetches Google's release manifest
so it can name a concrete version to offer. On a locked-down network that
fetch can stall for many seconds before giving up. Pass --offline to skip
it entirely — every check still runs and reports real information, but any
offered fix degrades to a manual instruction instead of an automatic install.
Two things Falcon will never do: run sudo, or accept a licence agreement for
you. Those steps are printed for you to run — Falcon does not re-check
afterwards; re-run falcon doctor yourself once you've done them.
Exit codes: 0 healthy, 1 warnings, 2 a check or fix failed, or the
command was used incorrectly, 3 manual action required. --format json
is diagnosis-only — it never prompts and never installs, even with --fix
— and reports fixes_applied: false with a reason instead. Agents that
need to drive an install use the MCP doctor tool instead.
Add Falcon to Cursor, Windsurf, or any MCP-compatible AI tool:
{
"mcpServers": {
"falcon": { "command": "falcon-mcp" }
}
}
Falcon analyzes Flutter code in real-time during generation — the AI self-corrects before showing you buggy code.
- name: Install Falcon
run: cargo install falcon-flutter
- name: Analyze
run: falcon check . --fail-on error
- name: PR Comment
run: falcon review . --base-ref origin/main --format gh | gh pr comment --body-file -
falcon check --preset ai-generated # 20 rules for AI code
falcon check --preset strict # All rules, max severity
falcon check --preset flutter # Flutter best practices
| Tier | Price | What You Get |
|---|---|---|
| Core CLI | Free forever | All 90+ commands, MCP server, LSP, API |
| Team | $9/seat/month | GitHub App, team dashboard, score trends |
| Enterprise | $29/seat/month | SSO, audit logs, policies, compliance |
The tool that makes AI code safe is free. The platform that proves it to your boss is paid.
Falcon is written in Rust with rayon parallelism and tree-sitter parsing:
| Project Size | Analysis Time |
|---|---|
| 50 files | ~0.5s |
| 200 files | ~1.5s |
| 500 files | ~3s |
Compare: dart analyze takes 30-70 seconds on the same projects.
Contributions welcome! Falcon is MIT-licensed.
git clone https://github.com/viveky259259/falcon
cd falcon
cargo test # 2435 tests
cargo build # Fast build
MIT — free for everyone, forever.
Built by Vivek Yadav
Rust
66.4%
HTML
31.6%