Indexing: init, update, reindex
The three commands that build and maintain repowise's intelligence layers. init parses everything from scratch, update is incremental on each commit, reindex rebuilds the vector store without re-running the LLM.
repowise init
Generate the wiki for a codebase. Runs full AST parsing, graph analysis, git history indexing, dead-code detection, and page generation.
init never requires an API key. With a provider resolvable it writes
the wiki with a model; without one it renders the whole wiki from the
parsed structure and exits 0. See
Deterministic wiki.
repowise init [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--provider | string | — | LLM provider: anthropic, openai, openrouter, gemini, deepseek, ollama, litellm, codex_cli, opencode, mock |
--model | string | — | Model identifier override |
--embedder | string | — | Embedder for RAG: gemini, openai, openrouter, ollama, mock (auto-detect if unset) |
--mode | string | standard | Pipeline depth: standard, or fast (graph + essential-git only, and the one setting that produces no wiki at all; upgrade later with update --full) |
--skip-tests | boolean | false | Skip test files during indexing |
--skip-infra | boolean | false | Skip infrastructure files |
--dry-run | boolean | false | Show generation plan without running |
--yes / -y | boolean | false | Skip the cost-confirmation prompt |
--resume | boolean | false | Resume from the last checkpoint |
--force | boolean | false | Regenerate all pages, ignoring existing |
--concurrency | number | 10 | Max concurrent LLM calls |
--reasoning | string | auto | Reasoning mode for supported providers: auto, off/none, minimal, low, medium, high, xhigh, max |
--test-run | boolean | false | Limit to top 10 files by PageRank for validation |
--prose / --no-prose | boolean | prose if a key | Write the subsystem (concept) pages as model prose (--prose, needs a key), or render the whole wiki from structure with no model and no spend (--no-prose). Every other page is structural either way. Upgrade a --no-prose wiki later with generate or update --full |
--index-only / --docs | string | — | Deprecated hidden aliases. --index-only == --no-prose; --docs llm == --prose, --docs deterministic == --no-prose |
--exclude / -x | string | — | Gitignore-style pattern to exclude (repeatable) |
--commit-limit | number | 500 | Max commits per file. Cap is 10000. |
--follow-renames | boolean | false | Use git log --follow to track renames (slower) |
--no-claude-md | boolean | false | Skip generating .claude/CLAUDE.md |
--onboarding / --no-onboarding | boolean | true | Generate the curated Onboarding collection (up to 8 overview pages) |
--harvest-decisions / --no-harvest-decisions | boolean | true | Harvest architectural decisions during page generation (verified against source before storage) |
--wiki-style | string | comprehensive | Documentation voice/density: comprehensive, caveman, reference, tutorial |
--include-submodules | boolean | false | Include git submodule directories |
--all | boolean | false | In workspace mode, index every repo without prompting |
--no-workspace | boolean | false | Force single-repo mode even when invoked from a workspace root |
repowise init # current dir
repowise init /path/to/repo --provider anthropic
repowise init -x vendor/ -x 'src/generated/**' # multiple excludes
repowise init --yes # non-interactive; no key needed
repowise init --yes --no-prose # guarantee no spend
repowise init --prose --provider anthropic # write the subsystem pages as prose
repowise init --mode fast # very large repos, no wiki
repowise init --test-run # 10 files, smoke testCost gate. Before any tokens are spent, init shows the estimate and
asks. It never prompts when stdin is not a terminal: it auto-declines,
keeps the index it already built, and renders the wiki from structure
instead. The default answer is Yes up to $25 and flips to No above that,
because Enter-through approving a bill that size is a footgun.
Unanswerable prompts do not end the run. If the first interactive
prompt reads EOF, which is what happens when an agent pipes stdin, init
prints a notice and continues with defaults rather than aborting.
The canonical non-interactive command is repowise init --yes. It
needs no key, spends nothing without a provider configured, and exits 0.
Add --no-prose to guarantee no spend even when a key happens
to be present in the environment. This is what agents and CI should run.
The graph, git, dead-code, and code-health layers build in minutes with
zero LLM calls, and so does the wiki when you run keyless. The
one-time cost is the model-written documentation layer, which scales with
repo size and can run in the background. After that, each commit-triggered
update takes under 30 seconds. Interrupted a run? Re-run with --resume
to pick up from the last checkpoint.
repowise update
Incremental update for files changed since the last sync. Detects
changed files via git diff, re-parses them, rebuilds the affected
slice of the dependency graph, and regenerates the affected pages.
repowise update [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--provider | string | — | LLM provider name |
--model | string | — | Model identifier override |
--since | string | — | Base git ref to diff from (overrides stored state) |
--concurrency | number | 5 | Max concurrent LLM calls |
--cascade-budget | number | — | Max pages to regenerate (auto-scaled if unset) |
--dry-run | boolean | false | Show affected pages without regenerating |
--workspace / -w | boolean | false | Update every stale repo in the workspace |
--repo | string | — | Update only this repo alias within the workspace |
--index-only | boolean | false | Refresh the index only, skip doc regeneration for this run. In workspace mode, forces every stale repo to index-only |
--docs / --no-docs | boolean | — | Regenerate wiki pages for changed files, or skip doc regeneration entirely |
--full | boolean | false | Upgrade a fast (--mode fast) index to a full one: backfills git blame/co-change and generates the docs fast mode skipped. Single-repo only. |
--no-workspace | boolean | false | Force single-repo mode (handy when running from a workspace root) |
repowise update # incremental from current HEAD
repowise update --since main # diff against main
repowise update --workspace # all stale repos
repowise update --repo backend # one workspace repo
repowise update --dry-run # see what would regenerate
repowise update --full --provider anthropic # upgrade a fast index to fullA typical single-commit update touches 3 to 10 pages in under 30 seconds.
--full is also the wholesale way to write the subsystem prose across a wiki
that was indexed without a key. For a slice at a time, use
repowise generate below.
After a package upgrade, repowise update picks up the new version against
your existing index (no reindex in the normal case) and shows a short
"what's new" panel for the versions you crossed. It also prints a one-line,
non-blocking notice when a newer release is available. See
Upgrading for the full flow.
repowise generate
Write the subsystem (concept) pages with a model, on demand. This is the
upgrade path for a repo indexed without a key: it fills the subsystem stubs
with model prose, one page, one directory, or the whole concept layer at a
time, each behind a cost estimate, and rewrites already-written pages. It
writes only the model-written pages (the concept tree and the overview);
naming a structural page such as a file page is an error, since those refresh
on repowise update.
It reuses the persisted index. The graph and git metadata are rehydrated from SQL, so only the per-file parse and the generation for the pages you selected run. A provider is required here, and a missing one is an actionable error naming the key-setup path.
repowise generate [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--unwritten | boolean | false | Every subsystem page still on a stub. The default for a non-interactive run: 'finish writing the wiki' |
--all | boolean | false | Every subsystem page, stub or already written. Rewrites the prose |
--stale | boolean | false | Every subsystem page marked stale (its code changed since it was written) |
--path | string | — | Subsystem pages under a path prefix or glob, e.g. src/api (repeatable) |
--page | string | — | One explicit subsystem page id, e.g. module_page:src/api (repeatable). A structural page id is an error |
--cascade | string | dependents | What happens to pages that summarize a regenerated one: none, dependents, or full |
repowise generate # every unwritten subsystem page, one cost estimate
repowise generate --path src/api # just the subsystem pages under one directory
repowise generate --all # rewrite the prose on every subsystem pageSelection names which subsystem pages to write, combined as a union:
--unwritten / --all / --stale / --path / --page.
Run repowise generate with no selection flag on a terminal and it prints
the wiki's state and writes every unwritten subsystem page behind a single
cost estimate, asking about cascade only when it changes which pages get
written. Piped runs, --yes, and flagged runs stay non-interactive with the
same --unwritten default.
Cascade. Rewriting a subsystem page makes the pages that summarize it
drift: its layer page, plus the repo overview, architecture and onboarding
pages. --cascade none marks them stale, dependents (the default) also
regenerates the overview and layer pages that summarize it, and full leaves
nothing stale. The cost estimate includes the cascade fallout, so it does not
under-quote.
repowise reindex
Rebuild the vector search index from existing wiki pages. No LLM calls, only embedding API calls. Fast and cheap. Use when you switch embedders or suspect FTS/vector drift.
repowise reindex [PATH] [OPTIONS]| Parameter | Type | Default | Description |
|---|---|---|---|
--embedder | string | auto | Embedder: gemini, openai, openrouter, ollama, mock, auto (detect from env) |
--batch-size | number | 32 | Pages per embedding batch |
repowise reindex
repowise reindex --embedder openai --batch-size 50