Built a knowledge graph tool for AI coding that runs 100% locally, zero LLM calls to mine, local SQLite, no cloud. v0.2 shipped

Body:

Context for this sub: engram is a persistent codebase memory for AI coding tools. Everything runs locally. Zero cloud, zero telemetry, zero LLM calls to build the graph, zero native dependencies. The graph is a plain SQLite file at .engram/graph.db inside your project — you can rm it, copy it, grep it, whatever.

Why this might matter if you're running local models:

Context windows are the scarce resource on 8B-13B-70B local models. Dumping 15 source files to answer "how does auth work" eats your whole budget. engram returns a ~300 token structural subgraph instead. Same semantic question, ~20x fewer tokens. That's the difference between fitting in context and not.

How it stays truly local:

  • AST miner is pure regex across 10 languages (TS/JS/Python/Go/Rust/Java/C/C++/Ruby/PHP). No tree-sitter binary (planned for v0.3), no Ollama, no embeddings, no calls to anything. Just deterministic text extraction. ~40ms per project.
  • Storage is sql.js — pure JavaScript SQLite. No native compilation, no build toolchain, no Docker, no Python. Installs cleanly on any Node 20+ with one command.
  • Git miner reads git log locally for co-change patterns. No remote git fetches.
  • Session miner extracts decisions/patterns/mistakes from CLAUDE.md, .cursorrules, AGENTS.md, .engram/sessions/ using regex. No LLM-based extraction.
  • MCP server is stdio JSON-RPC. Only the AI tool you pipe it to sees the output. No telemetry, no usage pings.

The only network call in the entire tool is npm install. You can verify this by grep-ing the source for fetch, http, https, url — nothing hits the network at runtime.

v0.2 highlights if you're deciding whether to install:

  • Indexes ~/.claude/skills/ (or any directory) into the graph, so keyword queries return both the relevant code AND the skill to apply.
  • New task-aware gen: engram gen --task bug-fix writes a CLAUDE.md section emphasizing hot files + past mistakes. --task feature emphasizes architecture + decisions. --task refactor emphasizes dependency graph + patterns. Useful for local model prompts that need trimming.
  • New regret buffer: mistake nodes extracted from your session notes get surfaced with a ⚠️ warning at the top of query output so your model stops re-making the same wrong turns.
  • New list_mistakes MCP tool for clients that want to proactively check before a change.
  • Correctness: labels are UTF-16 surrogate-safe truncated so emoji don't corrupt the JSON-RPC frame. Unbalanced CLAUDE.md markers now throw instead of silently corrupting user data. Atomic init lockfile prevents race conditions.

Install:

npm install -g engramx@0.2.0 cd ~/local-llama-project engram init engram query "how does inference batching work" 

GitHub: https://github.com/NickCirv/engram

License: Apache 2.0

Runtime deps: chalk, commander, graphology, sql.js. That's it.

Native deps: zero.

132 tests passing. CI green on Node 20 and 22.

If the zero-cloud, zero-LLM-call stance is what sold you, you might also appreciate that every phase of the v0.2 release went through a manual code-review gate and the MCP stdio boundary went through a security review. The security findings (unvalidated numeric args, unhandled promise rejections) are documented in the CHAN

submitted by /u/SearchFlashy9801
[link] [comments]

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top