Skip to content
kareki Documentation

kareki Documentation

kareki is a workspace-wide dead code finder for Dart and Flutter. It follows references across Melos and pub workspaces to find unused public APIs, files, dependencies, and parameters that package-local analysis cannot see.

It is designed for real codebases: generated code can be described with presets, existing findings can be captured in a baseline, and configuration drift can be checked with kareki doctor.

Quick start

Add kareki to your development dependencies:

pubspec.yaml
dev_dependencies:
  kareki: ^0.7.0

Install the project’s dependencies and run code generation, then execute from the workspace root:

dart run kareki

What it finds

RuleFinds
unused_elementPublic declarations with no caller in the workspace
unused_fileDart files that are never imported, exported, or used as a part
unused_pub_dependencyDeclared packages with no recognized source, analyzer configuration, native plugin, or font asset use
test_only_usedLibrary declarations referenced only by tests
unused_parameterParameters never read by their declaration
unused_parameter_optionalOptional parameters never passed at any call site

Tool comparison

Six key features at a glance. ✅ Supported (including opt-in features), — no equivalent feature.

FeaturekarekiciachDart Code Linterdependency_validatorDart standard analysis
Unused public declarations and members✅✅✅——
Unused private declarations and members—✅✅—✅
Public declaration cycles unreachable from entry points✅————
Unused Dart files✅—✅——
Unused pub dependencies✅——✅—
Report only new findings using a baseline✅————

See the full comparison for other features, required settings, limitations, and versions compared.

Explore the documentation

  • CLI reference — commands, options, formats, and exit codes
  • Configuration — workspace settings, presets, exclusions, and suppressions
  • Baseline — adopt kareki incrementally in an existing codebase
  • Doctor — detect stale exclusions and suppressions
  • How it works — understand the analysis pipeline and its boundaries
  • Comparing similar tools — ciach, Dart Code Linter, and other Dart tools
  • Best practices — schedule cleanup pull requests with an AI agent

Links

Last updated on