Skip to main content

CodeWiki

Repository-level documentation for large codebases, written by AI agents from the dependency graph.

Python version Version License: MIT CI Paper: Findings of ACL 2026 GitHub stars

Quick start • What's new in 2.0 • Features • Benchmark • Guides • Paper

https://github.com/user-attachments/assets/951d5d3c-fd6e-4734-8b16-445d880f95d3

📚 CodeWiki documents itself. Browse the documentation it generated for this repository at CodeWiki docs.

CodeWiki framework


CodeWiki reads a repository, builds its dependency graph, splits the graph into a hierarchy of modules, and has agents write one page per module plus an overview, with Mermaid diagrams. It works on codebases from a few thousand to over a million lines, in 11 languages. It needs an LLM API key, or a Claude or Codex subscription, or an AI IDE that speaks MCP.

Quick start

1. Install

pip install nc-codewiki          # or: uv tool install nc-codewiki
codewiki --version

Prebuilt wheels are published for Windows x86_64, Linux x86_64 and macOS (universal2: Apple Silicon and Intel) on Python 3.12–3.14.

Needs Python 3.12+, Git, and Node.js with npm at install time.

2. Pick a provider

# Any OpenAI-compatible endpoint (OpenAI, LiteLLM proxy, OpenRouter, ...)
codewiki config set \
  --provider openai-compatible \
  --api-key YOUR_API_KEY \
  --base-url https://api.example.com/v1 \
  --main-model claude-sonnet-4 \
  --cluster-model claude-sonnet-4

# Or: no API key, run on your Claude Code subscription (`claude login` first)
codewiki config set --provider claude-code \
  --main-model claude-sonnet-4-6 --cluster-model claude-sonnet-4-6

Anthropic, Azure OpenAI, AWS Bedrock, Atlas Cloud, and Codex are also supported. See Providers and models.

3. Generate

cd /path/to/your/project
codewiki generate                     # writes ./docs/
codewiki generate --github-pages      # also writes an HTML viewer
codewiki generate --update            # later: refresh after code changes

What's new in 2.0

The documentation an agent can write is bounded by what the dependency graph contains. 2.0 makes that graph more complete, wider, and keeps it current. Full list in the CHANGELOG.

  • More complete dependency graphs. Free functions become documentation units, so C code and function-centric C++, Java, and C# packages are no longer nearly empty. Call resolution in C, C++, Java, and C# is scope-, namespace-, include-, and import-aware. Library calls are filtered by an external symbol table. Ruby and Scala analyzers were added.
  • Artifact-aware generation. Build files, CI workflows, Dockerfiles, package manifests, packaging scripts, configuration, and schemas become graph nodes with edges to the code they reference. They are clustered and documented like code, with a guaranteed Build, Deployment and Configuration module when clustering drops them. Guide
  • Component-level incremental updates. codewiki generate --update diffs the saved graph against the current code, repairs the module tree, and sends one agent per affected module to patch its page and the pages that describe it. Everything else is left untouched. On svelte, one update after one commit cost $0.34 against $21.48 for a full build. Guide
  • Subscription mode. Run on a Claude Pro/Max or Codex subscription through the claude and codex CLIs, with no API key.
  • MCP server for IDE agents. codewiki mcp exposes the analysis toolchain to Cursor, Claude Desktop, Claude Code, or CodeBuddy. The IDE's own model does the writing. Guide
  • Also: Atlas Cloud provider, prompt caching, .gitignore handling, Kotlin and PHP analyzers, a CI workflow, a security policy.

Features

Languages. Python, Java, JavaScript, TypeScript, C, C++, C#, Kotlin, PHP, Ruby, Scala, Rust.

Hierarchical decomposition. The dependency graph is clustered into a module tree, recursively, so a 1.4M-line repository gets the same treatment as a 10k-line one. Depth and size thresholds are configurable.

Recursive agents. One agent per leaf module reads the code through tools and writes the page. Parent pages are written from child pages. Diagrams are validated before they are saved.

Artifacts are documented. On by default. --no-artifacts gives the 1.x behaviour, --with-prose also reads README and docs/, --artifact-exclude skips generated configuration trees.

Incremental updates. --update refreshes only what changed. --compare-to <commit> sets the base commit for CI and squashed merges. If too much changed, it falls back to a full build and says so.

Customization.

codewiki generate --include "*.cs" --exclude "Tests,Specs,*.test.cs"
codewiki generate --focus "src/core,src/api" --doc-type architecture
codewiki generate --instructions "Focus on public APIs and include usage examples"
codewiki generate --language ja                    # write the docs in Japanese
codewiki config agent --exclude "Tests,Specs"      # make it the default

--language takes a code or a name (ja, Japanese, vi, zh, ...). Page text, headings and diagram labels follow it. Filenames and module names stay ASCII so links keep working, and the viewer shows the translated page titles. --update reuses the language the docs were generated in.

--include replaces the default file set. --exclude merges with the built-in ignore list. Every flag is in the CLI reference.

IDE-driven mode. Add {"command": "codewiki", "args": ["mcp"]} to your IDE's MCP servers and ask the agent to document the repository. No LLM configuration in CodeWiki.

Output

./docs/
├── overview.md                  # start here
├── <module>.md ...              # one page per top-level module
├── <module>/<sub-module>.md ... # sub-module pages, in folders mirroring the module tree
├── module_tree.json             # the module hierarchy
├── first_module_tree.json       # clustering result before super-grouping
├── metadata.json                # model, version, commit, statistics
├── update_record.json           # every decision of the last --update run
├── temp/artifact_index.json     # artifact files by class
├── temp/dependency_graphs/      # the saved graph (used by --update)
└── index.html                   # viewer (with --github-pages)

Pages mirror the module tree: a module's page sits next to the folder holding its sub-modules (auth.md, auth/login.md). --flat puts every page in ./docs instead, which helps small models that get relative links wrong. --update keeps the layout the docs were generated with.

This repository's own output is checked in under ./docs/.

Benchmark results

Evaluated on CodeWikiBench: seven repositories, 486 rubric requirements, the same LLM judge for every system. Scores are weighted rubric scores from 0 to 100. DeepWiki and CodeWiki 1.0 were re-run under the same setting as 2.0 (September 2026), so the numbers differ from the ones in the paper.

Repository Language LoC DeepWiki CodeWiki 1.0 CodeWiki 2.0 2.0 vs 1.0
OpenHands Python 229,909 74.12 83.31 83.53 +0.22
svelte JavaScript 124,576 69.83 73.21 80.09 +6.88
puppeteer TypeScript 136,302 65.57 84.16 85.04 +0.88
ml-agents C# 86,106 75.74 80.92 89.35 +8.43
logstash Java 117,485 56.31 59.42 77.85 +18.43
Wazuh C 1,446,730 69.91 65.38 88.14 +22.76
Electron C++ 184,234 43.92 42.12 71.59 +29.47
Average 65.06 69.79 82.23 +12.44

The gain is largest where the 1.0 graph missed the most structure (C, C++, Java, C#) and near zero where the analyzers did not change (Python, JavaScript, TypeScript). Artifacts lift the build and testing topics, which 1.0 could not see at all.

Topic Requirements DeepWiki CodeWiki 1.0 CodeWiki 2.0
Architecture 128 72.95 78.02 82.00
Functionality 211 61.62 70.46 88.65
Operations 63 67.71 78.24 78.10
Build and deployment 27 62.84 28.16 71.90
Security 29 48.73 64.91 83.20
Testing 12 61.43 41.93 63.25
Performance 16 43.33 49.06 70.90

Graph growth and score by stage

(a) how much the 2.0 code graph grew over 1.0; (b) nodes and edges added by artifacts; (c) score by stage. "Conference version" is CodeWiki 1.0, "C1 + C2" is CodeWiki 2.0.

Requirements

  • Python 3.12+
  • Node.js and npm at install time (a dependency builds against them)
  • Git
  • One of: an LLM API key, a Claude Code or Codex subscription, or an MCP-capable AI IDE

Guides

CLI reference every command and flag
Providers and models API keys, Atlas Cloud, Azure, Bedrock, subscription mode
Artifact-aware generation what gets documented beyond code, and how to tune it
Incremental updates how --update works, thresholds, the update record
MCP / IDE-driven mode Cursor, Claude Desktop, Claude Code, CodeBuddy
Development guide layout, pipeline, adding a language, tests, releasing
Docker setup the web application in a container
CodeWikiBench the benchmark
Live demo generated documentation examples

Citation

CodeWiki was introduced in CodeWiki: Evaluating AI's Ability to Generate Holistic Documentation for Large-Scale Codebases, published in Findings of ACL 2026. If you use CodeWiki in your research, please cite:

@inproceedings{hoang-etal-2026-codewiki,
    title = "{C}ode{W}iki: Evaluating {AI}{'}s Ability to Generate Holistic Documentation for Large-Scale Codebases",
    author = "Hoang, Anh Nguyen and Le-Anh, Minh and Le, Bach and Bui, Nghi D. Q.",
    booktitle = "Findings of the {A}ssociation for {C}omputational {L}inguistics: {ACL} 2026",
    month = jul,
    year = "2026",
    address = "San Diego, California, United States",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2026.findings-acl.288/",
    doi = "10.18653/v1/2026.findings-acl.288",
    pages = "5812--5827",
}

Star history

Star History Chart

Sponsors

CodeWiki is proudly sponsored by FPT Software.

FPT Software

License

MIT. See LICENSE.

Metadata

Release files for nc-codewiki 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for nc-codewiki 2.0.2
File
nc_codewiki-2.0.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
nc_codewiki-2.0.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
nc_codewiki-2.0.2-cp314-cp314-macosx_10_15_universal2.whl CPython 3.14 CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64) Details
nc_codewiki-2.0.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
nc_codewiki-2.0.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
nc_codewiki-2.0.2-cp313-cp313-macosx_10_13_universal2.whl CPython 3.13 CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) Details
nc_codewiki-2.0.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
nc_codewiki-2.0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
nc_codewiki-2.0.2-cp312-cp312-macosx_10_13_universal2.whl CPython 3.12 CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) Details

Total release size: 105.6 MB

Release files / nc_codewiki-2.0.2-cp314-cp314-win_amd64.whl

Download URL nc_codewiki-2.0.2-cp314-cp314-win_amd64.whl
Size 7.5 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
4d3a3a088b859cd394453f024fe1692c90a997ee04eb40e4a4426ca3611fdf3b
BLAKE2b-256 checksum
How to use checksums
ff42d22167a3c9874cc3528dec8dd8f40a425501fa422da0b40ef98b6671996f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nc_codewiki-2.0.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL nc_codewiki-2.0.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.6 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
356e229567c9677e7bc4449b09bd1e9a93d24ef004963595f6f73f3f0f80c60b
BLAKE2b-256 checksum
How to use checksums
c2a0f345f66a851b3feb595ca3877e12df2d960dfd3130182a5eeb0128d31451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nc_codewiki-2.0.2-cp314-cp314-macosx_10_15_universal2.whl

Download URL nc_codewiki-2.0.2-cp314-cp314-macosx_10_15_universal2.whl
Size 17.2 MB
Tags CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
93ce3e55c2312c34b0238b7a46dee89cf7bb9b79c815a9783acc14868b85eb14
BLAKE2b-256 checksum
How to use checksums
fb6141c1aef56f9e402621f7cc42db10bffc4a83520edb83cf0ed63da242d53e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nc_codewiki-2.0.2-cp313-cp313-win_amd64.whl

Download URL nc_codewiki-2.0.2-cp313-cp313-win_amd64.whl
Size 7.4 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
f0769fcf16c47d2e80b9a7422a9dc60ca4c820de83eb8f684df98706143d54f4
BLAKE2b-256 checksum
How to use checksums
8b638afa467c4e52a889b90ae4d2c2ff32dba98830f4ee0b82347f895a3d5b04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nc_codewiki-2.0.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL nc_codewiki-2.0.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.7 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
52140ccaf34a9e8fb78d9a660267020a995084204649435656ba61f4bb6fcc36
BLAKE2b-256 checksum
How to use checksums
d0dd125b0d1d9800bf908d702704c29a48fac2852b175414a687545301285068
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nc_codewiki-2.0.2-cp313-cp313-macosx_10_13_universal2.whl

Download URL nc_codewiki-2.0.2-cp313-cp313-macosx_10_13_universal2.whl
Size 17.0 MB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
dba242c6dd3cd0310380e5009d5ceb4f636254ca1f9325ec35f9cb7d881d927e
BLAKE2b-256 checksum
How to use checksums
09bc865adcbfac0b42d15d6c919686b1483d932eed060acea7afc5578921ee47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nc_codewiki-2.0.2-cp312-cp312-win_amd64.whl

Download URL nc_codewiki-2.0.2-cp312-cp312-win_amd64.whl
Size 7.4 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
9a9477d620dfd025cda0f0dfde3d15c4997882cee4ed54d1aab02d29ed767a90
BLAKE2b-256 checksum
How to use checksums
5e41413e9f87f166b721348dd537e66f0f2918d22837c8cfb0cff4c02409b162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nc_codewiki-2.0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL nc_codewiki-2.0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.7 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9a55c1b73b9817e88e0be4fef90c28268886bc57d1354146044e60007e6cd4d9
BLAKE2b-256 checksum
How to use checksums
d558bf87bd3e7ce40cae75a6f3984fcdd1ec9fb63f229f612cae2de11de48255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / nc_codewiki-2.0.2-cp312-cp312-macosx_10_13_universal2.whl

Download URL nc_codewiki-2.0.2-cp312-cp312-macosx_10_13_universal2.whl
Size 17.1 MB
Tags CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
049d33f375442bb005b52873ef17d5594233dac74345fcf0f7dee1402a3ca2c6
BLAKE2b-256 checksum
How to use checksums
2ee43d9214e38190aca0487dbe54f378a500a93e993d0eeeeb4c88ab9c50b358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.2 This release

9 release files

2.0.1

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page