# What repowise init writes, and how to undo it

Every file and directory repowise init writes in your repository and your home directory, how to skip each one, and how to remove all of it.

`repowise init` writes the index, a few agent files and two hooks. This page
lists each one with the flag that skips it and the command that removes it.
`init` never edits your `.gitignore`.

## Files in your repository

| Path | Why | Skip it | Remove it |
|---|---|---|---|
| `.repowise/` | The index: database, search store, `config.yaml`, run state, `mcp.json` and the repo report under `.repowise/reports/` | Always written (it is the index) | `repowise uninstall --all` |
| `.repowise/.env` | The provider key a run authenticated with, so the MCP server can answer later. Kept out of git by a rule in `.repowise/.gitignore` | `--no-save-key`, or index with no key | `repowise uninstall --all` |
| `.claude/CLAUDE.md` | A managed block telling Claude Code to call Repowise first | `--no-claude-md` | `repowise uninstall --keep-index` |
| `.mcp.json` | Project MCP entry for Claude Code, written only when the per-user entry (or the Repowise plugin) does not serve this repository | `--no-editor-setup` | `repowise uninstall --keep-index` |
| `.vscode/mcp.json`, `.vscode/extensions.json` | VS Code MCP entry and the Repowise extension recommendation | `--no-editor-setup` | `repowise uninstall --keep-index` |
| `.github/copilot-instructions.md` | A managed block for Copilot Chat in VS Code | `--no-editor-setup` | `repowise uninstall --keep-index` |
| `AGENTS.md` | A managed block for Codex and other AGENTS.md hosts, written with `--codex` or `--agents` | `--no-agents` | `repowise uninstall --keep-index` |
| `.codex/config.toml`, `.codex/hooks.json` | Codex MCP entry and hooks, written only with `--codex` | Leave out `--codex` | `repowise uninstall --keep-index` |
| `.git/hooks/post-commit` | Runs `repowise update` after each commit | `--no-hook` | `repowise hook uninstall` |

Managed files hold a fenced Repowise block or a `repowise` server entry; the
rest of the file stays yours, and removal takes out only the Repowise part.
`--no-editor-setup` (or `REPOWISE_SKIP_EDITOR_SETUP=1`) skips every row except
`.repowise/`, for CI, sandboxes or a trial run. Other hosts get their own files
from `repowise agents add`; see [Agents](https://docs.repowise.dev/cli/agents).

## Files outside your repository

| Path | Why | Skip it | Remove it |
|---|---|---|---|
| `~/.claude.json` (`mcpServers.repowise`) | One per-user Claude Code entry that names no repo and serves every repository Claude Code opens. Not written when the Repowise plugin is enabled | `--no-editor-setup` | `repowise uninstall --keep-index` |
| `~/.claude/settings.json` | Claude Code hooks: context and freshness hooks, plus the distill rewrite hook | `--no-distill-hook` for the rewrite hook, `--no-editor-setup` for all | `repowise uninstall --keep-index`, or `repowise hook rewrite uninstall` for the rewrite hook |
| `claude_desktop_config.json` | Claude Desktop MCP entry, only when Claude Desktop is installed | `--no-editor-setup` | `repowise uninstall --keep-index` |
| `~/.repowise/` | Machine-wide state shared by every repository: login, caches, the downloaded dashboard | Always written | `repowise uninstall --all` |

## Keeping files out of git

`init` never touches `.gitignore`. Some of its files are specific to one
machine: `.claude/CLAUDE.md`, `.github/copilot-instructions.md`,
`.vscode/mcp.json` and `.vscode/extensions.json`. When they are untracked and
not already ignored, the plan screen offers to keep them out of git. Accept,
and `init` adds them to `.git/info/exclude` under a `# repowise
(machine-specific)` header: that file is local to your clone and invisible to
your team. `.mcp.json` and the other agents' configs stay shareable.

## Undo

See exactly what would be removed, changing nothing:

```bash
repowise uninstall --dry-run
```

Remove the agent wiring and the generated blocks, and keep the index (the
reinstall case):

```bash
repowise uninstall --keep-index
```

Remove everything, including the repository's `.repowise/` index and the
machine-wide `~/.repowise/`:

```bash
repowise uninstall --all
```

Remove only the post-commit hook:

```bash
repowise hook uninstall
```

With a terminal and no flags, `repowise uninstall` lists everything and asks
what to remove. `uninstall` leaves the package itself to its installer, so
finish with the command that matches how you installed it:

```bash
uv tool uninstall repowise
```

```bash
pipx uninstall repowise
```

```bash
pip uninstall repowise
```

Lines `init` added to `.git/info/exclude` stay; delete the `# repowise
(machine-specific)` block by hand if you want them gone.

## Next
- [Uninstall reference](https://docs.repowise.dev/cli/uninstall) for every flag and the JSON output.
- [Hooks](https://docs.repowise.dev/intelligence/hooks) for what each agent hook does.
- [Local quickstart](https://docs.repowise.dev/getting-started/quickstart) to set it up again.
