Complexity Analysis
Identify tech-debt hotspots with cyclomatic, cognitive, and Halstead metrics. Prioritize refactoring with `lien complexity`.
Complexity, risky-to-change ranking, and deterministic PR-review signals for AI coding agents. Parses your working tree on demand โ no index, no server, 100% local.
1. Install Lien:
npm install -g @liendev/lien2. Run it in your project:
lien healthThat's it โ no setup wizard, no config file, no server to start. Lien parses your working tree on the spot and prints a report.
Lien parses your code with Tree-sitter on demand, every run, and answers structural questions ("how complex is this?", "what's risky to touch?", "did this change introduce a stale literal?") straight from that parse. There is no persisted index and nothing runs in the background. See How It Works for the full pipeline.
Tech-debt hotspots, ranking what's risky to change before a refactor, deterministic signals over a diff before you open a PR, and a pre-commit gate against new complexity. See Use Cases in the guide for examples.
Your code stays on your machine every time you run Lien: no external API calls, no telemetry. The one network step is fetching the published npm package itself (via npm install, or npx if you skip the global install) on first setup. See How It Works for details.
Lien is licensed under AGPL-3.0 and free forever for local use. Questions about licensing? Contact alf@lien.dev
Lien /ljษฬ/: French for "link"