npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@liendev/lien

v0.80.4

Published

Local lexical code search and dependency analysis for AI assistants via MCP

Readme

Lien

/ljɛ̃/, French for "link"

A local code-health CLI: what's risky to change, and what your change just made worse. 100% local, 100% private.

Lien parses your working tree with Tree-sitter and answers four questions about a change — what is risky to touch, what crossed a complexity threshold, what deterministic signals fire on the diff, and where the hotspots are. There is no server, no database, and nothing to index: every command reads the files on disk when you run it. Point it at a repo and it works.

Full Documentation | Getting Started | How It Works


Features

  • Risk ranking - lien health ranks functions by complexity × fan-in ÷ test coverage
  • Pre-commit gate - lien delta fails only on NEW complexity threshold crossings, never pre-existing ones
  • Deterministic diff signals - lien review flags stale duplicated literals, removed exports, doc drift and more
  • Complexity analysis - Human-friendly metrics: test paths, mental load, time to understand
  • Nothing to set up - No index, no server, no config, no daemon. Install and run
  • 100% Local & Private - All analysis happens on your machine; no network calls
  • Fast - Whole-repo parse in seconds; lien delta in ~50 ms
  • Free Forever - No API costs, no subscriptions, no network calls at all
  • Ecosystem-Aware & Monorepo - Auto-detects 12 ecosystem presets; supports 15+ languages

Quick Start

# 1. Install
npm install -g @liendev/lien

# 2. Run it in any repo
lien health

That's the whole setup. No editor configuration, no indexing step, no wizard.

lien health              # what's risky to change here?
lien delta               # did my working tree cross a complexity threshold?
lien review --base main  # deterministic signals over my diff
lien complexity          # where are the hotspots?

Full installation guide

The four commands

| Command | Answers | |---------|---------| | lien health | Which functions are risky to change? (complexity × fan-in ÷ test coverage) | | lien delta | Did this change push a function over a threshold it was under before? | | lien review | What deterministic signals fire on this diff? | | lien complexity | Where is the tech debt? |

lien delta is the one built to sit in a pre-commit hook or CI: it exits non-zero only for a function that crossed a threshold it was under at the base commit. Touching or improving a pre-existing violation never fails it.

Previous versions shipped an MCP server, a persisted SQLite index and FTS5 lexical search. All three have been removed, along with lien serve, lien index, and the search_code / get_files_context / get_dependents / list_functions / find_similar / get_complexity tools. An editor configured against lien serve will fail to start it. The structural questions Lien still answers, it answers by parsing on demand.

Complexity Metrics

Lien tracks code complexity with human-friendly outputs:

  • Test paths - Cyclomatic complexity as "needs ~X tests for full coverage"
  • Mental load - Cognitive complexity with nesting penalty
  • Time to understand - Halstead effort as readable duration (~2h 30m)
  • Estimated bugs - Halstead prediction (Effort^(2/3) / 3000)

Documentation

Supported Languages

TypeScript • JavaScript • Vue • Python • PHP • Liquid • Go • Rust • Java • C/C++ • Ruby • Swift • Kotlin • C# • Scala • Markdown • YAML

Ecosystem Presets: 12 ecosystem presets including Node.js, Python, PHP, Laravel, Ruby, Rails, Rust, JVM, Swift, .NET, Django, and Astro (auto-detected)

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Support

License

AGPL-3.0 © Alf Henderson

Lien is free forever for local use. The AGPL-3.0 license requires that anyone who distributes a modified version release its source under the same terms. For licensing questions, contact [email protected].