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.1

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.1
File
nc_codewiki-2.0.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
nc_codewiki-2.0.1-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.17+ x86-64, Linux glibc 2.28+ x86-64 Details
nc_codewiki-2.0.1-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.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
nc_codewiki-2.0.1-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.1-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.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
nc_codewiki-2.0.1-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.1-cp312-cp312-macosx_10_13_universal2.whl CPython 3.12 CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) Details

Total release size: 107.1 MB

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

Download URL nc_codewiki-2.0.1-cp314-cp314-win_amd64.whl
Size 7.7 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
f7662b5fd4b98d9684421b12014d623193ec309c988aa5cf5ecbf7ac03e6aadc
BLAKE2b-256 checksum
How to use checksums
22383b1d2e9f19c88dc11ae12fe16f2c0741513af42d68c162d751a3da94543d
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 10, 2026.

Transparency log

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

Download URL nc_codewiki-2.0.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.7 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9270bf075fd88cb0b1c14f7e66c9db274d47943f628f425e738fbd36500bfb31
BLAKE2b-256 checksum
How to use checksums
c96539306997253affeb52af13f0775dfa81cc71d2c59f6eeb4cefdae5bd7df9
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 10, 2026.

Transparency log

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

Download URL nc_codewiki-2.0.1-cp314-cp314-macosx_10_15_universal2.whl
Size 17.5 MB
Tags CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
41e2b587d607d554697b1c5a5837dbbcbb49f67f6c69dcf678ca565c15770a23
BLAKE2b-256 checksum
How to use checksums
6f8ee968ddf3f785b3b3f0070585aaa62f557da613b72a2e0ceb6a1ce16a2faa
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 10, 2026.

Transparency log

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

Download URL nc_codewiki-2.0.1-cp313-cp313-win_amd64.whl
Size 7.5 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
215dd9670eb6df8afefed34a904a7add268cec81639fac1062d3c8a9d34c6980
BLAKE2b-256 checksum
How to use checksums
a97b014f7114b3aa0a52f4c14d3357d0d558dc28a184a056936c5e5d652dd504
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 10, 2026.

Transparency log

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

Download URL nc_codewiki-2.0.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.8 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cf1f750ca74d90391f87ba9b0f8c79c1a06bbc1db2024bb1d360e87339400ee1
BLAKE2b-256 checksum
How to use checksums
f26bf96536d356fb7bac4e87a5c5e8986b53e610cc900cab7bf4885385c16be2
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 10, 2026.

Transparency log

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

Download URL nc_codewiki-2.0.1-cp313-cp313-macosx_10_13_universal2.whl
Size 17.2 MB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
b387a53de5a1cfb4399a50bfc6a319888c2ac123cd89b48494a0e5a5895bd041
BLAKE2b-256 checksum
How to use checksums
ddacbbf4d5376af5fcfd567b5a18517f594c7d793ac402f5f639a016c1e3bf56
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 10, 2026.

Transparency log

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

Download URL nc_codewiki-2.0.1-cp312-cp312-win_amd64.whl
Size 7.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
55696fdcbcde5fe29b1db029f9ec4b666d2d5ff9877acd1bcf3c08b36b4b7e52
BLAKE2b-256 checksum
How to use checksums
17c3358b9851c928420640923d06d9b85c68d462aeae9dcb8df04fe51c7d690b
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 10, 2026.

Transparency log

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

Download URL nc_codewiki-2.0.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 10.8 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
033610632669d9b22e60dec97b050c73a6bd2cb437ab45374d912ce4acee205a
BLAKE2b-256 checksum
How to use checksums
e9b54066d92d490fe6a20320d71024fc19aa4e249b966ba7a0db04edfeea7038
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 10, 2026.

Transparency log

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

Download URL nc_codewiki-2.0.1-cp312-cp312-macosx_10_13_universal2.whl
Size 17.3 MB
Tags CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
2c955d70d2267933b6e73e193c9685a9eddae018f15f5e37603b5cc35506f605
BLAKE2b-256 checksum
How to use checksums
83ea90a25abdfdf9c01a73ac1d37b4fa41631b03d51f7a14c40b1e9ecaff243b
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 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.1 This release

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