Qipu
Local-first knowledge graph CLI for humans and AI agents.
Sometimes it's ok to give your LLM a graph knowledgebase, as a treat.
Qipu is a local-first CLI for building a persistent knowledge graph that both you and your AI coding agents can query. Think Zettelkasten meets man pages meets "please stop re-researching this every session."
The problem: Your LLM agent is brilliant at searching the current codebase but has the long-term memory of a goldfish. Every session, it rediscovers the same APIs, re-reads the same docs, and forgets that clever pattern you found last week.
The fix: A git-backed knowledge store where research actually accumulates. Typed notes, semantic links, value scoring—all queryable by humans and agents alike.
Quick Start
# Install
# Initialize a store
# Tell your agent
# Capture knowledge
|
# Link notes to build the graph
# Search and prime your agent
Example: Building connections
# Capture two related notes
|
# Created note qp-01J5A...
|
# Created note qp-01J5B...
# Link them with semantic relationship
# See the graph
Essential Commands
| Command | Action |
|---|---|
qipu capture |
Quick capture from stdin or args |
qipu link add <from> <to> |
Create typed link between notes |
qipu link tree <id> |
Visualize note's connections |
qipu search <query> |
Full-text search with ranking |
qipu prime |
Generate context primer for agent sessions |
Run qipu help or qipu <command> --help for full usage details.
Features
- Git-Backed Storage: Notes stored as files in
.qipu/. Version, branch, merge with your code. - Agent-Optimized Output:
--format json/recordsdesigned for LLM context injection. - Typed Knowledge: Fleeting notes evolve to permanent; explicit link semantics (
derived-from,supports,contradicts). - Value Scoring: Surface high-quality notes, deprecate stale ones. Filter by
--min-value. - Cross-Session Memory: Research accumulates instead of being rediscovered every session.
- Health Checks:
qipu doctorcatches broken links, orphan notes, duplicates.
CLI Reference
Core Commands
Value Management
The value field represents note quality/importance:
- 0-20: Deprioritized (superseded drafts, duplicates)
- 21-80: Standard (general research, work-in-progress)
- 81-100: High-value (canonical definitions, MOCs, gems)
Link Management
LLM Integration
Note: context command supports --min-value to filter by note quality.
Maintenance
Project Structure
crates/
qipu-core/ # Core library (domain logic, persistence, indexing)
src/
main.rs # Entry point, CLI parsing, dispatch
cli/ # CLI argument definitions (Clap derive)
commands/ # Command implementations (depend on qipu-core)
tests/ # Integration tests and benchmarks
specs/ # Implementable specifications
External Tools:
- llm-tool-test - Standalone testing framework for validating qipu with LLM agents (sibling project)
The qipu-core crate is a reusable library that can be used independently of the CLI.
Why Not Just Markdown Files?
You could dump everything in docs/ and grep your way through. We've tried it. Here's what breaks:
| Markdown folder | Qipu |
|---|---|
| Flat or ad-hoc hierarchy | Typed notes (fleeting → permanent) with explicit link semantics |
Search = grep or filename guessing |
Full-text search with ranking, value scoring, tag filters |
| "Which doc is current?" | Value scores surface high-quality notes, deprecate stale ones |
| No structure for agents to parse | --format json/records designed for LLM context injection |
| Links rot silently | qipu doctor catches broken links, orphan notes |
| Everything or nothing | qipu prime / qipu context give agents relevant context, not a haystack |
The graph structure isn't academic—it's how you answer "what do I know about X?" without reading everything.
Qipu is also inspired by beads—a similar project focused on moving tasks out of progress.md files and enabling context sharing between multiple LLMs.
Development
Testing with LLM Agents
To validate qipu works correctly with LLM coding agents, install the standalone llm-tool-test testing framework:
# Install llm-tool-test from crates.io (when published)
# Or install from source
# Run qipu validation scenarios (from your qipu project directory)
See docs/llm-testing.md for detailed usage instructions.
Documentation
Specs | Agent Guide | Usage Patterns | Building on Qipu | AI Skills Integration