A fast, Rust-powered wiki toolkit for local-first Markdown knowledge bases. This monorepo ships:
@goodfoot/wiki— a standalone CLI for indexing, searching, linking, and rendering Markdown wikis- Wiki Viewer — a VS Code extension that renders wiki pages with live wikilink navigation
- Agent plugins — ready-to-install Claude Code and Codex plugins that teach coding agents to read and write the wiki
Documentation is stored as plain Markdown with [[wikilink]] references and optional frontmatter — nothing proprietary, no database you can't read.
npm install -g @goodfoot/wikiThe package ships prebuilt binaries for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64). A postinstall script links the correct platform binary into bin/wiki. See docs/cross-compilation.md for the target matrix and native dependency notes.
# Search the wiki with FTS5 full-text search (ranked, snippet-aware)
wiki search "authorization"
wiki "Example Article" # default: ranked title + summary lookup
# Resolve and print an article by title, alias, or path
wiki print "Authorization"
wiki print "Authorization#token-refresh" # fragment link to a heading
# Enumerate wikilinks, find stale or broken references
wiki links path/to/article.md
wiki check
wiki stale
# Render an article to HTML (standalone or for the extension webview)
wiki html "Authorization"
# Extract frontmatter, summaries, pinned articles, or headings
wiki extract ...
wiki summary "Authorization"
wiki pin list
wiki list
# Run as a long-lived server for editor integrations
wiki serve
# Run inside a git hook (indexes new/changed articles)
wiki hook post-commit
# Install the Codex integration (skill, PostToolUse hook, feature flag)
wiki install --codexwiki install --codex downloads the latest plugin assets from
goodfoot-io/wiki and installs them into
your Codex home (resolved from --codex-home, $CODEX_HOME, or ~/.codex). It
installs:
- The
wikiskill under$CODEX_HOME/skills/wiki/ - A managed
PostToolUsehook group in$CODEX_HOME/hooks.jsonthat runswiki hook --codex [features].codex_hooks = truein$CODEX_HOME/config.toml
Re-running the command updates the install in place: the managed skill
directory is replaced atomically, the managed hook group is upserted without
touching unrelated hook config, and codex_hooks is ensured. Backups of any
changed files are written under $CODEX_HOME/.wiki-install/backups/.
wiki install --codex # install or update from main
wiki install --codex --ref v1.0.2 # pin to a tag, branch, or SHA
wiki install --codex --codex-home ./codex # override the Codex home
wiki install --codex --dry-run # print planned changes, write nothing
wiki install --codex --force # overwrite unmanaged skill/hook conflicts
wiki install --claude # print friendly Claude Code setup instructionsThe command is fail-closed: if the download, archive validation, or existing
hooks.json/config.toml parse fails, no files are written.
Using Claude Code instead? Run wiki install --claude for a friendly,
copy-pasteable guide to adding the wiki plugin marketplace. That mode is
informational only — it never runs commands, fetches anything, or touches the
filesystem; you stay in control.
- Wikilink resolution —
[[Title]],[[Title#heading]],[[Title|alias]]resolved against titles, aliases, and file paths - FTS5 full-text search — powered by an embedded SQLite (turso) index with BM25 ranking and snippet extraction
- Fragment links — heading slugs are stable and addressable;
#headingfragments survive rename - Git-aware hooks —
wiki hookphases keep the index in lockstep with commits, merges, and rebases (WAL mode for concurrent access) - Frontmatter-driven — title, aliases, tags, and summaries read from YAML frontmatter
- Syntax highlighting — pure-Rust syntect + fancy-regex (no native C dependency)
- Fail-closed validation —
wiki checksurfaces broken links and missing targets as errors
Install Wiki Viewer from the VS Code Marketplace or Open VSIX. It registers as the default editor for **/wiki/**/*.md and **/*.wiki.md.
- Rendered Markdown webview with wikilink navigation, backlinks, and fragment support
- Ranked wiki search (
Shift+Cmd+L/wiki.search) - Seamless switch between rendered and source views (
wiki.openInEditor) - Configurable via
wiki.openFilesInViewer - Syntax-highlighted code blocks, morphdom-powered incremental updates
.
├── packages/
│ ├── cli/ # @goodfoot/wiki — Rust CLI (Cargo workspace root)
│ └── extension/ # Wiki Viewer VS Code extension (TypeScript)
├── npm/
│ └── wiki-*/ # Platform-specific binary distribution packages
├── plugins/
│ └── wiki/ # Agent plugin: hooks + skills (see below)
├── examples/
│ └── githooks/ # Sample post-commit / post-merge hooks for Claude, Codex, Gemini
├── docs/
│ └── cross-compilation.md
└── scripts/
├── sync-versions.sh
├── validate.sh
└── release.sh
The Rust CLI lives in packages/cli/; packages/cli/package.json is the single source of truth for the version (propagated by scripts/sync-versions.sh). The VS Code extension is a standard TypeScript package built with esbuild and packaged via vsce.
The plugins/wiki/ directory is a shared plugin distributed through both the Claude Code and Codex plugin marketplaces. It provides:
- Hooks —
post-commit/post-mergehandlers that keep the wiki index synchronized after agent-driven commits - Skills — a
wikiskill that teaches agents how to query and author wiki articles using the CLI, including[[wikilink]]conventions and frontmatter rules
Install via the marketplace integration in Claude Code or Codex, or copy examples/githooks/*.sh into .git/hooks/ for a minimal manual setup. See examples/githooks/README.md for the manual install instructions.
# Clone and install JavaScript workspace deps
git clone https://github.com/goodfoot-io/wiki.git
cd wiki
yarn install
# Build everything (Rust CLI + VS Code extension)
yarn build
# Run full validation: typecheck, lint, test, build (all packages)
yarn validatePer-package validation runs from each package directory with its own yarn lint, yarn typecheck, and yarn test scripts. The Rust CLI uses dedicated CARGO_TARGET_DIR paths (target/lint, target/test, target/typecheck, target/build) so concurrent cargo commands don't contend on a shared lock. See CLAUDE.md and AGENTS.md for contributor conventions.
Releases are tag-driven:
wiki-v*triggers.github/workflows/release-cli.yml, which publishes the CLI first and then invokes.github/workflows/release-extension.ymlto package and publish the extension from the same tag
MIT — Copyright (c) 2026 Goodfoot Media LLC. See LICENSE.