Skip to content

LienLocal-First Code Intelligence for AI

Structural analysis + fast lexical search that give AI agents deep understanding of your codebase. 100% local, 100% private.

Quick Start โ€‹

text
/plugin marketplace add getlien/lien
/plugin install lien

That's it. Lien's MCP tools and the Explore agent are available in every Claude Code session, in every repo โ€” no per-project setup. First use in a new git repo triggers a one-time index automatically. See the Claude Code plugin guide for what its hooks do beyond the MCP config.

Other editors (Cursor, Windsurf, OpenCode, Kilo Code, Antigravity) โ€‹

1. Install Lien:

bash
npm install -g @liendev/lien

2. Configure your editor:

bash
lien init

This writes the correct MCP config for your editor.

3. Restart your editor and start asking questions about your codebase!

Lien auto-detects your project structure and indexes on first use.

How It Works โ€‹

  1. Index: Lien scans your codebase and chunks it into semantic units (functions, classes, blocks) using Tree-sitter AST parsing โ€” no model to download
  2. Store: Chunks, their complexity metrics, and the import graph are written to a local SQLite database in ~/.lien/indices/
  3. Answer: When your AI assistant asks a structural question ("what depends on this?", "how complex is this?"), Lien answers it with indexed SQL
  4. Search: For discovery, Lien runs FTS5/BM25 lexical search over symbol names, identifier-split tokens, and content
  5. Context: Results flow back to your assistant, giving it accurate, explainable context

Use Cases โ€‹

  • Impact Analysis: "What depends on this file?" / "Is this safe to delete?"
  • Tech Debt Analysis: "What are the most complex functions?"
  • Test Coverage: "What tests cover this module?"
  • Find Implementations: "Where is the retry backoff handled?" (use terms that appear in the code)
  • Locate Patterns: "Find similar error-handling code"
  • Refactoring Scope: "How many files need updating if I change this signature?"

Privacy First โ€‹

Lien is built with privacy as a core principle:

  • All code analysis happens on your machine
  • No data is sent to external servers
  • No telemetry or usage tracking
  • Open source and auditable

Free & Open Source โ€‹

Lien is licensed under AGPL-3.0 and free forever for local use. The license ensures:

  • โœ… Use Lien locally without restrictions
  • โœ… Modify and distribute freely
  • โœ… Improvements benefit the community
  • โœ… Sustainable long-term development

Questions about licensing? Contact alf@lien.dev


Lien /ljษ›ฬƒ/ โ€” French for "link"

Linking code intelligence with AI tools, one query at a time.

Made with โค๏ธ for developers who care about privacy and local-first tools.

Released under the AGPL-3.0 License. Free forever for local use.