Automatic Refresh
Use /install-wiki to set up a CI action that regenerates a Wiki on every push to the default branch.
The /install-wiki command creates a CI workflow that automatically regenerates a 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
- 1Open a Droid session in your repoBash
cd /path/to/your/project droid - 2Run the install command
> /install-wikiDroid creates a workflow file and opens a pull request for you to review.
- 3Add the Factory API key
Add
FACTORY_API_KEYas 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 in the Factory API keys settings.
- 4Merge 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 AutoWiki 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_KEYBoth workflows:
- Trigger on push to the default branch
- Install the Droid CLI using the official installer
- Run
/wikiin headless mode with high autonomy, generating the Wiki and storing it in the Factory App with Cloud Sync
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 in the Factory API keys settings)
- Permission to add secrets and merge PRs in the target repository
Refreshing from the Factory App
You can also set up recurring refreshes from the Factory App:
- 1Go to app.factory.ai/wiki
- 2Click Refresh on the Wiki page
- 3Select Recurring (on push)
- 4Choose a Local or Cloud method:
- Local: Copies the
/install-wikicommand for you to run in a local clone - Cloud: Selects a cloud template or Droid Computer to run the setup remotely
- Local: Copies the
For batch operations across multiple repositories, the Factory App lets you select several repos and run the setup on a Droid Computer in a single operation.
See Wiki Browser for more on the Factory App interface.