ask
Ask a codebase question and get a cited, synthesised answer with a confidence rating (costs an LLM call).
Set up Repowise for this codebase. Installs if needed, asks about your preferences, and runs the indexing.
> /plugin marketplace add repowise-dev/repowise > /plugin install repowise@repowise
How it fires
How this command gets triggered: by you, by Claude, or both.
/initContext preview
What this command does when you run it.
Set up Repowise for this codebase. Installs if needed, asks about your preferences, and runs the indexing.
description: Set up Repowise for this codebase. Installs if needed, asks about your preferences, and runs the indexing. allowed-tools: Bash, Read, Write, AskFollowupQuestion
You are helping the user set up Repowise for their codebase. Follow this sequence precisely.
Run: `repowise --version`
If the command fails or is not found, ask the user:
"Repowise isn't installed yet. I can install it for you. Which do you prefer?"
If they want you to install it, run `pip install repowise`. If that fails, try `python -m pip install repowise`.
After install, verify with `repowise --version`.
If repowise IS found, print the version and move to Step 2.
Check if `.repowise/` directory exists in the project root.
If it exists, tell the user: "This repo is already indexed by Repowise. Run `/repowise:status` to check health, or `/repowise:update` to refresh. If you want to re-index from scratch, I can run `repowise init --force`."
Then stop — do not continue to Step 3 unless the user asks to re-index.
If `.repowise/` doesn't exist, move to Step 3.
Repowise needs **no API key at all**. Never make a key a precondition for setting it up, and never stop and wait if you cannot get an answer.
Tell the user:
"Repowise indexes your repo and writes a complete wiki with no API key. I'll run `repowise init --yes` unless you'd rather pick:
1. **Default (no key)** — full index plus a wiki rendered from your code's structure. Free, fast, nothing to configure. 2. **Model-written wiki** — everything above, but an LLM writes the wiki prose instead of rendering it from structure, which also enables decision mining. Needs a provider key (Anthropic, OpenAI, Gemini, or Ollama locally). You can start keyless and upgrade any page later with `repowise generate`. 3. **Show me the flags.**"
If the user does not answer, or you are running unattended, take option 1.
Skip provider selection entirely. Construct:
repowise init --no-prose --yes
Jump to Step 3b.
Move to Step 3b, then Step 4.
Print the full flag reference:
repowise init [PATH]
Core flags:
--provider NAME LLM provider: anthropic, openai, gemini, ollama, litellm
--model NAME Model identifier override
--prose / --no-prose 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.
Default: prose when a key is available.
--mode fast Quick first pass on very large repos: no wiki at all.
Embeddings:
--embedder NAME Embedding provider: gemini, openai, openrouter, ollama,
edenai, mock (default: auto-detect)
Cost control:
--concurrency N Max parallel LLM calls (default: 10)
--test-run Limit to top 10 files by PageRank for quick validation
Exclusions:
-x, --exclude PATTERN Gitignore-style exclude patterns. Repeatable.
Example: -x 'vendor/**' -x 'generated/'
--skip-tests Skip test files
--skip-infra Skip infrastructure files (Dockerfile, Makefile, Terraform, shell)
Git:
--commit-limit N Max commits to analyze per file (default: 500, max: 10000)
--follow-renames Track files across renames (slower but more accurate history)
Editor integration:
--editor-setup / Wire repowise into your editors (default), or skip it
--no-editor-setup entirely. Covers both halves: the machine-wide config
(~/.claude/settings.json, Claude Desktop's config, the
Claude Code hooks, the distill rewrite-hook offer) and
the project-local files (.mcp.json, .claude/CLAUDE.md,
.vscode/mcp.json, .vscode/extensions.json). With
--no-editor-setup only .repowise/ is touched. There is
one 'repowise' MCP entry per machine-wide config, so a
later init from another repo repoints it. See Step 3b.
--hook / --no-hook Install the post-commit hook that runs 'repowise
update' in the background after each commit, so the
index does not go stale between sessions. Default: on.
--no-editor-setup keeps it off too, since a git hook
is a write outside .repowise/. Undo any time with
'repowise hook uninstall'.
Keys:
--save-key / Save the provider key this run authenticated with to
--no-save-key .repowise/.env (gitignored, owner-only). Default: on,
so the MCP server can answer later without the shell
that set it. Use --no-save-key in CI or on a shared
machine.
Output:
--no-claude-md Don't generate/update CLAUDE.md
-y, --yes Skip cost confirmation prompt
-v, --verbose Show per-phase internals plus debug logs (quiet by default)
Recovery:
--resume Resume a previously interrupted init
--force Re-index from scratch, overwriting existing .repowise/
Dry run:
--dry-run Show generation plan and cost estimate without runningThen ask if they want you to construct a command or if they'll handle it.
Every path reaches this step. It is about the repo, not the provider.
By default `init` registers repowise as the user's global MCP server, in `~/.claude/s
Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Repo: repowise-dev/repowise
Ask a codebase question and get a cited, synthesised answer with a confidence rating (costs an LLM call).
Triage card for files, modules, or symbols — layer, hotspot, fix history, freshness (relationships, not source bytes).
Ingest or inspect test-coverage reports — LCOV, Cobertura/Clover, or coverage.py .coverage (builds the per-test map when contexts are present).
Report unreachable files, unused exports, and zombie packages, tiered by confidence.
Work with architectural decisions — list, inspect health, add, or confirm auto-proposed decisions.
Diagnose the Repowise setup — install, API keys, index/store drift — and optionally repair it.