Skip to content

LienLocal-First Semantic Code Search

Give AI deep understanding of your codebase through semantic search. 100% local, 100% private.

Quick Start ​

1. Install Lien:

bash
npm install -g @liendev/lien

2. Configure your AI assistant:

  • For Cursor: Create .cursor/mcp.json in your project root
  • For Claude Code: Create claude_desktop_config.json in your config folder
Cursor Setup (.cursor/mcp.json)
json
{
  "mcpServers": {
    "lien": {
      "command": "lien",
      "args": ["serve"]
    }
  }
}
Claude Code Setup (claude_desktop_config.json)

Location:

  • macOS: ~/Library/Application Support/Claude/
  • Windows: %APPDATA%\Claude\
  • Linux: ~/.config/Claude/
json
{
  "mcpServers": {
    "lien": {
      "command": "lien",
      "args": ["serve", "--root", "/path/to/your/project"]
    }
  }
}

Replace /path/to/your/project with your actual project path.

3. Restart your AI assistant and start asking questions about your codebase!

That's itβ€”no configuration files needed. Lien auto-detects your project structure and indexes on first use.

Note: Cursor's per-project .cursor/mcp.json approach is recommended for automatic project switching. Claude Code requires global configuration with explicit --root paths. See Getting Started for details.

How It Works ​

  1. Index: Lien scans your codebase, chunks code into manageable pieces, and generates embeddings using a local ML model
  2. Store: Embeddings are stored in a local vector database in ~/.lien/indices/
  3. Search: When you query through Cursor, Lien finds the most semantically similar code chunks
  4. Context: Results are returned to Cursor, providing better, context-aware responses

Use Cases ​

  • Understand New Codebases: "Show me how authentication works"
  • Find Implementations: "Where are API endpoints defined?"
  • Locate Patterns: "Find similar error handling code"
  • Discover Related Code: "What tests cover this module?"
  • Tech Debt Analysis: "What are the most complex functions?"
  • Impact Analysis: "What depends on this file?"

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 semantic code understanding 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.