Skip to main content

CLI tools to read and manage LLM Wiki projects on GitHub

Project description

wiki-tools

CLI tools to read and manage LLM Wiki projects on GitHub.

Two commands:

  • wiki-read — read wiki pages from GitHub. Used by Claude Code agents during development.
  • wiki-manage — generate, update, and lint the wiki. Used in the wiki repo.

No MCP server. No extra infrastructure. Just Python + GitHub API.


How it works

local disk                        GitHub
──────────────────────────────    ──────────────────────
wiki-repo/
  raw/       ──── wiki-manage ──► wiki-repo/wiki/
  updates/        generate
                  update
                                  wiki-read ◄─── Claude Code
                                  (any project repo)
  • raw/ and updates/ live locally — never pushed to GitHub
  • wiki/ lives on GitHub — the permanent, versioned knowledge base
  • wiki-read reads from GitHub and is available in any project repo
  • wiki-manage reads locally and writes to GitHub, used only in the wiki repo

Install

pip install wiki-tools

Or directly from GitHub:

pip install git+https://github.com/YOUR_USERNAME/wiki-tools.git

Requirements

Python 3.10+

GitHub token — create one at https://github.com/settings/tokens with repo scope, then add it to your shell profile:

# ~/.zshrc or ~/.bashrc
export GITHUB_TOKEN=ghp_yourtoken

Repository structure

Wiki repo — where the wiki lives

wiki-my-project/          ← cloned locally
  .project                ← includes wiki_local_path
  raw/                    ← original documents (local only, not on GitHub)
  updates/                ← new documents to ingest (local only, not on GitHub)
  CLAUDE.md
github: username/wiki-my-project
  wiki/                   ← generated markdown pages (GitHub only)

.gitignore in the wiki repo:

raw/
updates/

Project repo — where you write code

my-project/
  .project                ← wiki_repo only, no wiki_local_path needed
  CLAUDE.md
  src/

.project format

In the wiki repo — needs both wiki_repo and wiki_local_path:

{
  "project_id": "my-project",
  "wiki_repo": "username/wiki-my-project",
  "wiki_local_path": "/Users/yourname/projects/wiki-my-project"
}

In the project repo — only needs wiki_repo:

{
  "project_id": "my-project",
  "wiki_repo": "username/wiki-my-project"
}

The tools walk up from the current directory to find .project, so they work from any subdirectory.


Commands

wiki-read

wiki-read index              # read a page (with or without .md)
wiki-read architecture
wiki-read --list             # list all wiki pages
wiki-read --search "auth"   # full-text search across pages
wiki-read --info             # show current project, repo, and local path

Reads from GitHub. Works in any repo that has a .project file.

wiki-manage

wiki-manage status             # show file counts for raw/ (local), updates/ (local), wiki/ (github)
wiki-manage generate           # read local raw/, generate wiki pages on GitHub
wiki-manage update             # read local updates/, update wiki on GitHub, move files to raw/
wiki-manage delete <page>      # delete a wiki page from GitHub
wiki-manage lint               # check for broken links, orphan pages, missing required pages

Reads from local disk, writes to GitHub. Requires wiki_local_path in .project.

Note on deletions: updating a document in updates/ automatically removes sections that no longer exist — Claude rewrites the affected pages based on the new content. Use wiki-manage delete only when an entire page becomes obsolete.


Workflows

Generate wiki from scratch

  1. Put your documents in raw/ locally
  2. Open Claude Code in the wiki repo
  3. Tell Claude: "Generate the wiki from raw/ using wiki-manage generate"

Claude runs wiki-manage generate, reads the raw files, generates wiki pages, and writes them to GitHub.

Ingest new documents

  1. Put new documents in updates/ locally
  2. Open Claude Code in the wiki repo
  3. Tell Claude: "Update the wiki with the new documents in updates/"

Claude runs wiki-manage update, reads the updates, updates the relevant wiki pages on GitHub, updates changelog.md, then moves the files from updates/ to raw/ locally.

Lint

Tell Claude: "Run a lint on the wiki and fix any issues"

Claude runs wiki-manage lint and fixes broken links, orphan pages, and missing required pages.

Read wiki during development

In any project repo, Claude Code agents can read the wiki via bash:

wiki-read index
wiki-read decisions
wiki-read --search "payment"

Required wiki pages

Only two pages are always required:

Page Content
index.md Entry point — links to every other page
changelog.md Chronological log of every wiki update

All other pages are dynamic and determined by the project content. index.md is the source of truth for which pages exist.


CLAUDE.md

Add this to the CLAUDE.md in every repo to tell Claude which tools are available and how to use them.

Wiki repo:

## Wiki tools

Read the wiki:
  wiki-read <page>
  wiki-read --list
  wiki-read --search <query>

Manage the wiki (requires wiki_local_path in .project):
  wiki-manage status
  wiki-manage generate
  wiki-manage update
  wiki-manage lint

Always start with `wiki-read index` to orient yourself.
After every update, add an entry to changelog.md.

Project repo:

## Wiki tools

Read the project wiki with:
  wiki-read <page>
  wiki-read --list
  wiki-read --search <query>

Always read `wiki-read index` at the start of every session.

Publish a new version to PyPI

pip install build twine
python -m build
twine upload dist/*

Bump the version in pyproject.toml before each release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_wiki_tools-0.1.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_wiki_tools-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file llm_wiki_tools-0.1.0.tar.gz.

File metadata

  • Download URL: llm_wiki_tools-0.1.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for llm_wiki_tools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fef9968f17264e2203953ffabc2cee2b6c85d88f72595f046289e636840c3fdf
MD5 2c60c5eaa17735a708ec3e5ab8df1a63
BLAKE2b-256 86a1b4c7aefe903358af26e0443a1f3ae3c4f6b2583d40e0626b98543c372b80

See more details on using hashes here.

File details

Details for the file llm_wiki_tools-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: llm_wiki_tools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for llm_wiki_tools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f8bcbee0c27ec70d8fd6d5583b2aeba6850d216e744de1aef4943976ec575f7
MD5 68605c3b613612a0a87bf0c112129e07
BLAKE2b-256 0d5197bc7b05ca98627c2b954e0ba97cb7c1a520739bf513c05f9aaa1c3271d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page