Hooks: auto-sync on commit
Install, check, and remove the post-commit git hook that keeps the repowise wiki current after every commit.
The post-commit hook is the most popular auto-sync method. It runs
repowise update after every successful commit, typically 3 to 10
pages in under 30 seconds. Other sync options (file watcher, GitHub
webhook, polling) live in Auto-sync.
This page is about the git post-commit hook. For the unrelated Claude Code / Codex agent hooks that inject proactive context (decisions, freshness, distill nudges) into a coding session, see Proactive agent hooks.
repowise hook install
Install the post-commit hook in the current repo (or every repo in a workspace).
repowise hook install [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--workspace / -w | boolean | false | Install hooks for every repo in the workspace. |
repowise hook install
repowise hook install --workspacerepowise hook uninstall
Remove the repowise post-commit hook.
repowise hook uninstall [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--workspace / -w | boolean | false | Uninstall hooks from every repo in the workspace. |
repowise hook status
Check whether the post-commit hook is installed.
repowise hook status [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--workspace / -w | boolean | false | Check hooks for every repo in the workspace. |
The hook is non-invasive: it appends to any existing post-commit
hook rather than overwriting. hook uninstall removes only the
repowise lines.
repowise hook stats
Show what the agent hooks fired and whether the agent acted on it, per
surface, plus hook invocation counts and wall time. Reads the local ledger
in .repowise/sessions/sessions.db.
repowise hook stats [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--format | string | table | Output: table or json (raw per-surface rows) |
repowise hook stats
repowise hook stats --format jsonA surface showing firings but no verdicts hasn't been classified yet, run
repowise hook backfill. Notices that ask for nothing (stale-read, the
silent read-after-served measurement) report n/a rather than a rate.
repowise hook backfill
Replay Claude Code transcripts into the efficacy ledger, so hook stats
starts with history instead of only what has fired since you upgraded.
Local, single-pass, and safe to re-run: a firing is keyed by a hash of its
own text, so a replay settles the row it already owns.
repowise hook backfill [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--all-projects | boolean | false | Also replay transcripts from this repo's worktrees, not just this checkout. |
--days | number | — | Only replay transcripts modified in the last N days (default: all history). |
--reset | boolean | false | Clear every transcript-classified surface's rows before replaying. Decision rows are never touched. |
repowise hook backfill # this checkout's transcripts
repowise hook backfill --all-projects # include this repo's worktrees
repowise hook backfill --days 30 # only recent transcripts
repowise hook backfill --reset # rebuild the hook surfaces from scratchrepowise update classifies recent sessions automatically, so a backfill is
normally a one-time catch-up. Use --reset once when upgrading from a
release that keyed rows by hook input rather than by emitted text.
repowise hook rewrite install|uninstall|status
A separate, opt-in agent hook (Claude Code + Codex PreToolUse) that
rewrites noisy agent commands (tests, builds, lint runs,
git status/log/diff, searches, listings) to
repowise distill <command>, so the agent sees a compact errors-first
rendering. Covers both Claude Code shell tools (Bash and, on Windows,
PowerShell).
The default posture is allow: a rewrite auto-runs, with no approval
prompt. Set permission: ask under distill.commands in
.repowise/config.yaml if you want the rewritten command shown before it
runs. See Distill.
repowise hook rewrite install # writes ~/.claude/settings.json (idempotent)
repowise hook rewrite status
repowise hook rewrite uninstall # removes only the repowise entries| Parameter | Type | Description |
|---|---|---|
--allow-rule / --no-allow-rule | boolean | Seed Claude Code permission allow rules for the `repowise distill` prefix so existing allowlist entries keep working after rewrites. Prompts when omitted. |
install also re-enables the current repo's distill.commands config
if a prior repowise init opt-out had gated it off; uninstall removes
the global hook entries plus the repo's AGENTS.md awareness section and
leaves per-repo config untouched. Per-repo posture
(permission: ask | allow, per-family overrides) lives under
distill.commands in .repowise/config.yaml.
When ~/.codex exists, install also writes a Codex hook entry to
~/.codex/hooks.json (Codex ≥ 0.137 only) and maintains an "Output
Distillation" section in the repo's AGENTS.md that works without any
hook. Codex cannot show a rewritten command for approval, so there
rewrites fire only for families set to permission: allow; status
reports exactly what your build supports. Full guide:
Distill.
Decisions: capture, list, govern
Record architectural decisions so the why survives the team. Mine git history for proposals, confirm or dismiss them, deprecate stale ones, and check decision health.
Agents: add, remove, refresh
Wire repowise into Claude Code, Codex, Cursor, VS Code, OpenCode, or Hermes, or drop the config snippet for anything else.