repowise can automatically update your wiki whenever code changes. Choose the method that fits your setup.
| Method | Best for | Requires server? |
|---|---|---|
| Post-commit hook | Solo developers, local repos | No |
| File watcher | Local development, rapid iteration | No |
| GitHub webhook | Teams, CI/CD, hosted repos | Yes |
| GitLab webhook | Teams, CI/CD, hosted repos | Yes |
| Polling fallback | Safety net for missed webhooks | Yes |
Runs repowise update in the background after every local commit. Your
terminal is never blocked. This is the recommended auto-sync method for
local development.
repowise init will offer to install the hook automatically at the end
of the setup wizard. You can also install or manage it manually:
repowise hook install # install for current repo
repowise hook install --workspace # install for all workspace repos
repowise hook status # check if installed
repowise hook uninstall # remove the hookThe hook is marker-delimited, so it safely coexists with other tools'
hooks (linters, formatters, etc.) in the same post-commit file.
- You run
git commit - The hook fires in the background (non-blocking)
repowise updatediffs the new commit against the last synced commit- Only affected pages are regenerated (typically 3-10 for a small commit)
- Graph, git stats, dead code, and decisions are also refreshed
repowise hook status
repowise hook status --workspace # check all repos in workspacerepowise hook uninstall
repowise hook uninstall --workspaceWatches your working directory for file saves and auto-updates. Useful during active development when you want the wiki to stay current without committing.
repowise watch # watch current directory
repowise watch /path/to/repo
repowise watch --debounce 5000 # wait 5s after last change (default: 2s)Press Ctrl+C to stop.
Changes to files inside .repowise/ are ignored to prevent update loops.
For teams or hosted deployments. GitHub sends a push event to your repowise server, which triggers an incremental update.
- repowise server running and reachable from the internet (or GitHub's network)
- A webhook secret (recommended for production)
repowise serve # http://localhost:7337
repowise serve --host 0.0.0.0 --port 8080 # custom bindexport REPOWISE_GITHUB_WEBHOOK_SECRET="your-secret-here"- Go to your repo Settings > Webhooks > Add webhook
- Payload URL:
https://your-server.example.com/api/webhooks/github - Content type:
application/json - Secret: the same value you set in
REPOWISE_GITHUB_WEBHOOK_SECRET - Events: select Just the push event
- Click Add webhook
Push a commit and check the webhook delivery in GitHub (Settings > Webhooks >
Recent Deliveries). You should see a 200 response with:
{
"event_id": "...",
"status": "accepted"
}When REPOWISE_GITHUB_WEBHOOK_SECRET is set, every incoming request is
verified using HMAC-SHA256 against the X-Hub-Signature-256 header. Requests
with invalid or missing signatures are rejected with 401 Unauthorized.
If the secret is not set, signature verification is skipped (convenient for local development, but not recommended for production).
Same concept as GitHub, different endpoint and auth mechanism.
export REPOWISE_GITLAB_WEBHOOK_TOKEN="your-token-here"- Go to your project Settings > Webhooks
- URL:
https://your-server.example.com/api/webhooks/gitlab - Secret token: the same value you set in
REPOWISE_GITLAB_WEBHOOK_TOKEN - Trigger: enable Push events
- Click Add webhook
When REPOWISE_GITLAB_WEBHOOK_TOKEN is set, the server compares it against
the X-Gitlab-Token header using constant-time comparison. Invalid tokens are
rejected with 401 Unauthorized.
When the server is running, a background job polls all registered repositories every 15 minutes. If new commits are detected that weren't caught by webhooks (e.g. webhook delivery failed), it triggers an incremental update automatically.
No configuration needed -- this runs automatically when you start the server
with repowise serve.
There are two update paths, depending on the trigger:
- Diff -- compare the new HEAD against the last synced commit
- Full graph rebuild -- re-traverse and re-parse all files to rebuild the dependency graph (needed for cascade analysis)
- Incremental git re-index -- re-index git metadata only for changed files, then recompute percentiles across the whole repo
- Dead code analysis -- run partial dead code detection on changed files and their graph neighbors
- Decision re-scan -- re-scan changed files for inline decision markers
- Detect affected pages -- find directly changed files, cascade to 1-hop importers, capped by an adaptive budget (auto-scaled based on change size)
- Regenerate -- call the LLM only for affected pages
- Cross-repo hooks -- if the repo is part of a workspace, re-run cross-repo co-change and contract analysis
- Persist -- update the database, search index, and record a GenerationJob
- Save state -- record the new HEAD as the last synced commit
A typical single-commit update touches 3-10 pages and completes in under a minute.
- Full re-traverse -- re-parse all files and rebuild the dependency graph
- Full git re-index -- re-index git metadata for all files
- Dead code analysis -- full dead code scan
- Decision extraction -- full decision marker scan
- Persist -- update the database
- Save state -- record the new HEAD
Server sync does not regenerate wiki pages (no LLM cost). Use
Full Re-index (POST /api/repos/{id}/full-resync) to also regenerate
all wiki pages.
Updates all stale repos in parallel (up to 4 concurrent), then re-runs
cross-repo analysis (co-changes, package dependencies, API contracts).
Use --repo <alias> to target a single repo within the workspace.
To see what would be updated without actually regenerating:
repowise update --dry-runrepowise update # diff since last sync
repowise update --since abc123 # diff from a specific commit
repowise update --cascade-budget 50 # allow more cascade pages (default: auto)
repowise update --workspace # update all stale workspace repos
repowise update --repo backend # update a specific workspace repo
repowise watch --workspace # auto-update all workspace repos on file change| Variable | Used by | Description |
|---|---|---|
GEMINI_API_KEY |
CLI | API key for Gemini LLM provider |
OPENAI_API_KEY |
CLI | API key for OpenAI LLM provider |
ANTHROPIC_API_KEY |
CLI | API key for Anthropic LLM provider |
REPOWISE_GITHUB_WEBHOOK_SECRET |
Server | HMAC secret for GitHub webhook verification |
REPOWISE_GITLAB_WEBHOOK_TOKEN |
Server | Token for GitLab webhook verification |
REPOWISE_DB_URL |
Server | Database URL (default: local SQLite) |
REPOWISE_API_KEY |
Server | Bearer token for API authentication |
API keys can also be stored in .repowise/.env (auto-gitignored) during
repowise init. The update and reindex commands load this file
automatically.
"No previous sync found" -- Run repowise init first to create the
initial wiki before using any auto-sync method.
"Already up to date" -- The wiki is already synced to the latest commit. Nothing to do.
Hook doesn't fire -- Make sure the hook file is executable:
chmod +x .git/hooks/post-commit
Webhook returns 401 -- Check that the secret/token matches between your git hosting provider and the environment variable on the server.
Update is slow -- If you're catching up on many commits, the first update may take longer. Subsequent single-commit updates are fast (~30-60s).