# Connect your agent

Connect Claude Code, Cursor, Codex, VS Code, Copilot CLI, Windsurf, Kiro, OpenCode, Hermes, Claude.ai or ChatGPT to Repowise with one prompt or one command.

Your coding agent sets Repowise up for you. Paste one line into it and it
installs the CLI, indexes the repository, wires its own MCP client and asks
one question to confirm the tools answer.

## Set up with one prompt

For the open-source engine on your machine, with no account and no API key:

```text
Read https://docs.repowise.dev/setup.md and set up Repowise in this repository.
```

For Repowise Hosted, which indexes on every push and serves your team, the PR
bot, Claude.ai and ChatGPT from one index:

```text
Set up Repowise for this repository. Follow https://docs.repowise.dev/hosted/setup.md
```

Each link is a runbook written for agents: [local](https://docs.repowise.dev/getting-started/setup)
and [hosted](https://docs.repowise.dev/hosted/setup). Paste the same prompt again any time to
check the setup and finish what is missing.

## Every host

`repowise init` wires every agent it detects. `repowise agents add
--target=<id>` wires one later, and `repowise agents add --hosted` writes the
hosted entry instead of the local one.

| Host | Page | Target id | Local | Hosted |
|---|---|---|---|---|
| Claude Code | [Claude Code](https://docs.repowise.dev/agents/claude-code) | `claude-code` | Yes | Yes, OAuth |
| Claude.ai and Claude desktop | [Claude connector](https://docs.repowise.dev/agents/claude-connector) | none | No | Yes, custom connector |
| ChatGPT | [Claude connector](https://docs.repowise.dev/agents/claude-connector#chatgpt) | none | No | Yes, custom MCP app |
| Cursor | [Cursor](https://docs.repowise.dev/agents/cursor) | `cursor` | Yes | Yes, plugin or OAuth |
| Codex CLI | [Codex](https://docs.repowise.dev/agents/codex) | `codex` | Yes | Yes, OAuth |
| VS Code (Copilot Chat) | [VS Code and Copilot](https://docs.repowise.dev/agents/vscode-copilot) | `vscode` | Yes | Yes, OAuth |
| GitHub Copilot CLI | [Copilot CLI](https://docs.repowise.dev/agents/copilot-cli) | `copilot` | Yes | By hand, API key |
| Windsurf | [Windsurf](https://docs.repowise.dev/agents/windsurf) | `windsurf` | Yes | Yes, OAuth |
| Kiro | [Kiro](https://docs.repowise.dev/agents/kiro) | `kiro` | Yes | By hand, API key |
| OpenCode | [OpenCode](https://docs.repowise.dev/agents/opencode) | `opencode` | Yes | Yes, OAuth |
| Hermes | [Hermes](https://docs.repowise.dev/agents/hermes) | `hermes` | Yes | By hand, API key |

Any other MCP client works too. Print the local server entry and paste it
into the config the host reads:

```bash
repowise agents print-config claude-code
```

Or point the client at `repowise mcp /path/to/your/project` over stdio. For
hosted, any client that speaks Streamable HTTP takes the URL and an
`Authorization: Bearer` header ([API keys](https://docs.repowise.dev/hosted/connecting-ide#advanced-api-keys)).

## Support tiers

`repowise agents` lists each host with a tier derived from what repowise can
do there:

| Tier | Hosts | What the agent gets |
|---|---|---|
| Full | Claude Code, Codex CLI | MCP tools, a managed instructions file, hooks on tool calls, and transcript reading for hook stats and savings |
| Good | Cursor, VS Code, OpenCode, Hermes, GitHub Copilot CLI, Kiro | MCP tools and a managed instructions file (Cursor also gets a command-rewrite hook) |
| Basic | Windsurf | MCP tools |

## What the agent gets

- **Ten MCP tools.** `get_overview`, `get_answer`, `get_context`,
  `get_symbol`, `search_codebase`, `get_risk`, `get_why`, `get_health`,
  `get_dead_code` and `get_change_risk`. Claude Code lists all ten. Clients
  that send every schema on every turn list five by default; one setting lists
  all ten ([Tool profiles](https://docs.repowise.dev/agents/tool-profiles)).
- **Hooks.** In Claude Code and Codex, context arrives without a tool call:
  index freshness at session start, graph context on searches, decisions at
  edit time, and noisy commands compressed through
  [distill](https://docs.repowise.dev/cli/distill). See [Hooks](https://docs.repowise.dev/intelligence/hooks).
- **Skills.** The [Claude Code and Codex plugins](https://docs.repowise.dev/getting-started/plugins)
  add seven skills that pick the right tool at the right moment; the Cursor
  plugin adds one.
- **A managed instructions block.** `CLAUDE.md`, `AGENTS.md`,
  `.github/copilot-instructions.md`, `.cursor/rules/repowise.mdc` or
  `.kiro/steering/repowise.md`, holding about 250 tokens: call a Repowise tool
  first, and one line per moment (before a rename, before editing, before
  finishing). It names only the tools that client lists.

## What an unattended run needs to know

| Behavior | Why it matters to an agent |
|---|---|
| `init` never requires an API key | Without a provider it builds the documentation from code and exits 0. |
| `--yes` takes every default | With a provider key in the environment, `init --yes` writes documentation with a model and accepts the cost. `init --yes --no-prose` makes no model calls whatever keys are set. |
| 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, ending on a `summary` line with `status`, `mode`, `spend` and `next`. See [Driving init from an agent](https://docs.repowise.dev/cli/indexing#driving-init-from-an-agent-or-script). |
| No prompt without a TTY | Nothing waits for input. A spend over the cost threshold with no terminal and no `--yes` stops with an error naming `--yes`. |

## Docs in Markdown

| Endpoint | What you get |
|---|---|
| [`docs.repowise.dev/setup.md`](https://docs.repowise.dev/setup.md) | The local setup runbook |
| Any page URL plus `.md` | That page as Markdown, for example [`docs.repowise.dev/cli/indexing.md`](https://docs.repowise.dev/cli/indexing.md) |
| Any page URL with `Accept: text/markdown` | The same Markdown from the page's own URL |
| [`docs.repowise.dev/llms.txt`](https://docs.repowise.dev/llms.txt) | Every docs page, titled and linked |
| [`docs.repowise.dev/llms-full.txt`](https://docs.repowise.dev/llms-full.txt) | Every docs page as Markdown in one document |

## Next
- [Claude Code](https://docs.repowise.dev/agents/claude-code) for the most common setup.
- [Tools by question](https://docs.repowise.dev/agents/tools-by-question) to see which tool answers what.
- [Tool profiles](https://docs.repowise.dev/agents/tool-profiles) to list more or fewer tools.
- [repowise agents](https://docs.repowise.dev/cli/agents) for every flag.
