Generated banner for IWE: a Markdown knowledge base you and your AI agent work on together
Generated logo for IWE: a Markdown knowledge base you and your AI agent work on together

IWE: a Markdown knowledge base you and your AI agent work on together

Memory serverOfficial IWE project

Created by IWE

Published in iwe-org/iwe. Publisher page

1,821 GitHub stars

What it is

Markdown knowledge graph — LSP for your editor, CLI + MCP memory for your AI agents
— the description by IWE

AutoGineer overview, from the brain’s own files

IWE provides a shared workspace for humans and AI agents to collaborate on project documentation, specs, and decision logs. By treating a folder of Markdown files as a structured knowledge graph, it allows agents to read, write, and organize information that persists across sessions. It functions as a memory server via the Model Context Protocol (MCP), enabling compatibility with various AI agents while remaining accessible to users through a native Mac app, CLI, or standard text editors like Neovim and VS Code.

How it works

Memory model: Not stated

AutoGineer overview, from the brain’s own files

IWE organizes notes as a collection of Markdown files within a project folder. It uses a CLI and an MCP server to expose these files to AI agents, allowing them to perform operations like searching, creating, and updating notes. The system supports features such as backlinks, link autocomplete, and graph visualization, ensuring that both the user and the AI agent interact with the same underlying document structure.

Folders
FolderRoleFiles
.githubagent-config4
docsdocs70
.githooksfolder1
cratesfolder381
npmfolder15

Requirements

Runtimes: Rust

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. This brain runs code automatically: 1 script. Review .githooks/pre-commit before opening the folder in Claude Code. No step below turns a hook on for you.

    • .githooks/pre-commit: runs on git pre-commit
  2. Not scanned by AutoGineerAutoGineer could not scan everything it runs. https://www.npmjs.com/package/@iwe-org/mcp
  3. Created by IWE. Published in iwe-org/iwe. Licence: Apache License 2.0.

Usage

AutoGineer overview, from the brain’s own files

  • Connect an AI agent to your project notes using the MCP server.
  • Use the CLI to search, create, or reorganize notes from the terminal.
  • Write and browse notes in the native Mac app while an agent works alongside you.
  • Integrate note navigation and autocomplete into your preferred text editor.
  • Maintain a persistent record of project decisions and lessons learned that both you and your agent can access.
“Explore my IWE notes and summarize what's here.”
The agent reads the Markdown files in the designated folder and provides a summary of the project context, decisions, or documentation found.
“Save the decision we just made about the database schema.”
The agent creates or updates a Markdown note in the IWE folder containing the details of the decision for future reference.

Documentation by IWE

IWE: a Markdown knowledge base you and your AI agent work on together

English · 简体中文 · 한국어

Your notes are your agent’s memory. IWE is where you work on them together.

iwe.md · Download for Mac · Docs · Reddit

Image: Crates.io Image: License Image: Documentation

Too many AI conversations start from zero. You explain your project, your decisions, your reasoning — then find yourself explaining it all again next session. Your own notes live somewhere else, out of the agent's reach.

Or worse, the agent “remembers” something in its own internal memory, but you can't easily see what it saved or correct what it got wrong. And that memory doesn't travel with you to the other agents you work with.

IWE gives you and your AI agents one shared place to work, right inside your project: a folder of connected Markdown documents — specs, plans, decisions, and more. Keep your own ideas there, ask your agent to save what you learn together, and return to that context as your work grows. You can read, edit, and organize those documents yourself — and they stay yours.

<br/> <p align="center"> <a href="https://www.youtube.com/watch?v=D58bPkOvbxE"> <img src="https://iwe.md/images/video-thumbnail.jpg" alt="Watch the IWE intro video on YouTube" width="600"> </a> </p> <br/>

Choose how you work

There are four ways to work with IWE. Mix and match them to fit your day:

ToolHow you'll use it
iWe for MacWrite and browse in a native app, and connect your existing Claude/Codex agent.
Your own editorStay in Neovim, Helix, VS Code, or Zed, with note navigation, backlinks, and autocomplete.
CLISearch and manage your notes from the terminal or scripts.
Claude/CodexLet your agent read, write, and organize memory while you work through conversation.

All four work with the same Markdown documents. Draft a spec in your editor, develop it with Claude/Codex, browse it in the iWe app, or search it from the CLI. Use any combination you like; each tool also works independently.

Bring your own AI. Neither the IWE CLI nor the iWe Mac app includes an AI model. Both work on their own as tools for your notes. When you want AI help, use your existing Claude/Codex agent — in terminal or directly in the Mac app.

<a href="https://iwe.md/?ref=readme-shot"><img src="https://iwe.md/images/app/GH-screen-1.1.png" alt="iWe for Mac showing project plans and connected documents" width="820"></a>

<p> <a href="https://iwe.md/?ref=readme-shot"><img src="https://iwe.md/images/app/GH-screen-2.png" alt="Bug tracking with charts" width="32%"></a> <a href="https://iwe.md/?ref=readme-shot"><img src="https://iwe.md/images/app/GH-screen-3.png" alt="Technical documents with code" width="32%"></a> <a href="https://iwe.md/?ref=readme-shot"><img src="https://iwe.md/images/app/GH-screen-4.png" alt="Release documents" width="32%"></a> </p>

Plans · Charts · Technical documents · Releases — click a screenshot to see the iWe app in action on iwe.md.

Why IWE

  • Shared context. Your agent can use the same notes you write for yourself. Notes link to each other, and one note can belong to several topics, so you can follow an idea wherever it connects.

  • Memory you can read. Decisions and lessons saved by your agent are ordinary notes you can browse, correct, or delete.

  • Your notes stay yours. Everything is Markdown in a folder on your machine. Back it up, sync it, or keep it in git. You don't need an IWE cloud account to keep your notes; connecting an AI agent involves that agent's own setup and account requirements.

See it working on iwe.md →

iWe for Mac

If you'd like a dedicated space for your notes, use the native Mac app. Open a folder of notes and you get a fast, keyboard-friendly space to write and browse. You can also connect your existing Claude/Codex agent to work alongside you.

  • Works with your Claude/Codex agent. Connect the agent you already use, ask questions about your notes, and have it draft or reorganize them. Watch its edits appear in the document as it works.

  • Room to experiment. Each agent run is one undo step — try an idea, and roll it back if you don't like it.

  • Follow your ideas. Jump between related notes, search in a few keystrokes, and view Mermaid diagrams right in your documents. Your editor and other tools can keep working on the same files.

See iWe for Mac on iwe.md →

Open a notes folder and start with a note about something you're working on. Once Claude/Codex is connected, try asking it to summarize that note or help you develop an idea.

Your Own Editor

Keep writing in Neovim, Helix, VS Code, or Zed. IWE adds link autocomplete, backlinks, search, and safe renaming across your notes.

Follow the guide for your editor, open your notes folder, and try linking two notes with autocomplete. You can use IWE for your own writing without connecting an AI agent.

CLI

Prefer the terminal? Use IWE to search, create, and reorganize notes, or work it into your scripts. The CLI has no AI built in: these commands work on their own. Your existing Claude/Codex agent can use IWE's tools too.

Install with Homebrew, or choose another option from the installation guide:

brew install iwe-org/iwe/iwe

Then run these commands inside your notes folder:

iwe init
iwe find
iwe find --lexical "project decisions"

iwe find lists your notes; --lexical searches their content. Explore more in the CLI reference and workflow examples.

Claude/Codex

You can use IWE entirely through your agent. Ask Claude/Codex to save decisions, look up past work, and organize what you've learned. The agent works with your notes through IWE, and you can open those files yourself whenever you want.

IWE isn't tied to one AI. The same notes work with Claude Code, Claude Desktop, Codex, Gemini, Cursor, and any tool that supports the Model Context Protocol.

Give Claude/Codex a memory — for Claude Code, install the plugin, then run /iwe:init in any project you want remembered. For Codex, follow the agent connection steps below.

/plugin marketplace add iwe-org/skills
/plugin install iwe@iwe-org
/iwe:init

Then ask it to save a decision from your current work, and open the note it creates in your project.

Connect another agent — with Homebrew installed, install IWE:

brew install iwe-org/iwe/iwe

Run iwe init in your notes folder, then follow the agent connection guide to add the iwec MCP server with that folder as its working directory. For other installation options, see the installation guide.

Once connected, ask your agent: “Explore my IWE notes and summarize what's here.”

Or let the agent set itself up — paste this into any agent that can run commands:

Set up IWE for my notes: install it (brew install iwe-org/iwe/iwe,
npm install -g @iwe-org/iwe, or cargo install iwe iwes iwec), run `iwe init`
in my notes directory, then add the `iwec` MCP server with its working
directory set to that folder.
Docs: https://iwe.md/docs/agentic/

Learn More

Ready-made workspaces: dev-workspace — project memory for a coding agent · marketing-workspace — campaign memory for a marketing agent.

Get Involved

Trying IWE with your own notes? Tell us what felt useful and where you got stuck. Questions, rough edges, and examples of how you use it are all welcome in Discussions.

IWE is open source. You can also report a bug or help improve the documentation.

Community: Twitter/X · Reddit · Discussions

Building on IWE? The CLI and MCP server are the supported ways to integrate today. Tell us what you depend on so we know what not to break.

License

Apache License 2.0

docs/feature-extract.md

Extract Actions

Extract actions enable the creation of new documents from markdown sections (headers). IWE provides two types of extract actions:

  1. Extract - Extracts a single section into a new file

  2. Extract All - Extracts all direct subsections of a section into separate files

Both operations:

  • Create new files containing the selected content

  • Add Inclusion Links (like [Section Title](new-file)) to the newly created files

  • Automatically adjust header levels to maintain proper document structure

  • Support relative path preservation

The reverse operation, known as inline, allows you to:

  1. Embed the content back into the document via the inclusion link

  2. Remove the link and the extracted file

Extract Single Section

Basic Configuration

The extract action is configured in .iwe/config.toml under the [actions] section:

[actions]
extract = { type = "extract", title = "Extract section", key_template = "{{id}}", link_type = "markdown" }
Configuration Options
  • type: Must be "extract" for single section extraction

  • title: Display name shown in editor's code actions menu

  • key_template: Template for generating the new file's key/name (see Template Variables below)

  • link_type: Optional link format - "markdown" for [text](key) or "wiki" for [[key]]

Example: Basic Section Extraction

Source document (document.md):

# Main Document

## Important Section

This content will be extracted.

### Subsection

More content here.

After extraction (document.md):

# Main Document

[Important Section](extracted-123)

Extracted file (extracted-123.md):

# Important Section

This content will be extracted.

## Subsection

More content here.

Extract All Subsections

Configuration
[actions]
extract_all = { type = "extract_all", title = "Extract all subsections", key_template = "{{title}}", link_type = "markdown" }
Configuration Options
  • type: Must be "extract_all" for extracting all subsections

  • title: Display name shown in editor's code actions menu

  • key_template: Template for generating new file keys/names

  • link_type: Optional link format - "markdown" for [text](key) or "wiki" for [[key]]

Example: Extract All Subsections

Source document (guide.md):

# User Guide

Introduction content here.

## Installation

How to install the software.

## Configuration

How to configure settings.

## Usage

How to use the application.

After extract all (guide.md):

# User Guide

Introduction content here.

[Installation](Installation)

[Configuration](Configuration)

[Usage](Usage)

Extracted files:

Installation.md:

# Installation

How to install the software.

Configuration.md:

# Configuration

How to configure settings.

Usage.md:

# Usage

How to use the application.

Template Variables

The key_template supports several template variables for flexible file naming:

Basic Variables
  • {{id}}: Random unique identifier (e.g., 123, 456)

  • {{today}}: Current date formatted using date_format from [workspace] section (default: %Y-%m-%d)

  • {{title}}: The section title being extracted (automatically sanitized for filenames)

  • {{slug}}: URL-friendly version of the title (lowercase, alphanumeric characters only, non-alphanumeric replaced with dashes, no consecutive dashes)

Parent Section Variables
  • {{parent.title}}: Title of the parent section containing the extracted section

  • {{parent.slug}}: URL-friendly version of the parent section title (lowercase, alphanumeric characters only, non-alphanumeric replaced with dashes, no consecutive dashes)

  • {{parent.key}}: Key of the parent document

Source Document Variables
  • {{source.key}}: Full key of the source document

  • {{source.file}}: Filename portion of the source document key

  • {{source.title}}: Title (first header) of the source document

  • {{source.slug}}: URL-friendly version of the source document title (lowercase, alphanumeric characters only, non-alphanumeric replaced with dashes, no consecutive dashes)

  • {{source.path}}: Directory path of the source document

Relative Path Behavior

IWE preserves directory structure when extracting sections. The key generation follows these rules:

  1. Generated keys are relative to the source document's directory

  2. Key::combine(&key.parent(), &relative_key) creates the final path

  3. The parent directory is automatically preserved

Example: Relative Path Extraction

Source document (docs/tutorial/basics.md):

# Basic Tutorial

## Getting Started

Content to extract.

Configuration:

extract = { type = "extract", title = "Extract", key_template = "extracted-{{title}}" }

Result:

  • Source: docs/tutorial/basics.md

  • Extracted file: docs/tutorial/extracted-Getting Started.md

  • Link: [Getting Started](extracted-Getting Started)

The extracted file is created in the same directory (docs/tutorial/) as the source document.

Advanced Configuration Examples

1. Simple Numeric Keys
extract = { type = "extract", title = "Extract", key_template = "{{id}}" }

Creates files like: 123.md, 456.md

2. Date-based Extraction
extract = { type = "extract", title = "Extract to today", key_template = "{{today}}" }

Creates files like: 2024-01-15.md

3. Title-based Extraction
extract = { type = "extract", title = "Extract section", key_template = "{{title}}" }

Creates files like: Getting Started.md, Configuration.md

4. Slug-based Extraction (URL-friendly)
extract = { type = "extract", title = "Extract as slug", key_template = "{{slug}}" }

Creates files like: getting-started.md, configuration.md From titles like "Getting Started", "User's Guide/Setup", "API*Reference" → getting-started.md, users-guide-setup.md, api-reference.md

5. Hierarchical Extraction
extract = { type = "extract", title = "Extract with context", key_template = "{{parent.title}}-{{title}}" }

From a document with structure:

# User Guide
## Installation

Creates: User Guide-Installation.md

6. Hierarchical Extraction (URL-friendly)
extract = { type = "extract", title = "Extract with slug context", key_template = "{{parent.slug}}-{{slug}}" }

From a document with structure:

# User Guide & Setup
## Installation/Configuration

Creates: user-guide-setup-installation-configuration.md

7. Source-aware Extraction
extract = { type = "extract", title = "Extract from source", key_template = "{{source.file}}-{{title}}" }

From user-guide.md:

## Installation

Creates: user-guide-Installation.md

8. Source-aware Extraction (URL-friendly)
extract = { type = "extract", title = "Extract with source slug", key_template = "{{source.slug}}-{{slug}}" }

From User Guide & Manual.md:

# User Guide & Manual
## Installation/Setup

Creates: user-guide-manual-installation-setup.md

9. Path-based Organization
extract = { type = "extract", title = "Extract to subfolder", key_template = "extracted/{{title}}" }

From docs/guide.md, creates: docs/extracted/Installation.md

extract = { type = "extract", title = "Extract (wiki)", key_template = "{{id}}", link_type = "wiki" }

Creates links like: [[123]] instead of [Section Title](123)

11. Complex Template Example
extract = { type = "extract", title = "Extract with full context", key_template = "{{source.path}}/{{today}}-{{parent.title}}-{{title}}" }

From docs/tutorials/advanced.md on 2024-01-15:

# Advanced Tutorial
## Complex Features

Creates: docs/tutorials/2024-01-15-Advanced Tutorial-Complex Features.md

Key Collision Handling

When the generated key already exists, IWE automatically appends numeric suffixes:

  1. First attempt: extracted-section.md

  2. If exists: extracted-section-1.md

  3. If exists: extracted-section-2.md

  4. And so on...

Example: Handling Collisions

Multiple sections with same title:

# Document

## Section
Content 1

## Section
Content 2

## Section
Content 3

With key_template = "{{title}}", extract all creates:

  • Section.md (first section)

  • Section-1.md (second section)

  • Section-2.md (third section)

Date Formatting

The {{today}} variable uses the date_format setting from the [workspace] section:

[workspace]
date_format = "%Y-%m-%d"  # Results in: 2024-01-15

[actions]
extract = { type = "extract", title = "Daily extract", key_template = "{{today}}-{{title}}" }

Common date formats:

  • %Y-%m-%d: 2024-01-15

  • %Y%m%d: 20240115

  • %b %d, %Y: Jan 15, 2024

  • %A, %B %d, %Y: Monday, January 15, 2024

Filename Sanitization

Special characters in titles are automatically sanitized using the sanitize_filename crate:

  • Section/With*Special:Chars → SectionWithSpecialChars

  • "Quoted Section" → Quoted Section

  • Section | With | Pipes → Section With Pipes

Command Line Usage

You can also extract sections using the CLI:

# List all sections with block numbers
iwe extract my-document --list

# Extract section by title
iwe extract my-document --section "Architecture"

# Extract section by block number
iwe extract my-document --block 2

# Preview changes
iwe extract my-document --section "Design" --dry-run

See IWE Extract for full documentation.

485 files · 414 not served here

Advantages

  • Shared context allows agents to access and build upon the same notes written by the user. evidence: README.md
  • Memory is stored as human-readable Markdown files that can be easily browsed, corrected, or deleted. evidence: README.md
  • Data remains under user control in local folders, avoiding dependency on proprietary cloud storage. evidence: README.md

Limitations

  • Requires manual setup of the MCP server or CLI tools to enable agent connectivity. evidence: README.md
  • The system does not include an AI model, requiring the user to bring their own agent. evidence: README.md

Security

Risk level: Low risk

This brain runs

Git hooks (1)

  • .githooks/pre-commit (pre-commit): runs on git pre-commit
  • Low risk: scripts-present (.githooks/pre-commit)

Attribution and licence

Created by
IWE
Publisher
IWE (Official IWE project)
Source
iwe-org/iwe · commit b733afe
Licence
Apache License 2.0 (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by IWE.

Install from source

414 of its files are not served here, so there is no ZIP. iwe-org/iwe at b733afe