Activate the CLI
Install the published executable into your Dart global cache.
dart pub global activate hyena_dartStatic analysis for Dart + Flutter
Hyena resolves your Dart AST to trace declaration reachability, then measures function-level complexity. Run it from the terminal, emit a report, or call the analyzers from Dart.
v1.2.1 · Dart SDK 3.10+ · MIT licensed · local-first
$ hyena_dart analyze lib --no-color
HYENA CODE ANALYSIS REPORT
────────────────────────────────
Target: lib
DEAD CODE
Total declarations: 204
Unused entities: 0
✓ No dead code detected
COMPLEXITY
Files: 17
Functions: 251
Threshold violations: 5dart pub global activate hyena_dartSafe AI / MCP
Introduced in v1.1.2
Start hyena_mcp with one absolute project root. An MCP client receives exactly one read-only tool for relative Dart paths and selected checks.
hyena_analyze(path, checks) returns schema-versioned findings.{
"mcpServers": {
"hyena": {
"command": "hyena_mcp",
"args": [
"--root",
"/absolute/project"
]
}
}
}hyena_analyze({
"path": "lib",
"checks": "both"
})The short path
Use the defaults first. Add a config only when generated files, public exports, or your team's complexity limits need different treatment.
Install the published executable into your Dart global cache.
dart pub global activate hyena_dartDead-code analysis needs analyzer resolution for every included file.
dart pub getAnalyze the package, a subdirectory, or one Dart file while iterating.
hyena_dart analyze .Analysis surface
Dead-code analysis follows resolved references from roots. Complexity analysis parses each function, method, constructor, and closure into a small set of reviewable metrics.
How analysis worksReports declarations that cannot be reached from entry points, inherited implementations, top-level references, and public API roots.
Measures control-flow paths, nesting, parameters, physical LOC, Halstead volume, and a normalized maintainability index.
Custom glob patterns apply on top of built-in exclusions for common generated Dart outputs and generated directories.
Adoption controls
Source suppressions and a versioned baseline are applied before reporting and exit-code policy, so existing debt does not need a broad exclusion.
Keep an intentional exception next to the code and scope it to a declaration or rule.
// hyena:ignore dead-codeCommit stable, line-independent fingerprints for findings the project accepts today.
--write-baseline=hyena-baseline.jsonApply the baseline, then return exit code 1 only for the selected finding categories.
--fail-on=dead-code,complexityOutput
Every command can write to stdout or a file. The selected reporter changes presentation, not the analysis itself.
Compact summaries and the first 20 findings, with optional ANSI color.
Structured metrics for custom policies and SARIF 2.1 for code-scanning systems.
Tables and collapsible file sections that fit issue and pull-request workflows.
A standalone report with summary cards and detailed violation tables.
Operational notes
Hyena is a focused analyzer, not a replacement for the Dart compiler, lints, tests, or runtime coverage.
Documentation