CommandsHooks
hooks install
Install managed RAGit git hooks
What It Does
hooks install writes managed post-commit and post-merge hooks that trigger incremental ingestion.
When To Use / When Not To Use
When to use it
- You want indexing to stay closer to repository changes automatically.
- You have already completed your first successful ingest and want managed hooks to keep incremental indexing close to repository changes.
- This is optional but recommended after the first successful ingest.
When not to use it
- You only want to inspect the hook state. Use
hooks status. - You are removing managed hooks. Use
hooks uninstall.
Syntax
pnpm ragit hooks install [--dry-run] [--format text|json|both] [--cwd <path>]
Arguments And Options
--dry-run: Show what would be installed without writing files.--format text|json|both: Choose text, JSON, or both.--cwd <path>: Run against another repository.
Input And Output Contract
- Input is flag-based only.
- JSON output includes
dryRun,root, andhooks. --dry-runverifies paths and returns planned hook states without mutation.
Examples
Human terminal flow:
pnpm ragit hooks install
Agent-oriented flow:
pnpm ragit hooks install --dry-run --format json
Failures And Cautions
- Hooks are written into
.git/hooks, so the repository must have a valid git root. - The installed hooks are managed-by-ragit hooks, not arbitrary shell automation.