falcon

mcp
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Gecti
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Rust-powered static analysis CLI for Flutter/Dart

README.md

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

# 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

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 lint their code and, from 0.7.0, run, hot reload, see and drive the app
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

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.

From 0.7.0 the agent can also run the app and check its own work: run_app, edit, reload, read logs for exceptions, look at the screen with widget_tree and screenshot, use it with interact (tap, type, scroll, back), and run an integration test with verify. See docs/mcp.md.

Check your version first. falcon --version must say 0.7.0 or later for the running-app tools. Falcon 0.6.0 has the code tools only (lint_file, lint_diff, review, explain, fix_safe, doctor).

What the running-app tools have been run on:

Target Status
macOS desktop, debug build Run end to end: docs/loop-evidence
iOS simulator, debug build Run end to end: docs/loop-evidence
Android emulator or device Not tested
Physical iPhone or iPad Not tested
Windows and Linux desktop Not tested
Flutter web screenshot is not supported; the other tools are not tested
Profile and release builds widget_tree and interact do not work; they need a debug build

Falcon runs the app, sends taps and text, returns the logs, reloads and runs tests. It does not write the fix: the agent does, with its own editing tools. The evidence page lists what one recorded run does and does not show.

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    # 26 rules for AI code
falcon check --preset strict          # All rules, max severity
falcon check --preset flutter         # Flutter best practices

Pricing

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.

Performance

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.

Documentation

Contributing

Contributions welcome! Falcon is MIT-licensed; see LICENSE.
To report a security issue, follow SECURITY.md rather than opening a public issue.

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

Yorumlar (0)

Sonuc bulunamadi