Skip to main content

AI-powered documentation agent: auto-generates and maintains README & wiki on every commit

Project description

docwright

AI-powered documentation agent that watches your commits and keeps README and wiki pages up to date automatically.

How It Works

Developer commits / pushes
        │
        ▼
CI runs docwright
        │
        ├─ First run?
        │   └─ Generates all docs from scratch via LLM
        │
        └─ Already initialized?
            ├─ No relevant changes → skips (fast)
            └─ Relevant changes → updates only affected AUTO sections
                        │
                        ▼
             Direct commit  OR  Pull Request (configurable)

The agent only rewrites <!-- AUTO:section --> blocks. Anything you write manually stays untouched.

Quick Start

Install into any repository:

pip install docwright
docwright install

This asks two questions (AI provider, commit mode) and creates:

  • .docwright/docwright.yml — config
  • Makefile targets: make docs, make docs-sync
  • CI workflow (GitHub Actions or GitLab CI)

Then generate docs for the first time:

make docs

After that, docs update automatically on every push.

CLI Commands

Command Description
docwright install Bootstrap a repository (interactive or --auto)
docwright init Generate all documents from scratch
docwright run Update changed sections based on latest diff
docwright sync Force re-sync all AUTO sections
docwright dashboard Terminal table of all registered projects
docwright report Generate static HTML status report

Configuration

.docwright/docwright.yml:

provider:
  type: claude          # claude | openai | ollama
  model: claude-opus-4-7
  api_key_env: ANTHROPIC_API_KEY

output:
  mode: direct          # direct | pull_request

triggers:
  paths:
    - "src/**"
    - "app/**"
  ignore:
    - "tests/**"

documents:
  - type: readme
    template: readme/default
    target: README.md
  - type: wiki
    template: wiki/architecture
    target: docs/wiki/architecture.md

Supported Providers

Provider When to use
Claude (Anthropic) Best output quality
OpenAI (GPT-4o) Alternative if you have OpenAI keys
Ollama Local model, no external API — for private projects

Document Templates

Built-in templates cover the full documentation surface:

Template AUTO sections
readme/default overview, getting_started, architecture, api, development
wiki/architecture overview, components, data_flow, dependencies
wiki/api-contracts endpoints, authentication, error_codes
wiki/development-guide setup, testing, code_style
wiki/operations deployment, monitoring, runbooks, incident_response
wiki/data-model entities, business_rules, relationships
wiki/db-schema tables, indexes, migrations
wiki/integrations external_services, auth_credentials, data_exchange
wiki/security access_model, sensitive_data, requirements
wiki/troubleshooting common_issues, diagnostics, known_limitations
wiki/adr recent_decisions, decision_index

Custom templates go in .docwright/templates/ inside your repository.

AUTO / MANUAL Sections

# README

<!-- AUTO:overview -->
This section is managed by docwright.
<!-- /AUTO:overview -->

<!-- MANUAL -->
## Contributing

Write whatever you want here — docwright never touches MANUAL blocks.
<!-- /MANUAL -->

Central Registry

After docwright init, the project is registered in a central registry.yml. View all projects:

docwright dashboard          # terminal table
docwright report             # HTML page at docwright-report.html

Development

poetry install
poetry run pytest             # 46 tests
poetry run ruff check .       # lint
poetry run mypy docwright    # type check

License

MIT

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

docwright-0.1.27.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

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

docwright-0.1.27-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file docwright-0.1.27.tar.gz.

File metadata

  • Download URL: docwright-0.1.27.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.5.0

File hashes

Hashes for docwright-0.1.27.tar.gz
Algorithm Hash digest
SHA256 74cae389dd84c36fcaca8b589e19ffa49b17b8ba9e99618d12332c0106b13dc9
MD5 2276c76637a7c9d42ac0320d4c0eac62
BLAKE2b-256 689d664f7e92d15bc28e669523ff0901661ffbf899f9878a5378869d44fa1c11

See more details on using hashes here.

File details

Details for the file docwright-0.1.27-py3-none-any.whl.

File metadata

  • Download URL: docwright-0.1.27-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.5 Darwin/25.5.0

File hashes

Hashes for docwright-0.1.27-py3-none-any.whl
Algorithm Hash digest
SHA256 8e9d914b14864f3334d1ab391fcd4587cb75b4d0459eb31324091f99e1f9db00
MD5 cb724dc4dbad8fc3cf78c5965cd4a0b5
BLAKE2b-256 886a2c8765e9ca385cd90f5161300b76c80dc080c9dc78abd4ebe7175f6558c7

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