Skip to content

Repository files navigation

btw-wiki

btw-wiki — ask Claude, keep the answer, build a wiki that compounds

Ask Claude. Keep the answer. Build a wiki that compounds.

A Claude Code plugin that turns useful answers and raw notes into a local, interlinked knowledge base. Each project gets its own .wiki/ folder, and your knowledge becomes more useful every time you ask, save, or browse.

CI   License: MIT

Quick start · Commands · Notebook · Storage · Documentation

A tour of the btw-wiki notebook — Contents, a page with backlinks, the graph view, the Ask panel, and saving an answer back into the wiki

What btw-wiki does

  1. Ask a question. Claude checks your project's wiki first and marks its coverage as Covered, Partial, or Missing.
  2. Save only what is new. When the wiki falls short, Claude separates the new material from the existing knowledge and asks before recording it.
  3. Build connections. Saved answers and imported notes become Markdown pages joined by [[wiki-links]], backlinks, a table of contents, and a history log.
  4. Browse and learn. Open the notebook to search, explore the knowledge graph, ask grounded questions, or generate a learning path through your pages.

The wiki files stay local to the project. The notebook reuses your existing Codex or Claude login, so there is no separate API key.

Quick start

1. Install

Run these commands in Claude Code:

/plugin marketplace add Punpun1643/btw-wiki
/plugin install btw-wiki@btw-wiki

2. Ask and save

/btw-wiki:ask what is a vector database and when should I use one?

Claude answers immediately. If the answer contains knowledge that is not already in your wiki, reply save to record the new part. The first save creates the .wiki/ folder.

3. Add existing notes (optional)

Put notes, papers, or transcripts in .wiki/raw/, then run:

/btw-wiki:ingest

4. Open the notebook

/btw-wiki:notebook

The notebook requires Node.js. Its Ask and Learn features use either the codex or claude CLI from your PATH, reusing the provider's existing login.

Commands

Command Use it when you want to…
/btw-wiki:ask <question> Answer from the wiki first, fill any gaps, and optionally save what is new.
/btw-wiki:ingest [file] Turn files in .wiki/raw/ into linked wiki pages. Omit the filename to process all new files.
/btw-wiki:notebook Open the local browser interface for the current project's wiki.

Notebook

The notebook is a dependency-free local reader over your live .wiki/. It lets you:

  • browse pages by topic or recent update;
  • search titles and page contents;
  • follow [[wiki-links]] and backlinks;
  • explore a force-directed knowledge graph;
  • ask questions with clickable wiki citations, then save new material explicitly — the reader reports back which pages it created and which it updated;
  • create resumable learning paths; and
  • choose Auto, Codex, or Claude as the local model provider; and
  • choose from 14 palettes, light or dark mode, and 11 reading fonts.

See the Notebook guide for screenshots, shortcuts, and a feature-by-feature tour.

What it creates

On the first save, btw-wiki creates a per-project knowledge base:

.wiki/
├── CLAUDE.md        # conventions for maintaining the wiki
├── index.md         # table of contents
├── log.md           # append-only operation history
├── raw/             # optional immutable source documents
└── <topic>/
    └── <page>.md    # one concept per Markdown page

In a Git project, btw-wiki also adds .wiki/ to .gitignore, so the knowledge base stays out of commits by default. Raw documents are cited but never modified. The Markdown pages and [[wiki-links]] also work well in Obsidian.

Notebook preferences and learning progress live under ~/.config/btw-wiki/ (or $XDG_CONFIG_HOME/btw-wiki/), not in the project.

Documentation

Guide Covers
Notebook guide Browsing, search, backlinks, graph view, Ask, Learn, appearance, and shortcuts.
Architecture Runtime flow, local APIs, persistence, and repository layout.
Contributing Local setup, build and test commands, releases, and publishing.

License

MIT © Papattarada Apithanangsiri

About

A coding agent plugin that turns useful answers and raw notes into a local, interlinked knowledge base

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages