# CLI overview

Every repowise CLI command at a glance, from init, update and serve to search, health, risk, distill and decision, with a link to each command's full guide.

| Command | Purpose |
|---|---|
| `init` | Full wiki generation for a repository |
| `update` | Incremental wiki regeneration from new commits; `--working-tree` also indexes uncommitted edits |
| `generate` | Write or rewrite the model-written concept pages ([guide](https://docs.repowise.dev/cli/indexing#repowise-generate)) |
| `reindex` | Rebuild vector search index from existing pages |
| `serve` | Start API server + web UI |
| `mcp` | Start MCP server for editor integration |
| `search` | Search the wiki by keyword, meaning, or symbol name ([guide](https://docs.repowise.dev/cli/query)) |
| `ask` | Ask a question, get a cited answer (LLM call) ([guide](https://docs.repowise.dev/cli/query#repowise-ask-question)) |
| `context` | Triage card for files/modules/symbols: summary, hotspot, fix history ([guide](https://docs.repowise.dev/cli/query#repowise-context-targets)) |
| `symbol` | Read one function/class/constant with live-verified line bounds ([guide](https://docs.repowise.dev/cli/query#repowise-symbol-symbol_id)) |
| `why` | Why the code is shaped this way: decisions + git archaeology ([guide](https://docs.repowise.dev/cli/query#repowise-why-query)) |
| `status` | Show wiki sync state + statistics |
| `next` | The few things worth doing next, ranked from the index ([guide](https://docs.repowise.dev/cli/other#repowise-next)) |
| `costs` | Estimate LLM costs for generation |
| `distill` | Run a command, print a compact errors-first rendering ([guide](https://docs.repowise.dev/cli/distill)) |
| `expand` | Restore output behind a `[repowise#<ref>]` omission marker |
| `saved` | Input tokens agents did not have to read, and what they were worth ([guide](https://docs.repowise.dev/cli/distill#repowise-saved-path)) |
| `savings sync` | Record savings agents were shown but the ledger never banked ([guide](https://docs.repowise.dev/cli/distill#repowise-savings-sync-path)) |
| `corrections` | Recurring fail→fixed command fumbles mined from agent transcripts |
| `workspace` | Manage multi-repo workspaces |
| `decision` | Manage architectural decision records |
| `hook` | Manage post-commit git hooks + the distill rewrite hook ([guide](https://docs.repowise.dev/cli/hook)) |
| `agents` | Wire repowise into Claude Code, Codex, Cursor, VS Code, OpenCode, Hermes, GitHub Copilot CLI, Kiro ([guide](https://docs.repowise.dev/cli/agents)) |
| `uninstall` | Remove repowise from this repo, and optionally this machine ([guide](https://docs.repowise.dev/cli/uninstall)) |
| `security` | `scan` for leaked secrets and risky patterns, including full git history ([guide](https://docs.repowise.dev/cli/other#repowise-security-scan)); `check` gates a change on the findings it adds ([guide](https://docs.repowise.dev/cli/gates#repowise-security-check)) |
| `watch` | Auto-sync wiki on file changes |
| `augment` | Enrich Claude Code tool calls with graph context |
| `export` | Export wiki as markdown / json |
| `generate-claude-md` | Generate `CLAUDE.md` from the wiki |
| `config hints` | Turn the occasional repowise.dev hint line on or off ([guide](https://docs.repowise.dev/cli/other#repowise-config-hints)) |
| `dead-code` | List unused code |
| `doctor` | Health checks on wiki setup |
| `health` | Score every file across defect risk, maintainability, and performance ([guide](https://docs.repowise.dev/cli/health)) |
| `risk` | Rank a commit or diff range by size and spread against recent commits, or gate CI on it ([guide](https://docs.repowise.dev/cli/health#repowise-risk)) |
| `overlap` | Show which other branches edit the files this change edits ([guide](https://docs.repowise.dev/cli/other#repowise-overlap)) |
| `coverage` | Ingest coverage reports, and gate a change on its patch coverage ([guide](https://docs.repowise.dev/cli/gates)) |
| `impacted-tests` | Print the tests a change needs, or `:all` when unsure ([guide](https://docs.repowise.dev/cli/gates#repowise-impacted-tests)) |
| `doc-drift` | Show documentation the repository no longer matches, or gate CI on it ([guide](https://docs.repowise.dev/cli/gates#repowise-doc-drift)) |
| `changes` | `list`, `show` and `export` merged changes (Change Records) with their evidence checklist ([guide](https://docs.repowise.dev/cli/changes#repowise-changes)) |
| `check` | Evaluate the change policy in `.repowise/policies.yaml`; writes SARIF or JUnit ([guide](https://docs.repowise.dev/cli/changes#repowise-check)) |
| `suspects` | Rank recent changes against a symptom, with the evidence for each ([guide](https://docs.repowise.dev/cli/changes#repowise-suspects)) |
| `report` | `assessment`, `changes` and `inventory` evidence packs as JSON, Markdown, HTML or CSV ([guide](https://docs.repowise.dev/cli/changes#repowise-report)) |
| `events` | Typed component events between index runs ([guide](https://docs.repowise.dev/cli/changes#repowise-events)) |
| `components` | `check`, `list` and `ownership` for Backstage-shaped components ([guide](https://docs.repowise.dev/cli/components#repowise-components)) |
| `packages` | `where`, `export` (CycloneDX 1.6) and `import` for third-party package usage ([guide](https://docs.repowise.dev/cli/components#repowise-packages)) |
| `attribution` | `status`, `backfill` and `purge` AI attribution ([guide](https://docs.repowise.dev/cli/components#repowise-attribution)) |
| `restyle` | Switch wiki style and regenerate every page in the new voice ([guide](https://docs.repowise.dev/cli/indexing#repowise-restyle)) |
| `wiki-styles` | List available wiki styles ([guide](https://docs.repowise.dev/cli/indexing#repowise-wiki-styles)) |
| `whats-new` | Show release notes since you last looked ([guide](https://docs.repowise.dev/cli/other#repowise-whats-new)) |
| `plugins` | List loaded plugins and the implementation each seam uses ([guide](https://docs.repowise.dev/cli/other#repowise-plugins)) |
| `telemetry` | Inspect/control anonymous opt-out usage telemetry |
| `login` / `logout` / `whoami` | Hosted repowise.dev account sign-in and status |
| `publish` | Put this repo on repowise.dev, indexed from its pushed remote ([guide](https://docs.repowise.dev/cli/other#repowise-publish)) |
| `delete` | Delete a repo's stored index (not source files) ([guide](https://docs.repowise.dev/cli/other#repowise-delete)) |

Each command is documented in full on the pages in this section.
