Skip to main content

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

  1. Help Center site — searchable, responsive pages styled from your app’s detected theme
  2. User-facing articles — written without source file paths or implementation jargon
  3. 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

Until the package is on PyPI, install from GitHub instead:

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 build again after larger UI changes, or use update for ongoing maintenance
  • Use install --dry-run before 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

code_to_docs-0.1.0.tar.gz (75.1 kB view details)

Uploaded Source

Built Distribution

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

code_to_docs-0.1.0-py3-none-any.whl (71.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: code_to_docs-0.1.0.tar.gz
  • Upload date:
  • Size: 75.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for code_to_docs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 502e1fc97f18ae3e20828870a75556505f0386fa2393e285d01db9eedbf58bcc
MD5 3b43920cfe6b0a0b25b4f0bff40383be
BLAKE2b-256 17d5767679102098a9123d371e0e13639c364e2184e3dbcd5a74f8d979e53699

See more details on using hashes here.

Provenance

The following attestation bundles were made for code_to_docs-0.1.0.tar.gz:

Publisher: release.yml on MoshikoKar/Code-to-Docs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: code_to_docs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 71.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for code_to_docs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b480c4cf8ab4161796c30355d4eb85150fa0bb5ac356e75e8a56fc80b5d15ed
MD5 71e28cb9fd5192379f8733856e87d3b2
BLAKE2b-256 9a744c770fb0befcc407bc22badd6676abe9a44947ab53a7013f43efeea56d43

See more details on using hashes here.

Provenance

The following attestation bundles were made for code_to_docs-0.1.0-py3-none-any.whl:

Publisher: release.yml on MoshikoKar/Code-to-Docs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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