Code-to-Docs
Turn your app’s screens into a Help Center your users can actually read.
Code-to-Docs scans a React / Next.js project, figures out pages, forms, buttons, and navigation, then writes plain-language product documentation and a searchable Help Center website. Everything runs on your machine. Your source code is not uploaded anywhere.
Current status: alpha (0.2.0). The local workflow works today. Best results are with Next.js (App Router or Pages Router) apps. MCP and agent hooks are available for Claude Code, Codex, and Cursor.
Who this is for
- Product and engineering teams who need user-facing docs that stay closer to the real UI
- People who want a starting Help Center without writing every article from scratch
- Teams that prefer a local, private tool over sending the codebase to a cloud service
It is not a general Markdown wiki and not developer API docs. The output is meant for end users of your product.
What you get
After a successful build you typically have:
- Help Center site — searchable, responsive pages styled from your app’s detected theme
- User-facing articles — written without source file paths or implementation jargon
- Project state — stored under
.code-to-docs/inside your app repo so later runs can update only what changed
You can open the site locally with code-to-docs preview, or host the generated static files wherever you already publish docs.
Requirements
- Python 3.10 or newer
- Windows, macOS, or Linux
- A project Code-to-Docs can recognize (for example a Next.js / React app with
package.json)
Quick start
uvx code-to-docs init
Recommended installation
uv tool install code-to-docs
pipx
pipx install code-to-docs
pip
pip install code-to-docs
To install from GitHub instead of PyPI:
uv tool install git+https://github.com/MoshikoKar/Code-to-Docs.git
pip install git+https://github.com/MoshikoKar/Code-to-Docs.git
Then initialize a project:
code-to-docs init
Check that it works:
code-to-docs --version
code-to-docs --help
Upgrade
uv tool upgrade code-to-docs
pipx upgrade code-to-docs
pip install --upgrade code-to-docs
Uninstall
uv tool uninstall code-to-docs
pipx uninstall code-to-docs
pip uninstall code-to-docs
Uninstalling the tool does not delete .code-to-docs/ inside your application repositories.
Everyday workflow
Install the application once on your machine (uv tool install / pipx / pip). Then, from inside an application repository:
1. Set up the project (and AI platforms)
code-to-docs install
This creates .code-to-docs/config.yaml, adds managed instruction sections for detected AI tools, and for Claude Code / Codex / Cursor also registers global MCP + hooks when those hosts support them. Your existing agent configs are preserved.
Preview without writing files:
code-to-docs install --dry-run
Target one or more tools explicitly:
code-to-docs install --platform cursor
code-to-docs install --platform codex --platform claude-code
Other instruction-only platforms include: gemini-cli, antigravity, windsurf, zed, continue, opencode, qwen, qoder, kiro, copilot, copilot-cli, codebuddy.
Prefer a guided setup wizard for this repository only?
code-to-docs init # interactive
code-to-docs init --yes # safe defaults, no prompts
init does not reinstall the global application or duplicate global MCP registrations.
2. Build the Help Center
code-to-docs build
This is the main command. It scans the app, generates documentation, and writes the static site (by default under .code-to-docs/site/).
3. Preview locally
code-to-docs preview
Open the URL it prints (default http://127.0.0.1:4173). Press Ctrl+C to stop.
4. Keep docs in sync as the product changes
code-to-docs update # refresh after code changes
code-to-docs status # see project + integration state
code-to-docs validate # check for broken relationships
code-to-docs hook stop # agent lifecycle impact check (no full rebuild)
code-to-docs mcp # stdio MCP server for connected agents
See docs/INTEGRATIONS.md for MCP tools, hooks, uninstall, and the global vs project model.
5. Remove platform integration (optional)
code-to-docs uninstall --platform cursor
This removes owned MCP/hook/instruction entries and keeps .code-to-docs/ project state.
Where files live
| Location | Purpose |
|---|---|
.code-to-docs/config.yaml |
Your project settings |
.code-to-docs/docs/ |
Generated Markdown / documentation model |
.code-to-docs/site/ |
Static Help Center you can preview or publish |
.code-to-docs/graph/ |
Internal product map used to build articles |
.code-to-docs/state.db |
Fingerprints so unchanged files are not reworked every time |
You can commit or ignore generated output depending on your team’s preference. Secrets and .env files are not scanned into documentation.
Privacy
- Analysis runs locally
- Source is not sent to an external service by default
- Optional browser extras are separate; the normal install stays lightweight and does not download browser runtimes
Optional (advanced) browser package:
pip install "code-to-docs[browser]"
Useful commands at a glance
| Command | When to use it |
|---|---|
install |
First-time setup + AI tool instructions |
build |
Create or fully rebuild the Help Center |
preview / serve |
View the site on your machine |
update |
Refresh after product changes |
status |
See current state at a glance |
validate |
Catch stale or broken doc links to the product map |
detect |
See what stack Code-to-Docs detected |
init |
Wizard-style configuration |
scan / analyze |
Advanced: run individual stages only |
Run any command from another folder with --root path/to/your-app.
Tips for better results
- Start with a Next.js app that has clear pages (
page.tsx/pages/…), visible headings, and labeled buttons/forms - Run
buildagain after larger UI changes, or useupdatefor ongoing maintenance - Use
install --dry-runbefore letting the tool touch AI instruction files - Treat generated articles as a strong first draft: edit tone and product nuance where humans still know best
Contributing & internals
If you are developing Code-to-Docs itself, see CONTRIBUTING.md. Architecture and release notes live in ARCHITECTURE.md, docs/IMPLEMENTATION.md, and docs/RELEASING.md.
License
MIT — see LICENSE. Community standards: CODE_OF_CONDUCT.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file code_to_docs-0.2.0.tar.gz.
File metadata
- Download URL: code_to_docs-0.2.0.tar.gz
- Upload date:
- Size: 113.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dc9056fb43e480dd1e49ceb07c24e01aa5a531811373cd2d3479c5e012d702f
|
|
| MD5 |
5c50a757f7880d1c9e00d00cbfa0f78e
|
|
| BLAKE2b-256 |
b49d1aaae6ce35aa7895fadf75f168b1ba4cb3e83994216723a55ddd74b25f68
|
Provenance
The following attestation bundles were made for code_to_docs-0.2.0.tar.gz:
Publisher:
release.yml on MoshikoKar/Code-to-Docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_to_docs-0.2.0.tar.gz -
Subject digest:
0dc9056fb43e480dd1e49ceb07c24e01aa5a531811373cd2d3479c5e012d702f - Sigstore transparency entry: 2424217881
- Sigstore integration time:
-
Permalink:
MoshikoKar/Code-to-Docs@2b02dd234d4ed7f6bf1d0013e3b305cd13ee09e3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/MoshikoKar
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b02dd234d4ed7f6bf1d0013e3b305cd13ee09e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file code_to_docs-0.2.0-py3-none-any.whl.
File metadata
- Download URL: code_to_docs-0.2.0-py3-none-any.whl
- Upload date:
- Size: 107.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
170a6f2b36c09f300a1e56967ad790e4c530a8efbaecad8d7bf6b0f07f672f6f
|
|
| MD5 |
a614084d6efcd7871fa458e76ff33975
|
|
| BLAKE2b-256 |
369b7de25b2439e7e9ca3d53b256c0b60b9e721c9ec49fce8786cfb399401285
|
Provenance
The following attestation bundles were made for code_to_docs-0.2.0-py3-none-any.whl:
Publisher:
release.yml on MoshikoKar/Code-to-Docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
code_to_docs-0.2.0-py3-none-any.whl -
Subject digest:
170a6f2b36c09f300a1e56967ad790e4c530a8efbaecad8d7bf6b0f07f672f6f - Sigstore transparency entry: 2424217949
- Sigstore integration time:
-
Permalink:
MoshikoKar/Code-to-Docs@2b02dd234d4ed7f6bf1d0013e3b305cd13ee09e3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/MoshikoKar
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2b02dd234d4ed7f6bf1d0013e3b305cd13ee09e3 -
Trigger Event:
push
-
Statement type: