Skip to content
/

IWE

iwe · iwe-org/iwe · ★ 1.1k · last commit 2026-05-25

Primitive shape 13 total
MCP tools 13
00

Summary

IWE — Summary

IWE (written in Rust) turns a directory of Markdown files into a queryable knowledge graph for both human editors and AI agents. It ships four binaries: iwe (CLI), iwes (LSP server for editors), iwec (MCP server for AI agents), and liwe (core library). The Markdown graph is structured through "inclusion links" (a link on its own line means "this topic includes that subtopic") and "cross-references" (inline wikilinks). A note can belong to multiple topics simultaneously.

IWE has no built-in AI — it is purely infrastructure: a Rust-backed LSP + MCP server that lets both VS Code/Neovim/Zed and Claude/Cursor/Windsurf navigate the same Markdown files. The MCP server (iwec) exposes tools for find, retrieve, tree, squash, create, update, delete, rename, extract, inline, and normalize operations. The system processes 20,000 files in under one second.

Compared to seeds, IWE is closest to basic-memory (knowledge graph backed by Markdown files, MCP access for AI, human-editable). The distinction: IWE structures relationships exclusively through Markdown inclusion links (parent-child hierarchy), while basic-memory uses observation syntax (- [category] text) and typed wikilinks (- depends_on [[Entity]]). IWE also ships a full LSP server for IDE integration that basic-memory lacks.

01

Overview

IWE — Overview

Origin

Dmytro Halichenko. Apache-2.0 license. Rust. Version 0.1.8. Active development (last commit 2026-05-25). Available on crates.io as iwe, iwes, iwec.

Philosophy

From README:

"IWE turns a directory of markdown files into a knowledge graph — a connected structure you browse from your editor and your AI queries from the command line. Same files, same links, two interfaces. No cloud, no database, no lock-in. Version everything with git."

"IWE itself has no built-in AI — it works alongside Claude, Codex, Gemini, and any tool that speaks the Model Context Protocol."

Core tenets:

  1. Plain markdown, full ownership — notes are .md files; version with git
  2. A graph, not a folder tree — links + inclusion hierarchy over directory structure
  3. Same files, two interfaces — human (editor + LSP) and AI (CLI + MCP) access the same Markdown
  4. Multiple parents — a "Meditation" note can belong to both "Health" and "Productivity" without duplication
  • Inclusion links — a link on its own line: "this topic includes that subtopic." Forms a navigable tree.
  • Cross-references — regular inline [[links]]: topic web of relationships.

Both types stored in .md files with no special metadata. IWE infers structure from link placement alone.

Performance Claim

"Fast. Built in Rust, processes 20,000 files in under a second."

02

Architecture

IWE — Architecture

Distribution

  • Homebrew: brew tap iwe-org/iwe && brew install iwe
  • Cargo: cargo install iwe iwes iwec
  • Crates.io: iwe, iwes, iwec

Four Binaries

Binary Role
iwe CLI for note operations (find, retrieve, tree, create, rename, delete, etc.)
iwes LSP server for VS Code, Neovim, Zed, Helix
iwec MCP server for AI agents (Claude, Cursor, Windsurf, etc.)
liwe Core Rust library (shared by all)

MCP Server Tools (iwec)

From crates/iwec/src/lib.rs: iwe_find, iwe_retrieve, iwe_tree, iwe_stats, iwe_squash, iwe_create, iwe_update, iwe_delete, iwe_rename, iwe_extract, iwe_inline, iwe_normalize, explore

Directory Structure

crates/
├── liwe/    # Core Rust library
├── iwe/     # CLI binary
├── iwes/    # LSP server
└── iwec/    # MCP server (rmcp)
docs/        # Documentation

State Files

  • ~/notes/ (configurable) — all Markdown files
  • .iwe marker file — identifies workspace root
  • config.toml — workspace configuration
  • No database; graph is computed from live Markdown files on demand

Required Runtime

None — statically linked Rust binary.

Target AI Tools

Claude Desktop, Claude Code, Cursor, Windsurf, Codex, and any MCP client (via iwec). Editor support via LSP: VS Code (extension), Neovim, Zed, Helix.

  • iwe-org/vscode-iwe — VS Code extension
  • iwe-org/iwe.nvim — Neovim plugin
  • iwe-org/zed-iwe — Zed extension
  • iwe-org/skills — agentic AI skills for knowledge graph management
03

Components

IWE — Components

MCP Tools (13, via iwec)

Tool Purpose
iwe_find Search notes with fuzzy matching
iwe_retrieve Get a note with children + parent context
iwe_tree Show hierarchy from any starting point
iwe_stats Graph statistics
iwe_squash Flatten a subtree into one document
iwe_create Create a note (accepts content from stdin)
iwe_update Update note content
iwe_delete Remove note and clean up references
iwe_rename Rename note; all links update automatically
iwe_extract Pull a section into its own note
iwe_inline Merge a linked note back into its parent
iwe_normalize Normalize documents, update link titles
explore Browse/explore knowledge graph

CLI Subcommands (iwe)

init, new, retrieve, find, count, normalize, tree, squash, export, schema, stats, rename, delete, extract, inline, update, attach, completions

LSP Features (iwes)

  • Search (by title or content)
  • Go-to-definition / find references (backlinks)
  • Hover preview (see link content inline)
  • Auto-complete (link suggestions)
  • Inlay hints (parent refs, link counts)
  • Extract (pull section → new note)
  • Inline (embed note content → parent)
  • Rename (files + all links update)
  • Format (normalize document)
  • Transform (pipe text through external commands)
  • Templates (daily notes, etc.)
  • Outline conversion (headers ↔ lists)

Hooks

None.

Skills, Commands, Subagents

None in this repo. The companion repo iwe-org/skills ships agentic AI skills for IWE knowledge graph management (separate repo, not analyzed here).

Scripts

None.

05

Prompts

IWE — Prompts

Prompt File 1: README AI Integration Section

Technique: Instructional documentation for how to prepare AI context using CLI tools.

# From README — "Example: preparing context for an AI conversation"
iwe find auth

iwe retrieve --key authentication --depth 2

iwe tree --key oauth

This is not a prompt file per se, but a documented pattern for agents to follow: find → retrieve with depth → use output as context. The README frames this as a workflow for "working with AI" — the CLI output becomes the AI's context.

Technique used: Tool composition documented as agent recipe; depth parameter controls context scope (shallow → focused, deep → comprehensive).

Prompt File 2: MCP Server Config

Technique: Tool description as constraint/guidance:

{
  "mcpServers": {
    "iwe": {
      "command": "iwec",
      "args": ["--project", "~/notes"]
    }
  }
}

The MCP tool descriptions (from iwe_retrieve, iwe_squash, etc.) function as the implicit prompt — iwe_squash description: "Flatten a subtree into one document" tells the agent exactly when to use it (before sending a large subtree as context).

Technique used: MCP tool descriptions as behavioral guides — iwe_retrieve's --depth parameter and iwe_squash's flattening behavior teach agents to balance context granularity.

No Claude Code Skill File

IWE does not ship a SKILL.md in this repo. The companion iwe-org/skills repo reportedly has AI skills for IWE but is a separate project.

09

Uniqueness

IWE — Uniqueness

Differs From Seeds

Closest seed: basic-memory — both use Markdown files as the source of truth with a knowledge graph accessible to AI agents via MCP. Key deltas: (1) IWE structures relationships through link placement only (inclusion = own line; cross-reference = inline), while basic-memory uses explicit observation syntax (- [category] text) and typed relation directives (- depends_on [[Entity]]). (2) IWE ships a full LSP server (iwes) for VS Code/Neovim/Zed/Helix; basic-memory has no LSP. (3) IWE is written in Rust (fast, zero-dep binary); basic-memory is Python (requires uv). (4) IWE has no database whatsoever — graph is computed from live files; basic-memory maintains a SQLite index. (5) IWE supports multiple parents for a single note without file duplication — basic-memory notes can be in one directory. Against ccmemory: IWE stores domain knowledge written by humans; ccmemory captures AI conversation history. They are complementary, not competing.

Positioning

"The knowledge graph that works equally well for humans and AI — same Markdown files, same links, two interfaces (LSP for editors, MCP for agents)." IWE is unique in this batch for its dual-interface design (human editors + AI agents on identical files simultaneously).

Observable Failure Modes

  1. No semantic search — base install has no embeddings; iwe_find is fuzzy text search only. Different-wording queries fail to retrieve.
  2. No hooks — IWE has no Claude Code lifecycle integration; agents must explicitly call MCP tools; no automatic context injection at session start.
  3. No session memory — IWE stores what you write, not what Claude said; conversation history must be captured by another system.
  4. Graph computation on demand — very large note repositories (100k+ files) may have slower iwe_retrieve --depth operations despite the Rust speed claim (20k files/sec for indexing; retrieval complexity depends on graph depth).
  5. No AI-specific capture — there is no mechanism for Claude to automatically write insights back to the knowledge graph; it must explicitly call iwe_create or iwe_update.
04

Workflow

IWE — Workflow

Phases

Phase What Happens Artifact
Install brew install iwe or cargo install iwe iwes iwec Three binaries available
Init cd ~/notes && iwe init .iwe marker file created
Editor Setup Configure VS Code/Neovim/Zed with iwes LSP IDE features active
AI Setup Configure MCP with iwec 13 tools available to AI agents
Write Human or AI creates/edits Markdown with inclusion links Notes in workspace
Query Agent calls iwe_find, iwe_retrieve, iwe_tree Graph navigation results
Refactor Agent or human calls iwe_rename, iwe_extract, iwe_inline Structure reorganized, all links updated

Context Preparation for AI

From README:

iwe find auth                          # find relevant notes
iwe retrieve --key authentication --depth 2   # get note + children
iwe tree --key oauth                   # see hierarchy

These CLI commands can be used in scripts to prepare context before an AI session.

Approval Gates

None — all operations are tool-driven.

Spec Format

None — IWE is a general knowledge graph, not a spec system.

No Hooks

IWE does not integrate with Claude Code's lifecycle hooks. The MCP connection is the only Claude Code integration.

06

Memory Context

IWE — Memory & Context

Memory Model

file-based — plain Markdown files are the sole store. No database, no SQLite, no vector index (base install). Graph structure is computed from live files on demand by the Rust engine.

Persistence Scope

global — a workspace is a directory of Markdown files accessible to both humans and AI at all times. Notes survive independently of any AI session.

Knowledge Graph Structure

IWE's graph is derived purely from Markdown file content:

  • Inclusion links — a [[link]] on its own line means "this topic includes that subtopic". Creates a parent-child tree.
  • Cross-references — a [[link]] inline means "related to". Creates lateral relationships.
  • Multiple parents — a note can appear as inclusion child of multiple parents simultaneously (no file duplication).

No frontmatter required. No observation syntax. No typed relationships. Structure emerges from link placement alone.

Context Compaction Handling

no — IWE has no Claude Code lifecycle hooks. No PreCompact awareness.

Cross-Session Handoffs

yes — Markdown files persist across sessions. The graph is always current because it's computed from live files. An AI agent querying iwe_retrieve --key auth --depth 2 tomorrow gets the same result as today (unless files changed).

The iwe_retrieve --depth Parameter

This is the primary context control mechanism:

  • --depth 1 — note + immediate children
  • --depth 2 — note + children + grandchildren
  • No depth — note only

Agents choose depth to balance context richness vs token budget.

The iwe_squash Tool

For sending a whole subtopic to AI: iwe_squash flattens a subtree into a single document. This is the "compress for context" operation — instead of sending 50 small notes, squash into one coherent document.

Search Mechanism

full-text — fuzzy text search via iwe_find. No vector embeddings in base install (the core Rust library has no embedding dependency). iwe_retrieve supports structured graph traversal by key.

State Files

  • ~/notes/*.md (configurable workspace) — all knowledge
  • .iwe — workspace marker
  • config.toml — workspace configuration

No Session Memory

IWE stores domain knowledge (what you wrote), not AI conversation history (what the AI said). It is a knowledge graph, not a session capture system. The distinction: ccmemory captures what Claude decided; IWE stores what you wrote about your domain.

07

Orchestration

IWE — Orchestration

Multi-Agent

No.

Orchestration Pattern

none.

Isolation Mechanism

none — all agents access the same Markdown directory.

Execution Mode

interactive-loop — MCP tools on demand; iwes watches files for changes.

Multi-Model

No — model-agnostic MCP + LSP servers.

Context Compaction Handling

no.

Auto Validators

None.

Prompt Chaining

No — each MCP tool call is independent.

08

Ui Cli Surface

IWE — UI & CLI Surface

CLI Binary

  • Name: iwe
  • Type: Own runtime (Rust), not a thin wrapper
  • Subcommands (18): init, new, retrieve, find, count, normalize, tree, squash, export, schema, stats, rename, delete, extract, inline, update, attach, completions

LSP Server (iwes)

Provides IDE-like features for any editor that supports LSP:

  • VS Code (via vscode-iwe extension at iwe-org/vscode-iwe)
  • Neovim (via iwe.nvim)
  • Zed (via zed-iwe)
  • Helix (built-in LSP support)

MCP Server (iwec)

Provides structured access to the knowledge graph for AI agents.

Local UI

None — no web dashboard or TUI. The "UI" is the editor with LSP features.

Observability

  • iwe stats — graph statistics (note count, link count, orphans)
  • iwe_stats MCP tool — same statistics for AI agents

Transport

stdio (MCP). LSP over stdio or TCP depending on editor config.

Community

  • Twitter/X: @iwe_md
  • Reddit: r/iwe
  • GitHub Discussions

Related frameworks

same archetype · same primary tool · same memory type

MemPalace ★ 53k

Verbatim local-first AI memory with 96.6% R@5 retrieval on LongMemEval using zero API calls — structured into a palace hierarchy…

Beads (Yegge) ★ 24k

Dolt-powered distributed graph issue tracker where AI agents track tasks with hierarchical IDs and dependency edges, claim work…

deepagents (LangChain) ★ 23k

Opinionated Python agent harness on top of LangGraph with sub-agents, filesystem, memory, and context compaction bundled in

agentmemory ★ 18k

Persistent, searchable memory for AI coding agents that captures every tool interaction, compresses it via LLM, and injects…

Open Multi-Agent ★ 6.3k

Give a natural-language goal to a coordinator agent and get a dynamically decomposed, parallelized task DAG executed by…

Basic Memory ★ 3.1k

Gives AI agents a persistent, human-readable knowledge graph of project decisions, observations, and relations stored as plain…