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 one question (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.
The one question it asks
No LLM, or an LLM for the documentation, and which provider?
- No LLM is free. The documentation is built from the index and nothing leaves your machine. The graph, git history, code health and dead-code layers are the same either way.
- An LLM writes documentation that explains why the code is shaped the
way it is. The agent tells you which environment variable to set for your
provider and waits. It never asks you to paste a key into the chat. It then
shows you the
repowise generate --dry-runcost estimate and spends nothing until you approve it.
If a key is already in your environment, the agent names it and still asks
before spending. Subscription providers (claude_cli, codex_cli) and local
Ollama need no key. 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
Six 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 |
|---|---|---|---|---|---|
| Claude Code | Full | Yes | Yes | Yes | Yes |
| Codex CLI | Full | Yes | Yes | Yes | Yes |
| VS Code | Good | Yes | No | No | No |
| Cursor | Good | Yes | No | Yes | No |
| OpenCode | Good | Yes | No | Yes | No |
| Hermes | Good | Yes | No | Yes | 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,
but no hook-level interception and no transcript mining: the agent can ask
repowise questions, but repowise cannot see or annotate what happens
in between. Target ids for --target=: claude-code, codex, vscode,
cursor, opencode, hermes.
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 renders the wiki from structure and exits 0. |
--yes skips the cost question | With a key in the environment, init --yes writes prose and spends without asking, and any estimate at or under $2.00 never asks at all. Index with --no-prose first, then preview spend with repowise generate --dry-run. |
| 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 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 "". |
--prose asks for prose, --no-prose skips it | On init, --prose without a resolvable key falls back to the structural wiki with a notice (it only errors when an explicit --provider fails to resolve). --no-prose never needs a key. |
--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 .claude/CLAUDE.md during init, and a managed
AGENTS.md with --codex or --agents, 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:
| 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.