Cairn is a local-first, daemon-free hybrid search index over a single SQLite file, combining FTS5 full-text search, vector embeddings (via sqlite-vec), and an AST-based knowledge graph for code and text. Version 1.2.1, latest stable release. It requires Node >=20 and an embedding model (default: Ollama with nomic-embed-text, optional embedded runtime via node-llama-cpp). Key differentiators: all-in-one file storage, no external dependencies beyond Ollama (or self-contained embedded runtime), built-in tree-sitter parsing for code entities and call graphs, MCP server for LLM integration, and RRF fusion for hybrid retrieval. Intended for curated personal knowledge bases, codebase indexing, and RAG with local LLMs.
npm install cairn-indexNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Cairn instance with Ollama runtime, ingests a text snippet, and performs a hybrid search returning ranked chunks.
Upgrade Node to version 20 or higher.
Use import { Cairn } from 'cairn-index' and ensure your project is configured for ES modules (e.g., type: 'module' in package.json).Start Ollama and pull nomic-embed-text: 'ollama pull nomic-embed-text'. For air-gapped use, pre-cache the model and set CAIRN_OFFLINE=1.
Set CAIRN_OFFLINE=1 to disable automatic downloads and require pre-cached models.
Use the runtime instance approach (e.g., new OllamaRuntime(...)) which is more explicit and stable.
Run 'npm install cairn-index' or 'pnpm add cairn-index'.
Ensure you are using 'import { Cairn } from 'cairn-index'' with correct casing and the package is in node_modules.Verify you are using Cairn class correctly with proper initialization. Check version compatibility.