Skip to main content
The /install-wiki command creates a CI workflow that automatically regenerates your wiki every time code is pushed to the default branch. It detects your CI framework — GitHub Actions or GitLab CI — and generates the appropriate configuration. This keeps your documentation in sync with your codebase without manual intervention.

Quick start

1

Open a Droid session in your repo

cd /path/to/your/project
droid
2

Run the install command

> /install-wiki
Droid creates a workflow file and opens a pull request for you to review.
3

Add the Factory API key

Add FACTORY_API_KEY as a secret in your CI settings:
  • GitHub: Repository Settings > Secrets and variables > Actions (or at the organization level under Organization Settings > Secrets and variables > Actions)
  • GitLab: Repository Settings > CI/CD > Variables (or at the group level under Group Settings > CI/CD > Variables)
Generate a key at app.factory.ai/settings/api-keys.
4

Merge the PR

Once the secret is configured, merge the workflow PR. The wiki will now refresh automatically on every push to the default branch.

Generated workflows

Droid detects your CI framework and creates the appropriate configuration.

GitHub Actions

Creates .github/workflows/droid-wiki-refresh.yml (replace main with your default branch if different):
name: Droid Wiki Refresh

on:
  push:
    branches: [main] # change to your default branch if not main

jobs:
  wiki-refresh:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Factory Droid
        run: curl -fsSL https://app.factory.ai/cli | sh

      - name: Generate wiki
        run: droid exec --auto high "/wiki"
        env:
          FACTORY_API_KEY: ${{ secrets.FACTORY_API_KEY }}

GitLab CI

Appends a job to your existing .gitlab-ci.yml:
droid-wiki-refresh:
  stage: deploy
  before_script:
    - curl -fsSL https://app.factory.ai/cli | sh
  script:
    - droid exec --auto high "/wiki"
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  variables:
    FACTORY_API_KEY: $FACTORY_API_KEY
Both workflows:
  • Trigger on push to the default branch
  • Install the Droid CLI using the official installer
  • Run /wiki in headless mode with high autonomy, generating and uploading the wiki
You can customize the workflow after installation. For example, change the trigger branch, add path filters to only regenerate when source files change, or adjust the timeout.

Prerequisites

  • A GitHub or GitLab hosted repository
  • A Factory API key — generate one at app.factory.ai/settings/api-keys
  • Permission to add secrets and merge PRs in the target repository

Refreshing from the web

You can also set up recurring refreshes from the Factory web app:
  1. Go to app.factory.ai/wiki
  2. Click Refresh on the wiki page
  3. Select Recurring (on push)
  4. Choose a Local or Cloud method:
    • Local — Copies the /install-wiki command for you to run in a local clone
    • Cloud — Selects a cloud template or Droid Computer to run the setup remotely
For batch operations across multiple repositories, the web UI lets you select several repos and run the setup on a Droid Computer in a single operation. See Web Viewer for more on the web interface.

Troubleshooting

Verify the FACTORY_API_KEY secret is set correctly in your repository’s Settings > Secrets and variables > Actions. Generate a new key at app.factory.ai/settings/api-keys if needed.
Check that the workflow file exists at .github/workflows/droid-wiki-refresh.yml and that the branch trigger matches your default branch. View the Actions tab in your repository to see workflow run logs.
The GitHub wiki tab must be initialized before Factory can push to it. Create the first page manually at https://github.com/{owner}/{repo}/wiki. Also verify that your organization hasn’t disabled Wiki Cloud Sync.

See also