Skip to content
Development
Command

/init

Set up Repowise for this codebase. Installs if needed, asks about your preferences, and runs the indexing.

From plugin
repowise
8.1k17 skills17 commands1 MCP
> /plugin marketplace add repowise-dev/repowise
> /plugin install repowise@repowise

Command definition

init.md
description: Set up Repowise for this codebase. Installs if needed, asks about your preferences, and runs the indexing.
allowed-tools: Bash(repowise --version), Bash(repowise init:*), Bash(repowise status:*), Bash(repowise update:*), Bash(git rev-parse --git-common-dir), Bash(uv tool install repowise), Bash(pipx install repowise), Bash(pip install repowise), Bash(python -m pip install repowise), Read, AskUserQuestion

Repowise Init

You are helping the user set up Repowise for their codebase. Follow this sequence precisely.

Step 1: Check if repowise is installed

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, or you can install it yourself."

If they want you to install it, use the first installer that works: `uv tool install repowise`, then `pipx install repowise`, then `python -m pip install repowise`. Each one includes every LLM provider SDK.

After install, verify with `repowise --version`. If the shell still says `command not found`, the user runs `uv tool update-shell` or `pipx ensurepath` and opens a new shell.

If repowise IS found, print the version and move to Step 2.

Step 2: Check if this repo is already indexed

If the project root has no `.repowise/` directory, move to Step 3.

If it has one, run `repowise status --format json` and act on what it says:

  • **Incomplete** (`incomplete` is set): a previous run stopped part way. Offer

`repowise init --resume` with the flags of the original run (`--no-prose` for a run built from code).

  • **Index only** (`upgrade_command` is set): the repo was indexed with

`--mode fast` and has no documentation yet. Offer `repowise update --full`. It needs no API key: without a model it builds the documentation from code and backfills the full git history, reusing the index.

  • **Otherwise** the index is ready: "This repo is already indexed by Repowise.

Run `/repowise:status` to check health, or `/repowise:update` to refresh." Re-index from scratch with `repowise init --force` only if the user asks.

Do not continue to Step 3 unless the user asks to re-index.

Step 3: Offer the mode, but do not block on it

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 builds its documentation from code with no API key. I'll run `repowise init --yes --no-prose` unless you want to pick:

1. **Built from code** (default, no key): the full index, health, dead code, and documentation built from code. No model calls, no cost. 2. **Written by a model**: a model writes the documentation and reads decisions from PRs, git history and code comments. Needs a provider, and shows the estimated cost before any model call. You can start with option 1 and add this later with `repowise generate`. 3. **Index only**: graph and essential git history, no documentation. For very large repos; `repowise update --full` adds the rest later. 4. **Show me the flags.**"

If the user does not answer, or you are running unattended, take option 1.

  • **Built from code:** skip provider selection. The command is

`repowise init --yes --no-prose`. Go to Step 3b.

  • **Written by a model:** go to Step 3b, then Step 4.
  • **Index only:** the command is `repowise init --yes --no-prose --mode fast`.

Go to Step 3b.

  • **Show me the flags:** print the reference below, then ask whether you

should build the command or they will.

repowise init [PATH]

Core flags:
  --provider NAME        LLM provider: anthropic, openai, gemini, openrouter,
                         deepseek, kimi, ollama, litellm, edenai, claude_cli,
                         codex_cli, opencode
  --model NAME           Model identifier override
  --prose / --no-prose   Documentation written by a model (--prose, needs a
                         provider) or built from code (--no-prose: no model
                         calls, whatever keys are set). Default: written by a
                         model when a key is available.
  --mode fast            Index only: graph and essential git, no documentation.
                         'repowise update --full' adds the rest later.

Embeddings:
  --embedder NAME        Embedder for semantic search: gemini, openai,
                         openrouter, ollama, edenai, mock (default: detected
                         from keys)

Cost control:
  --concurrency N        Max parallel LLM calls (default: 10)
  --test-run             Write documentation with the model for the top 10
                         files only, for a quick check
  --dry-run              Show the plan and cost estimate without running

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: 5000, max: 10000)
  --follow-renames       Track files across renames (slower but more accurate history)

Editor integration:
  --no-editor-setup      Write only .repowise/: no global MCP entry, no
                         Claude Code hooks, no project files (.mcp.json,
                         .claude/CLAUDE.md, .vscode/). See Step 3b.
  --hook / --no-hook     Install the post-commit hook that runs 'repowise
                         update' after each commit. Default: on (off with
                         --no-editor-setup). Undo with 'repowise hook uninstall'.

Keys:
  --no-save-key          Do not save the provider key to .repowise/.env
                         (for CI or a shared machine)

Output:
  --no-claude-md         Don't generate or update CLAUDE.md
  --progress json        One JSON event per line on stdout, ending with a
                         summary (status
Read more
@repowise-dev
Ships withrepowise

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

8.1k8 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8.1k
Star history of repowise-dev/repowise on GitHub, a chart by star-history.com

Other commands on repowise.

ask

ask

Command

Ask a codebase question and get a cited, synthesised answer with a confidence rating (costs an LLM call).

@repowise-dev@repowise-devInstall Command
context

context

Command

Triage card for files, modules, or symbols — layer, hotspot, fix history, freshness (relationships, not source bytes).

@repowise-dev@repowise-devInstall Command
coverage

coverage

Command

Ingest or inspect test-coverage reports (LCOV, Cobertura, Clover, Go cover profiles, JaCoCo, Salesforce Apex JSON, or repowise…

@repowise-dev@repowise-devInstall Command
decision

decision

Command

Work with architectural decisions — list, inspect health, add, or confirm auto-proposed decisions.

@repowise-dev@repowise-devInstall Command
doctor

doctor

Command

Diagnose the Repowise setup — install, API keys, index/store drift — and optionally repair it.

@repowise-dev@repowise-devInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command