viveky259259/falcon

Rust-powered static analysis CLI for Flutter/Dart

Rust

0

244 commits

updated Sep 18, 2026

See the code

README

Falcon

Rust-powered static analysis for Flutter/Dart — designed for AI-generated code.

Falcon AI Score License Rules Tests

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.

Quick Start

# 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.

Semantic Analysis

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.

AI Code Quality Score

$ 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 ███████████░░░░░░░░░

Features

FeatureCommandDescription
App Managerfalcon x manage healthUnified 0-100 health score across 6 dimensions
Dep Managerfalcon x manage depsUnused deps, version issues, path/git deps
Architectfalcon x manage archArchitecture governance, layer violations, hotspots
Maintenancefalcon x manage maintTech debt score, cleanup tasks, auto-fix pipeline
AI Scorefalcon score0-100 AI Code Quality Score with 6-dimension breakdown
61+ Rulesfalcon checkFlutter, BLoC, Riverpod, accessibility rules
MCP Serverfalcon-mcpAI tools call Falcon during code generation
PR Commentsfalcon review --format ghGenerate GitHub-ready PR review markdown
Vulnerabilityfalcon x vuln-scanSecurity radar with CWE classification
Risk Predictionfalcon x predictPredict production issues from patterns
Test Generationfalcon x test-genGenerate test stubs from code analysis
Refactoring Simfalcon x refactor-sim"What if we migrate to Riverpod?" impact
Enterprisefalcon x enterprisePolicies, audit logs, compliance
HTTP APIfalcon x apiREST API for integrations

See all 90+ commands →

falcon doctor — fix your toolchain

falcon 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.

AI Tool Integration (MCP)

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.

CI/CD Integration

GitHub Actions

- 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 -

Presets

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

Pricing

TierPriceWhat You Get
Core CLIFree foreverAll 90+ commands, MCP server, LSP, API
Team$9/seat/monthGitHub App, team dashboard, score trends
Enterprise$29/seat/monthSSO, audit logs, policies, compliance

The tool that makes AI code safe is free. The platform that proves it to your boss is paid.

Performance

Falcon is written in Rust with rayon parallelism and tree-sitter parsing:

Project SizeAnalysis Time
50 files~0.5s
200 files~1.5s
500 files~3s

Compare: dart analyze takes 30-70 seconds on the same projects.

Documentation

Contributing

Contributions welcome! Falcon is MIT-licensed.

git clone https://github.com/viveky259259/falcon
cd falcon
cargo test    # 2435 tests
cargo build   # Fast build

License

MIT — free for everyone, forever.


Built by Vivek Yadav

Contributors

viveky259259

179 commits

ff-vivek

43 commits

claude

12 commits

vivek-zency

10 commits

viveky259259/falcon

Rust-powered static analysis CLI for Flutter/Dart

Rust

0

244 commits

updated Sep 18, 2026

See the code

README

Falcon

Rust-powered static analysis for Flutter/Dart — designed for AI-generated code.

Falcon AI Score License Rules Tests

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.

Quick Start

# 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.

Semantic Analysis

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.

AI Code Quality Score

$ 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 ███████████░░░░░░░░░

Features

FeatureCommandDescription
App Managerfalcon x manage healthUnified 0-100 health score across 6 dimensions
Dep Managerfalcon x manage depsUnused deps, version issues, path/git deps
Architectfalcon x manage archArchitecture governance, layer violations, hotspots
Maintenancefalcon x manage maintTech debt score, cleanup tasks, auto-fix pipeline
AI Scorefalcon score0-100 AI Code Quality Score with 6-dimension breakdown
61+ Rulesfalcon checkFlutter, BLoC, Riverpod, accessibility rules
MCP Serverfalcon-mcpAI tools call Falcon during code generation
PR Commentsfalcon review --format ghGenerate GitHub-ready PR review markdown
Vulnerabilityfalcon x vuln-scanSecurity radar with CWE classification
Risk Predictionfalcon x predictPredict production issues from patterns
Test Generationfalcon x test-genGenerate test stubs from code analysis
Refactoring Simfalcon x refactor-sim"What if we migrate to Riverpod?" impact
Enterprisefalcon x enterprisePolicies, audit logs, compliance
HTTP APIfalcon x apiREST API for integrations

See all 90+ commands →

falcon doctor — fix your toolchain

falcon 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.

AI Tool Integration (MCP)

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.

CI/CD Integration

GitHub Actions

- 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 -

Presets

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

Pricing

TierPriceWhat You Get
Core CLIFree foreverAll 90+ commands, MCP server, LSP, API
Team$9/seat/monthGitHub App, team dashboard, score trends
Enterprise$29/seat/monthSSO, audit logs, policies, compliance

The tool that makes AI code safe is free. The platform that proves it to your boss is paid.

Performance

Falcon is written in Rust with rayon parallelism and tree-sitter parsing:

Project SizeAnalysis Time
50 files~0.5s
200 files~1.5s
500 files~3s

Compare: dart analyze takes 30-70 seconds on the same projects.

Documentation

Contributing

Contributions welcome! Falcon is MIT-licensed.

git clone https://github.com/viveky259259/falcon
cd falcon
cargo test    # 2435 tests
cargo build   # Fast build

License

MIT — free for everyone, forever.


Built by Vivek Yadav

Contributors

viveky259259

179 commits

ff-vivek

43 commits

claude

12 commits

vivek-zency

10 commits

Languages

Rust

66.4%

HTML

31.6%