Learnlance Extracts Concepts from AI Agents into Personal Knowledge Graphs
Learnlance watches code written by Claude Code, Cursor, Codex, and Copilot to construct an interactive, local knowledge graph of learned engineering concepts. It runs via detached background processes with zero external dependencies.

Impact: Medium
Why it matters
It prevents developer skill atrophy during rapid vibe-coding by automatically cataloging computer science concepts as agents write your implementations.
TL;DR
- 01Monitors Claude Code, Cursor, Codex, and Copilot code changes in real time.
- 02Generates interactive offline HTML concept graphs without adding runtime latency.
- 03Zero third-party dependencies; operates via existing CLI logins or local Ollama instances.
Key facts
- Supported Agents
- Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity
- Dependencies
- 0 third-party packages
- Storage Location
- ~/.learnlance/
Passive Concept Extraction
Learnlance attaches to developer workflows across multiple agent harnesses. During execution, it normalizes each vendor hook payload into a standard CodeEvent. It then prompts an existing local CLI (such as claude, gemini, copilot, cursor-agent, or ollama) or runs directly --in-chat to deduce architectural patterns and data structures without requiring dedicated third-party API keys.
pip install learnlance
learnlance setup
learnlance showZero-Friction Hook Architecture
The utility avoids pipeline latency by detaching concept extraction tasks. If an agent run makes no substantive code changes, Learnlance skips LLM invocation entirely. Hook failures are caught and suppressed to prevent IDE session crashes. Engineers can inspect configurations and active triggers across projects using learnlance doctor.
Offline Visualization and Project State
All graphs and recaps live in ~/.learnlance/. Project-specific graphs reside at projects/<project>-<hash>/graph.json, while multi-project views are aggregated in graph.html. Manual topic indexing and cleanup are supported through CLI subcommands like learnlance add and learnlance clear.
Try it in 2 minutes
pip install learnlance
learnlance setup
learnlance showbash
✓ When to use
- Daily vibe-coding sessions with Claude Code, Cursor, or Codex where you want to retain algorithmic learnings.
- Onboarding to complex codebases to map patterns and algorithms synthesized by coding agents.
✕ When NOT to use
- Strict air-gapped repositories where no local background subprocesses or CLI invocations are permitted.
- Ephemeral sandbox containers where files in ~/.learnlance/ are wiped on teardown.
What to do today
- Install via `pip install learnlance` and run `learnlance setup` in your active repositories.
- Execute `learnlance doctor` to verify hook configurations across Claude Code and Cursor.
- Run `learnlance show` to inspect your offline interactive concept graph.
What the community says
“It’s available on PyPI: pip install learnlance Then: learnlance setup and start coding. The graph is generated from your coding session.”
“This is really cool, thanks for sharing!”
Sources