greatmind
v1.0.5
Published
Karpathy-style LLM wiki — scaffold a compounding knowledge base and wire it into your AI coding assistant
Downloads
1,041
Maintainers
Readme
One command. Zero infrastructure. Your AI agent builds and maintains a compounding knowledge base — automatically.
npx greatmind initThen in your AI assistant (OpenCode, Claude Code, or Codex):
/braindump "Ghostship raised $5M — rethink positioning"
/consolidate-knowledge
/daily-brief📋 Table of Contents
🚀 Quickstart
Install
npx greatmind initOr install globally:
npm install -g greatmind
greatmind initChoose your setup
The CLI walks you through two interactive choices:
| Choice | Options | Effect |
|--------|---------|--------|
| Scope | workspace / user | Where config files go: .greatmind/ or ~/.config/greatmind/ |
| Assistant | opencode / claude-code / codex / none | Which AI assistant to wire |
No detection. No guessing. Just tell it what you use.
To remove GreatMind later: greatmind uninstall — interactively de-registers assistants and optionally deletes data.
Start using
/braindump "Ghostship just raised $5M in seed funding for no-code testing"Your assistant will:
- Read the schema to understand conventions
- Classify the thought (domain, entities, projects)
- File it as an immutable raw source
- Create or update entity and concept pages
- Update the page catalog and activity log
💡 Why
Andrej Karpathy's LLM Wiki pattern flips knowledge management:
Instead of the LLM re-deriving knowledge from raw files on every query (RAG), it compiles knowledge into a structured, interlinked wiki that compounds over time.
GreatMind scaffolds this pattern into your project and wires it into your AI assistant. The LLM does the organizing, cross-referencing, and synthesizing — you just dump thoughts.
"The AI should be writing and maintaining the wiki, not the human. The human's job is to dump raw thoughts." — Andrej Karpathy
✨ Features
| Feature | What it does |
|---------|-------------|
| 🧠 Braindump | Dump raw thoughts — LLM classifies, files, and cross-references automatically |
| 🔗 Auto-linking | Every wiki page gets 2+ [[wikilinks]] — no orphan pages |
| 📐 Synthesis | Consolidates scattered braindumps into structured entity, concept, and comparison pages |
| ⚡ Daily Brief | Personalized briefings grounded in your recent notes |
| 📊 Weekly Check-in | Cross-domain theme analysis and trend detection |
| 🔍 Contradiction Resolution | Flags and resolves conflicting claims across sources |
| 🧹 Self-healing Lint | Automatic detection of orphan pages, broken links, and stale claims |
| 🔌 Multi-assistant | Works with OpenCode, Claude Code, and Codex CLI out of the box |
| 📁 Git-native | Everything is plain Markdown — commit it, diff it, open it in Obsidian |
📟 Commands
Terminal commands
| Command | What it does |
|---------|-------------|
| greatmind init | Scaffold GreatMind in the current directory (workspace or user level) |
| greatmind update | Refresh AGENTS.md, SCHEMA.md, and prompt files; preserves wiki data |
| greatmind uninstall | Interactively de-register assistants and optionally delete GreatMind data |
Slash commands
Once installed, use these in your AI assistant:
/braindump
Capture a raw thought. No structure needed.
/braindump Been thinking about our testing bottleneck. We spend 40% of sprint time on
manual regression. What if we auto-generate integration tests from OpenAPI specs?The LLM classifies, files, extracts entities, and cross-references against the existing wiki.
/daily-brief
Get a personalized briefing grounded in your recent notes and interests.
/daily-briefOutput: executive summary, recent signals with citations, strategic implications, action items.
/weekly-checkin
Analyze the past week — themes, patterns, cross-domain insights.
/weekly-checkin/consolidate-knowledge
The flagship command. Synthesize all unconsolidated braindumps into structured wiki pages.
/consolidate-knowledgeThe LLM reads every new braindump since the last consolidation, identifies themes, creates entity/concept/comparison/synthesis pages, cross-links them, resolves contradictions, and updates the index and log.
Tip: After updating to a new version, run greatmind update in your terminal to refresh instructions and prompts while preserving your wiki data.
🏗 Architecture
GreatMind implements Karpathy's three-layer architecture:
┌─────────────────────────────────────────────────┐
│ YOU │
│ Write raw thoughts, ask questions │
└─────────────────────┬───────────────────────────┘
│ /braindump
▼
┌─────────────────────────────────────────────────┐
│ RAW SOURCES (wiki/raw/) │
│ Immutable braindumps — you write, LLM reads │
│ but never modifies │
└─────────────────────┬───────────────────────────┘
│ /consolidate-knowledge
▼
┌─────────────────────────────────────────────────┐
│ THE WIKI (wiki/) │
│ Structured, interlinked Markdown pages │
│ LLM creates, updates, cross-references │
│ ├── entities/ ─ People, companies, tools │
│ ├── concepts/ ─ Ideas, methodologies │
│ ├── comparisons/ ─ A vs B analyses │
│ ├── synthesis/ ─ Consolidated frameworks │
│ └── sessions/ ─ Session digests │
└─────────────────────┬───────────────────────────┘
│ Reads during execution
▼
┌─────────────────────────────────────────────────┐
│ THE SCHEMA (AGENTS.md) │
│ Page types, workflows, conventions │
│ Updated via `greatmind update` │
└─────────────────────────────────────────────────┘| Layer | Location | Who owns it | Purpose |
|-------|----------|-------------|---------|
| Raw sources | wiki/raw/ | You | Immutable braindumps. You write; the LLM reads but never modifies. |
| The wiki | wiki/ | LLM | Structured, interlinked Markdown pages. The LLM creates, updates, and cross-references them. |
| The schema | AGENTS.md (in <prefix>/) | LLM | Page types, workflows, conventions. Updated via greatmind update. |
📁 File Layout
GreatMind supports two installation scopes. You choose during greatmind init:
Workspace (per-project — .greatmind/ in your project root):
your-project/
├── .greatmind/
│ ├── AGENTS.md ← Schema: conventions, rules, workflows
│ ├── SCHEMA.md ← Detailed wiki schema (read on-demand)
│ ├── prompts/ ← Slash command definitions
│ │ ├── braindump.md
│ │ ├── daily-brief.md
│ │ ├── weekly-checkin.md
│ │ └── consolidate-knowledge.md
│ └── wiki/
│ ├── raw/ ← Braindumps (immutable, LLM read-only)
│ ├── entities/ ← People, companies, tools
│ ├── concepts/ ← Ideas, methodologies
│ ├── comparisons/ ← A vs B analyses
│ ├── synthesis/ ← Consolidated frameworks
│ ├── sessions/ ← Session-level digests (crystallization)
│ ├── index.md ← Page catalog (auto-updated)
│ └── log.md ← Activity log (append-only)
├── opencode.json ← Updated with instruction reference
└── .opencode/commands/ ← Registered slash commandsUser (all projects — ~/.config/greatmind/):
~/.config/greatmind/
├── AGENTS.md ← Same structure, shared across projects
├── SCHEMA.md
├── prompts/
└── wiki/📊 Comparison
| | Traditional wiki | GreatMind |
|---|---|---|
| Filing | You manually organize | LLM classifies and files automatically |
| Cross-references | You maintain links | LLM links every page with 2+ [[wikilinks]] |
| Synthesis | You compile insights | LLM consolidates across braindumps |
| Maintenance | You clean up | LLM lints orphans, broken links, contradictions |
| Format | Plain .md files | Plain .md files — check into git, open in Obsidian |
📋 Requirements
- Node.js 18+
- An AI coding assistant: OpenCode, Claude Code, or Codex CLI
- (Optional) Obsidian — browse the wiki visually
🤝 Contributing
We welcome contributions! GreatMind is in early alpha — every issue, PR, and suggestion helps shape the direction.
Getting started
git clone https://github.com/wengpaul/greatmind.git
cd greatmind
npm install
npm run buildProject structure
src/
├── index.ts ← CLI entry point
├── init.ts ← Scaffold & update logic
├── install.ts ← Assistant wiring (opencode, claude-code, codex)
├── uninstall.ts ← Interactive uninstall
└── templates.ts ← Inline template stringsGuidelines
- Keep the three-layer architecture intact — raw sources are immutable
- All behavioral changes belong in
AGENTS.mdandsrc/templates.ts(they must stay in sync) - No runtime dependencies on files — templates are inlined in
src/templates.ts - PRs welcome for: new assistant integrations, improved prompts, lint rules, and documentation
📄 License
MIT © Paul Weng
