> ## Documentation Index
> Fetch the complete documentation index at: https://factory-docs-cli-sandbox-mcp-whole-process.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AutoWiki

> AutoWiki generates comprehensive, structured Wikis for your repositories.

AutoWiki generates comprehensive, structured Wikis for your repositories. It analyzes each codebase and produces browsable documentation with architecture overviews, module breakdowns, and cross-linked pages -- then keeps each Wiki current as your code changes.

<img src="https://mintcdn.com/factory-docs-cli-sandbox-mcp-whole-process/pGpNy9bVVMfz59Ot/images/wiki/autowiki-list.png?fit=max&auto=format&n=pGpNy9bVVMfz59Ot&q=85&s=549be2667917f0aef906d2808dd9c908" alt="AutoWiki repository overview in the Factory App" width="2546" height="1688" data-path="images/wiki/autowiki-list.png" />

<CardGroup cols={3}>
  <Card title="Generate" icon="terminal" href="/cli/features/wiki/generate">
    Run `/wiki` in the Droid CLI to produce a Wiki for any repo
  </Card>

  <Card title="Auto-refresh" icon="rotate" href="/cli/features/wiki/auto-refresh">
    Run `/install-wiki` to refresh Wikis on every push
  </Card>

  <Card title="Browse" icon="book-open" href="/cli/features/wiki/web-viewer">
    Read, search, and export Wikis in the Factory App
  </Card>
</CardGroup>

## How it works

<Steps>
  <Step title="Generate from the Droid CLI">
    Run `/wiki` inside a Droid session. Droid analyzes the codebase and produces
    a set of structured markdown pages covering architecture, modules, APIs,
    and conventions.
  </Step>

  <Step title="Store in the Factory App">
    Cloud Sync stores the generated Wiki in the Factory App, where it becomes
    browsable at [app.factory.ai/wiki](https://app.factory.ai/wiki). Each
    sync is versioned so you can compare changes over time.
  </Step>

  <Step title="Sync to GitHub Wiki">
    For GitHub-hosted repositories, AutoWiki can push generated Wikis to the
    repo's built-in GitHub Wiki tab. Internal links are rewritten, a sidebar is
    generated, and the content is pushed to `{repo}.wiki.git`.
  </Step>

  <Step title="Keep it current">
    Run `/install-wiki` to create a CI workflow (GitHub Actions or GitLab CI)
    that regenerates the Wiki on every push to the default branch -- or
    trigger a refresh from the Factory App at any time.
  </Step>
</Steps>

## GitHub Wiki sync

When AutoWiki generates a Wiki for a GitHub-hosted repository, Factory can optionally sync the content to GitHub Wiki. Your team can browse the same documentation directly from the repository page without visiting the Factory App. For details on how the sync works, see [Generate a Wiki](/cli/features/wiki/generate#github-wiki-sync).

<img src="https://mintcdn.com/factory-docs-cli-sandbox-mcp-whole-process/pGpNy9bVVMfz59Ot/images/wiki/github-wiki-sync.png?fit=max&auto=format&n=pGpNy9bVVMfz59Ot&q=85&s=a749f5573afd200b9991895f10d45061" alt="Generated AutoWiki content synced to GitHub Wiki" width="2550" height="1806" data-path="images/wiki/github-wiki-sync.png" />

<Note>
  GitHub requires GitHub Wiki to be initialized before Factory can sync to it.
  If you haven't used GitHub Wiki before, create the first page manually at
  `https://github.com/{owner}/{repo}/wiki`, then re-run `/wiki`.
</Note>

## Enterprise controls

### AutoWiki Cloud Sync

Organizations that need to prevent AutoWiki content from being stored in the Factory App can disable **AutoWiki Cloud Sync**. This is an org-level enterprise control available at [app.factory.ai](https://app.factory.ai) under **Settings > Enterprise Controls**.

<img src="https://mintcdn.com/factory-docs-cli-sandbox-mcp-whole-process/pGpNy9bVVMfz59Ot/images/wiki/autowiki-enterprise-controls.png?fit=max&auto=format&n=pGpNy9bVVMfz59Ot&q=85&s=f0f1ccfef89170daa626815cad180089" alt="AutoWiki Cloud Sync enterprise control in Factory settings" width="2278" height="1686" data-path="images/wiki/autowiki-enterprise-controls.png" />

When AutoWiki Cloud Sync is **disabled**:

* All AutoWiki API endpoints return 403 for your organization
* The `/wiki` command will not store content in the Factory App
* GitHub Wiki sync is also skipped from the Droid CLI
* The AutoWiki page in the Factory App shows no content

AutoWiki Cloud Sync is **enabled by default**. Only org managers can toggle this setting.

For more on how enterprise controls work, see [Hierarchical Settings & Org Control](/enterprise/hierarchical-settings-and-org-control).

## What's next

<CardGroup cols={2}>
  <Card title="Generate a Wiki" icon="terminal" href="/cli/features/wiki/generate">
    Step-by-step guide to producing your first Wiki
  </Card>

  <Card title="Set Up AutoWiki Refresh" icon="rotate" href="/cli/features/wiki/auto-refresh">
    Install a CI action that keeps Wikis current
  </Card>

  <Card title="Browse in the Factory App" icon="book-open" href="/cli/features/wiki/web-viewer">
    Search, read, and export Wikis
  </Card>

  <Card title="Enterprise Settings" icon="building" href="/enterprise/hierarchical-settings-and-org-control">
    Learn how org-level controls govern AutoWiki and other features
  </Card>
</CardGroup>
