# Generate documentation from a GitHub repository

How to generate documentation from a GitHub repository: what gets read, how pages are planned and written, and how to review and publish them.

On this page

- The short answer
- What a generator should read, and what it should not
- How the pages get written
- Review, edit, publish
- Frequently asked questions
- Keep reading

## The short answer

Connect the repository to Docup. It reads the code, plans the pages the project needs, writes each one, and gives you a private draft to review. Nothing is public until you press Publish.

Access is read-only. Docup never pushes to your repository, opens pull requests or changes your files.

## What a generator should read, and what it should not

Good documentation comes from source, config and any docs you already have. Docup filters the repository before the AI sees anything:

- Read: source files, configuration and existing documentation.
- Skipped: lockfiles, binaries, build output, vendored folders, .env files, keys and very large files.
- Your own ignore paths are added on top, and secrets never reach the AI.

## How the pages get written

A planner looks at the code first and decides what the docs need: an overview, getting started, the main guides, and reference pages only when the code really has them. A writer then reads the files that matter for each page and drafts it.

The writer is told to state only what it verified in your source and to leave out what it cannot confirm. If one page fails, Docup retries it, and the rest of the run carries on. You can retry a single page yourself.

## Review, edit, publish

The result is a draft only you can see. Edit any page like a document, with autosave, and steer the next run with instructions about your audience and tone. When you are happy, a dialog lists every page that goes live, then your docs site is published with search, dark mode and an on-this-page list.

## Frequently asked questions

**Can I generate documentation from a private repository?**: Yes. You grant read-only access to the repositories you choose, and the generated draft stays private until you publish it.

**Does the generator run my code?**: No. Docup reads the files of the repository and writes from them. It does not build or execute your project.

**How long does the first draft take?**: Docup writes the first version in minutes. Each page appears in the Runs screen as it is written, with a result for every page.

**What does it cost?**: Docup is free while it is in early access. See the pricing page for what is included.

## Keep reading

- [Keep Documentation Up to Date Automatically](https://docup.dev/guides/keep-documentation-up-to-date)
- [How to Verify AI-Generated Documentation](https://docup.dev/guides/verify-ai-generated-documentation)
- [Document a TypeScript Library With No Docs](https://docup.dev/guides/document-a-typescript-library)
- [Free Docs Hosting for Open Source Projects](https://docup.dev/guides/free-docs-hosting-for-open-source)

Last updated November 3, 2026
