Skip to content

Documentation

Hyena is a Dart package and CLI for two related checks:

  • Dead code: resolve declarations and references, build a reachability graph, and report declarations that have no path from a root.
  • Complexity: parse functions, methods, constructors, and closures and calculate control-flow and size metrics.

It analyzes a Dart file or recursively scans a directory and can write console, JSON, Markdown, standalone HTML, or SARIF 2.1 output.

Goal Start here
Run Hyena once Getting started
Pick an installation model Installation
Upgrade an existing v1.x project Migrate to v2.0
Look up a command or flag CLI reference
Exclude files or change thresholds Configuration
Analyze a Dart workspace or monorepo Workspaces and monorepos
Preserve framework or generated entry roots Framework entry roots
Understand a finding Dead-code analysis or complexity analysis
Consume or publish a report Report formats
Use results in automation CI and automation
Connect an AI client Safe AI and MCP
Call the analyzers from Dart Library API
Contribute to Hyena Architecture and development
hyena.yaml
hyena:
exclude: []
complexity:
cyclomatic_threshold: 20
max_nesting: 5
max_parameters: 6
dead_code:
ignore_main: true
ignore_exports: false
ignore_private: false
entry_points: []
entry_point_annotations: []

Hyena also excludes *.g.dart, *.freezed.dart, *.mocks.dart, and any path containing a directory segment named generated, even when they are not listed in exclude.

Hyena Dart v2.0.0 moves to project-local installation and execution, reports unused public and private declarations by default, and makes console, JSON, Markdown, and HTML paths consistently relative to the package or workspace root.

Existing v1.x projects should read Migrating from v1.x to v2.0 before upgrading. Existing baseline fingerprints remain valid; SARIF, baseline, and MCP paths were already relative in v1.x.

Hyena Dart 1.2.1:

Hyena Dart 1.2.0 adds: