You do not have to set Repowise up by hand. Paste this into your coding agent:
Read https://docs.repowise.dev/setup.md and set up Repowise in this repository.
That page is a runbook written for agents. It works in Claude Code, Codex, Cursor, VS Code, OpenCode, Hermes, and any other agent that can fetch a URL and run shell commands.
What your agent will do
- Check for Python 3.11+ and a git repository, and install the CLI with
uv, pipx or pip if
repowise --versionfails. If the repo already has a.repowise/index, it runsrepowise statusand does not re-index. - Index the repo with
repowise init --yes --no-prose. This builds every layer and renders the documentation from the code's structure, with no model and no spend, even if an API key is set in your environment. - Connect itself: the right
initflags orrepowise agents addcommand for the host it is running in. - Ask you once whether to add an LLM and semantic search (below).
- Confirm the MCP tools are live by calling
get_overview, and runrepowise doctorif they are not. - Report back with the architecture, the top hotspots, and the health findings worth acting on.
What it asks
Everything works keyless. The agent then recommends two additions and asks once:
- An LLM.
get_answerwrites cited answers instead of returning ranked evidence, the docs explain why the code is shaped the way it is, and decisions are mined from the history. In Claude Code or Codex the agent offers your existing subscription (claude_cli,codex_cli,copilot_cli), so there is no API bill. With an API key it shows therepowise generate --dry-runestimate and spends nothing until you approve. It never asks you to paste a key into the chat. - Semantic search. Search and
get_answermatch by meaning, not only by words. It needs a Gemini, OpenAI or OpenRouter key, or Ollama locally.
Say no to both and nothing leaves your machine. The graph, git history, code health, change risk and dead-code layers are the same either way.
If a key is already in your environment, the agent names it and still asks
before spending. Subscription providers (claude_cli, codex_cli,
copilot_cli, opencode) and local Ollama need no key. An agent CLI has no
embedder, so semantic search needs an embedder key of its own. The full provider list is in the
runbook.
Already installed?
If Repowise is on your machine and you only want the repo indexed:
Run `repowise init --yes --no-prose` in this repo. It needs no API key and
spends nothing. Then call get_overview and summarize what this codebase does.Install the plugin
The fullest setup is the plugin. One install wires the MCP server, six auto-activating skills, 18 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
Eight agent targets are wired end to end: repowise agents add --target=<id>
writes the MCP config and, where the host reads one, a managed instructions
file. The tier is derived from what a descriptor actually implements, not
declared:
| Agent | Tier | MCP | Hooks | Instructions | Transcripts | Attribution |
|---|---|---|---|---|---|---|
| Claude Code | Full | Yes | Yes | Yes | Yes | Yes |
| Codex CLI | Full | Yes | Yes | Yes | Yes | Yes |
| VS Code | Good | Yes | No | Yes | No | No |
| Cursor | Good | Yes | Yes | Yes | No | Yes |
| OpenCode | Good | Yes | No | Yes | No | No |
| Hermes | Good | Yes | No | Yes | No | No |
| GitHub Copilot CLI | Good | Yes | No | Yes | No | No |
| Kiro | Good | Yes | No | Yes | No | No |
Full means MCP tools, a managed instructions file, hook-level
interception of tool calls, and transcript mining after the fact. Good
means MCP tools and a managed instructions file where the host reads one,
without transcript mining: the agent can ask repowise questions, but
repowise sees little of what happens in between. Cursor also gets a
preToolUse distill hook and an afterFileEdit hook. Attribution means
repowise can record the agent's edits as they happen, an opt-in set by
attribution.capture (see
repowise attribution); every
agent's git-ai notes, Agent Trace files and commit trailers are read either
way. Target ids for --target=: claude-code, codex, vscode, cursor,
opencode, hermes, copilot, kiro.
codex mcp add repowise -- repowise mcpOr wire the project up properly, which also writes .codex/hooks.json and
a managed AGENTS.md:
repowise init --codexrepowise agents add --target=cursorThis writes a project-local .cursor/mcp.json (Cursor does not read
~/.cursor/mcp.json reliably, since one global entry can only name one
repo) plus a managed .cursor/rules/repowise.mdc that Cursor loads on
every conversation. The .cursor/mcp.json entry needs a type: "stdio"
field that the shared .mcp.json does not carry, so hand-copying the repo
root config here silently breaks it:
{
"mcpServers": {
"repowise": {
"type": "stdio",
"command": "repowise",
"args": ["mcp", "/path/to/your/project"]
}
}
}Remove it with repowise agents remove --target=cursor.
repowise agents add --target=opencodeRegisters the server under the mcp key (not mcpServers) in
opencode.jsonc, with each server's invocation as a single command
array rather than command + args, and adds a managed section to
AGENTS.md. By default this writes both the repo-local pair and the
per-machine pair under $XDG_CONFIG_HOME/opencode (falling back to
~/.config/opencode), including on Windows: OpenCode does not read
%APPDATA%. Pass --scope=project or --scope=user for just one.
AGENTS.md is shared with Codex and Hermes. All three read the same
file and manage the same marker-delimited section.
repowise agents add --target=hermesHermes reads one config.yaml per machine, so the MCP server is
registered there and serves every repo it's launched in:
%LOCALAPPDATA%\hermes\config.yaml on Windows, ~/.hermes/config.yaml
everywhere else, or $HERMES_HOME/config.yaml when that's set. Project
scope writes the managed AGENTS.md section Hermes loads per repo.
platform_toolsets.cli is an allowlist once it names anything.
Hermes exposes every enabled MCP server to the CLI by default, but the
moment that list names one server it becomes an allowlist and every
other server drops out. Repowise only adds itself there when the list
is already an allowlist, so it never turns a permissive config into a
restrictive one.
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.
Cline, Windsurf, Zed, Continue, Gemini CLI, JetBrains AI Assistant, Amp, and Claude Desktop all speak MCP without a dedicated repowise target. Print the server entry and paste it into whatever config the host reads:
repowise agents print-config claude-codeOr point the client at repowise mcp, run from the repo directory, over
stdio:
{
"mcpServers": {
"repowise": {
"command": "repowise",
"args": ["mcp", "/path/to/your/project"]
}
}
}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 builds the documentation from code and exits 0. |
--yes skips the plan screen and every question | Each answer takes its default. With a key in the environment, init --yes writes documentation with a model and accepts the cost. A logged-in Claude Code, Codex or OpenCode is used only with --provider. Index with --yes --no-prose first, then preview spend with repowise generate --dry-run. |
| Exit codes carry the outcome | 0 ready, 2 finished with gaps (the last line names the command that fills them), 130 interrupted (repowise init --resume). |
--progress json is for parsing | One JSON event per line on stdout, human text on stderr, ending on a summary line with status, mode, spend and next. Schema: Driving init from an agent. |
| No prompt when stdin is not a TTY | Nothing hangs waiting for input. A generate or update --full over the cost threshold with no terminal and no --yes stops with an error naming --yes instead of spending. |
| Unanswerable prompts degrade | If the plan screen 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 "". |
--prose asks for prose, --no-prose skips it | On init, --prose without a resolvable key falls back to documentation built from code with a notice (it only errors when an explicit --provider fails to resolve). --no-prose never needs a key and makes no model calls, even with a key set. |
--mode fast is Index only | It builds no documentation. Do not reach for it unless the repo is very large; repowise update --full finishes it with no key. |
Repowise also writes a managed block into .claude/CLAUDE.md and AGENTS.md
during init, so agents that read those files get the tool guidance without
any MCP call at all. The block is lean by default (date and commit, the files
that need care, one code-health line, the top three decisions, three working
bullets and the tool table), and
editor_files.sections
adds sections back.
Machine-readable docs
This documentation site serves itself in agent-friendly form:
| Endpoint | What you get |
|---|---|
docs.repowise.dev/setup.md | The agent setup runbook as Markdown. |
Any page URL plus .md | That page as clean Markdown, for example docs.repowise.dev/cli/indexing.md. The docs home is /index.md. |
Any page URL with Accept: text/markdown | The same Markdown, from the page's own URL. |
docs.repowise.dev/llms.txt | The index: every docs page, titled and linked, in one small file. |
docs.repowise.dev/llms-full.txt | Every docs page as Markdown in one document, code blocks and tables included. |
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's .md,
or take llms-full.txt when you want everything at once. Every page also has
a Copy page control at the top, which copies its Markdown or opens it in
Claude or ChatGPT.
What to do next
Skim the MCP tools so you know what your agent can ask for.
Keep the index current. init --yes already installed a post-commit hook;
Auto-sync covers the other options.
If the free index proved useful, upgrade the wiki to model-written prose
with repowise generate.