Set up with your agent
Hand this page to Claude Code, Cursor, Codex, or any coding agent and it can install repowise, index the repo, and wire up MCP on its own. Includes copy-pasteable prompts, the Claude Code plugin, slash commands, skills, and machine-readable docs endpoints.
You do not have to set repowise up by hand. Your coding agent can do it, and the whole flow is designed so it can: no API key is required, nothing blocks on an interactive prompt, and every step exits 0 or tells you exactly what to run next.
Give this to your agent
Paste this into Claude Code, Cursor, Codex, or whatever you use. It is written for an agent to follow start to finish.
Set up Repowise in this repository so you can query it instead of grepping.
1. Check for the CLI with `repowise --version`. If missing, install it with
`pip install repowise` (or `python -m pip install repowise`).
2. If a `.repowise/` directory already exists, the repo is indexed. Run
`repowise status` and stop; do not re-index.
3. Otherwise run `repowise init --yes` from the repo root.
This needs NO API key. It parses the code, builds the dependency graph,
reads git history, scores code health, finds dead code, and renders a
complete wiki from that structure. It exits 0 with no provider configured.
Do not stop to ask me for a key. Do not treat a missing key as an error.
4. `init` registers the MCP server and writes `.mcp.json` itself. Restart
your MCP connection if needed, then confirm the repowise tools are live
by calling `get_overview`.
5. Tell me what you found: the architecture summary, the top hotspots, and
anything in the health report worth acting on.The one command that matters is repowise init --yes. It never
requires a key, never prompts when stdin is not a terminal, and produces a
full wiki either way. If you want a hard guarantee that the run spends
nothing even when a key happens to be in the environment, use
repowise init --yes --docs deterministic.
Shorter version
If the agent already has repowise installed and you just want the repo indexed:
Run `repowise init --yes` in this repo. It needs no API key and exits 0
without one. Then call get_overview and summarize what this codebase does.If you want the model-written wiki
Run `repowise init --yes` first so I have a working index at no cost. Then
show me what `repowise generate --coverage 20` would spend before running
it, and wait for my go-ahead.That order matters: the free index answers "is this useful on my codebase" before anything is spent. See Deterministic wiki.
Install the plugin
The fullest setup is the plugin. One install wires the MCP server, six auto-activating skills, ten slash commands, and the context hooks together:
/plugin marketplace add repowise-dev/repowise
/plugin install repowise@repowiseThere is a Codex plugin too. Both are covered in Agent plugins, including what each skill activates on and what the hooks do.
If you only want the MCP server and none of the rest:
claude mcp add repowise -- repowise mcpOr commit a project .mcp.json so your whole team picks it up:
{ "mcpServers": { "repowise": { "command": "repowise", "args": ["mcp"] } } }Other agents
codex mcp add repowise -- repowise mcpOr wire the project up properly, which also writes .codex/hooks.json and
a managed AGENTS.md:
repowise init --codexPoint the client at repowise mcp, run from the repo directory, over
stdio. Drop this into ~/.cursor/mcp.json, Cline's MCP settings, or the
equivalent file for your client:
{
"mcpServers": {
"repowise": {
"command": "repowise",
"args": ["mcp", "/path/to/your/project"]
}
}
}The Repowise extension registers the MCP
server for you and adds editor-native health signals, refactoring CodeLens,
and branch risk on top. Search Repowise in the Marketplace, publisher
repowise-dev.
What agents should know about the CLI
The behaviors that most often trip up an unattended run, all of them deliberate:
| Behavior | Why it matters to an agent |
|---|---|
init never requires an API key | A missing key is not an error condition. Without a provider it renders the wiki from structure and exits 0. |
| No prompt when stdin is not a TTY | The cost gate auto-declines rather than aborting, so it keeps the index it already built. Nothing hangs waiting for input. |
| Unanswerable prompts degrade | If the first interactive prompt reads EOF, init prints a notice and continues with defaults instead of ending the run. |
REPOWISE_PROVIDER="" means unset | An empty value in a CI matrix resolves to normal auto-detection, not a provider named "". |
--docs llm plus --index-only exits 2 | That is a usage error, not a runtime failure. Pass one or the other. |
--mode fast is the only wiki-less mode | Everything else produces a full wiki. Do not reach for it unless the repo is very large. |
Repowise also writes a CLAUDE.md (and AGENTS.md for Codex) into the
repo during init, so agents that read those files get the tool guidance
without any MCP call at all.
Machine-readable docs
This documentation site serves itself in agent-friendly form. Point a fetch tool at either endpoint:
| Endpoint | What you get |
|---|---|
docs.repowise.dev/llms.txt | The index: every docs page, titled and linked, in one small file. |
docs.repowise.dev/llms-full.txt | The full text of every docs page in one document. |
repowise.dev/llms.txt | The site-wide index: features, comparisons, guides, and blog. |
Start with llms.txt to find the right page, then fetch that page or fall
back to llms-full.txt when you want everything at once.
What to do next
Skim the ten MCP tools so you know what your agent can ask for.
Set up auto-sync so the index stays current on every commit without anyone thinking about it.
If the free index proved useful, upgrade the wiki to model-written prose
with repowise generate.
Quickstart
Install repowise, index your repo, and connect Claude Code in under a minute. Two paths, self-hosted (pip) or hosted (repowise.dev).
Agent plugins
The Claude Code and Codex plugins bundle the MCP server, lifecycle hooks, skills, and slash commands into one install. What each plugin ships, how to install it, and what activates when.