Skip to content

claude-code-best/claude-wiki

 
 

Repository files navigation

Claude Code Wiki

A CLI that uses Claude Code via the Agent Communication Protocol (ACP) to generate and maintain documentation wikis for codebases. It connects to Claude Code through ccb --acp, can ingest local knowledge sources through built-in connectors, and synthesizes them into a structured wiki.

Claude Code Wiki terminal screenshot

Install

npm install -g claude-code-wiki

On Windows, prefer installing with Node.js package managers such as npm or pnpm:

npm install -g claude-code-wiki
# or
pnpm add -g claude-code-wiki

Prerequisites

Claude Code Wiki uses the ACP provider which connects to Claude Code via ccb --acp. Make sure Claude Code is installed:

git clone https://github.com/claude-code-best/claude-code
cd claude-code
npm install && npm run build && npm link

You may also need an Anthropic API key configured for Claude Code — see the documentation for details.

By default, the ACP provider is used. You can explicitly set it:

export CLAUDE_WIKI_PROVIDER=acp
# Optional: customize the ACP agent command
export CLAUDE_WIKI_ACP_COMMAND="ccb --acp"

Configuration is saved to ~/.claude-wiki/.env on your local machine.

Quick Start

Two modes are available:

  • Code mode — builds repository documentation in claude-wiki/ for the current codebase.
  • Personal mode — builds a local personal brain wiki in ~/.claude-wiki/wiki from configured sources like local repositories, Gmail, Notion, Web Search, Hacker News, and X/Twitter.
# Initialize repository documentation
claude-wiki --init

# Initialize personal brain wiki
claude-wiki personal --init

Bare claude-wiki --init and claude-wiki --update run in code mode by default.

Usage

# Interactive chat for the current repository
claude-wiki

# Interactive personal brain
claude-wiki personal

# Send a message directly
claude-wiki "Generate documentation for this repository"

# Run once and exit (prints final output)
claude-wiki -p "Summarize the key concepts"
claude-wiki --print "What connector tools are available?"

# Update repository docs
claude-wiki --update

# Update personal brain (including connector ingestion)
claude-wiki personal --update "Refresh the wiki from configured connectors"

# Show help
claude-wiki --help

Bare claude-wiki runs in code mode. Use claude-wiki personal for the local general-purpose wiki. The CLI stays open after each run by default. Use -p/--print for a one-shot non-interactive run.

Repository documentation

On each code run, Claude Code Wiki maintains both AGENTS.md and CLAUDE.md at the repository root. Each file is created if it does not exist; if already present, only the <!-- CLAUDE_WIKI:START -->…<!-- CLAUDE_WIKI:END --> block is rewritten, leaving your content untouched.

Repository-specific wiki instructions are stored in claude-wiki/INSTRUCTIONS.md. This file is user-authored — Claude Code Wiki reads it for scope and priorities but does not overwrite it during normal runs.

CI Workflows

Add a CI workflow to automatically keep documentation up-to-date:

For repository documentation in CI, use claude-wiki code --update --print. --update will create the initial docs if they don't exist yet.

Scheduled/CI runs send anonymous reliability telemetry. Set CLAUDE_WIKI_TELEMETRY_DISABLED=1 to disable.

Open Knowledge Format

Claude Code Wiki emits Google Open Knowledge Format (OKF) v0.1 bundles in both code and personal modes.

  • Every non-reserved Markdown concept has YAML front matter with a non-empty type.
  • Valid timestamp values and producer-defined extension fields are accepted and preserved during updates.
  • index.md and log.md are reserved documents rather than concepts.
  • Standard Markdown links between concept documents express relationships.

Local Connectors

Claude Code Wiki's first-run onboarding offers connector setup for local Git repositories, Notion, Gmail, X/Twitter, Web Search, and Hacker News. During ingestion, connector tools write raw data under ~/.claude-wiki/connectors/<connector>/raw/, then the agent synthesizes the wiki under ~/.claude-wiki/wiki/.

You can configure the same connector more than once (e.g. two Web Search sources for different topics). Run all instances with claude-wiki ingest all, one connector with claude-wiki ingest web-search, or one instance with claude-wiki ingest web-search-2.

Connector Description
git-repo Reads configured local repository paths and writes compact manifests.
notion Uses the Notion MCP server for read-only search and retrieval from configured pages.
gmail Fetches recent mail from the Gmail API using the configured query (defaults to newer_than:1d).
x Uses the X API with OAuth user-context credentials for home timeline, posts, mentions, bookmarks, and lists.
web-search Uses Tavily free API (1000 queries/month) directly — no LangChain wrapper dependency. Requires TAVILY_API_KEY.
hackernews Fetches configured public HN feeds and Algolia search queries.
slack Uses Slack's user-token API for self-message search and recent conversation ingestion.

Connector authentication

claude-wiki auth slack
claude-wiki auth gmail
claude-wiki auth notion
claude-wiki auth x

Start an ngrok tunnel for Slack OAuth:

claude-wiki ngrok start

For custom ngrok domain:

claude-wiki ngrok start https://<your-ngrok-domain>

Monitoring (Langfuse)

Claude Code (ccb --acp) has native Langfuse monitoring built in. To enable it, set the following environment variables:

export LANGFUSE_PUBLIC_KEY="pk-xxx"
export LANGFUSE_SECRET_KEY="sk-xxx"
export LANGFUSE_BASE_URL="https://cloud.langfuse.com"

Or configure via .claude/settings.json (recommended — persists across sessions):

{
  "env": {
    "LANGFUSE_PUBLIC_KEY": "pk-xxx",
    "LANGFUSE_SECRET_KEY": "sk-xxx",
    "LANGFUSE_BASE_URL": "https://cloud.langfuse.com"
  }
}

Optional parameters:

Variable Default Description
LANGFUSE_TRACING_ENVIRONMENT development Environment label
LANGFUSE_FLUSH_AT 20 Batch span count threshold
LANGFUSE_FLUSH_INTERVAL 10 Flush interval (seconds)
LANGFUSE_EXPORT_MODE batched batched or immediate
LANGFUSE_TIMEOUT 5 Request timeout (seconds)

Langfuse traces include agent runs, LLM calls, tool executions, and are automatically sanitized (no sensitive data is sent). See the ccb Langfuse docs for details.

Note: the original LangSmith telemetry has been removed in favor of ccb's native Langfuse integration.

Contributing

Development

# Clone and install
git clone https://github.com/<your-org>/claude-code-wiki
cd claude-code-wiki
pnpm install

# Run locally
pnpm dev

# Build
pnpm build

# Run tests
pnpm test

# Type check
pnpm typecheck

# Lint
pnpm lint

Requirements

About

A CLI that uses Claude Code via the Agent Communication Protocol (ACP) to generate and maintain documentation wikis for codebases.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages