# Settings and maintenance: config, doctor, telemetry, costs

Read and change any repowise setting, check an install with repowise doctor, control telemetry, read model spend, and manage release notes, grammars and plugins.

Commands that look after the install and its settings, not the index:
`config`, `doctor`, `telemetry`, `costs`, `whats-new`, `grammars` and
`plugins`.

## `repowise config`

Find, explain and change any setting. Every value is resolved the way the
code reads it, with where it came from: the default, the repo's
`config.yaml`, a per-user file, or an environment variable.

| Subcommand | What it does |
|---|---|
| `list` | Settings by area, with their values and where each came from |
| `get KEY` | One setting's value and where it came from |
| `explain KEY` | What one setting does, what it accepts, and how to change it |
| `set KEY VALUE` | Changes one setting; prints what changed, its effect and the undo command |
| `reset KEY` | Puts one setting back to its default |
| `hints on\|off` | Turns the occasional repowise.dev tip on or off |

```bash
repowise config list --changed          # settings off their default
repowise config list --suggested        # settings worth changing in this repository
repowise config get commit_limit
repowise config explain mcp.tools       # what one does and how to change it
repowise config set mcp.tools standard  # validate, write, print the undo command
repowise config reset mcp.tools
```

### `repowise config list`

| Name | Type | Default | Description |
|---|---|---|---|
| `--area` | string |  | Only this area: account, attribution, decisions, distill, editor, events, evidence, generation, health, hooks, indexing, mcp, providers, report, server. |
| `--changed` | boolean | `false` | Only settings not at their default. |
| `--suggested` | boolean | `false` | Only settings worth changing in this repository, with why and the command. |
| `--all` | boolean | `false` | Include debug and test settings. |
| `--path` | string | `.` | A path inside the repository. |
| `--format` | table \| json | `table` | Output format. |

### `repowise config get`, `explain`, `set`, `reset`

```bash
repowise config get KEY [--path PATH] [--format table|json]
repowise config explain KEY [--path PATH] [--format table|json]
repowise config set KEY VALUE [--path PATH] [--format table|json]
repowise config reset KEY [--path PATH] [--format table|json]
```

`set` reads VALUE as the setting's type: `true` or `false` for a switch, a
number, or `a,b` or `[a, b]` for a list (use `[a, b]` when an item holds a
comma). An invalid value is refused with what the setting accepts. Keys and
their defaults are on [Config keys](https://docs.repowise.dev/installation/config-reference).

### `repowise config hints`

At a moment where it would help (a finished `init`, a slow `update`, `ask`
with no model key), the CLI prints one dim line on stderr about what
repowise.dev adds, with a link. At most one per run, each at most once a
week. Never under `--format json`, in CI, when stderr is not a terminal, when
you are signed in, or from `mcp`, `serve`, `watch` and hooks.

```bash
repowise config hints off       # also: REPOWISE_NO_HINTS=1 or DO_NOT_TRACK=1
repowise config hints on
```

## `repowise doctor`

Checks the setup: git repo, `.repowise/` directory, database, `state.json`,
provider config, stale pages, store consistency (SQL, vector and full-text),
agent wiring and every setting. Run it first when something looks wrong.

```bash
repowise doctor [PATH] [OPTIONS]
```

| Name | Type | Default | Description |
|---|---|---|---|
| `--repair` | boolean | `false` | Attempt to fix detected mismatches. |
| `--workspace / -w` | boolean | `auto-detect` | Run the checks against every repo in the workspace. |
| `--no-workspace` | boolean | `false` | Force single-repo mode from a workspace root. |
| `--format` | table \| json | `table` | json is read-only (not with --repair) and exits 1 when any check fails. |
| `--quick` | boolean | `false` | Skip the slow checks: starting the MCP server and reconciling the vector and full-text stores. Not with --repair. |

```bash
repowise doctor
repowise doctor --repair
repowise doctor --format json
```

`--format json` prints `{"ok": bool, "checks": [...]}`. Each check carries a
stable `id` (such as `post-commit-hook` or `mcp-responds`), a display `name`, a
`level` (`ok`, `warn` or `fail`), a `detail` and a `fix`: the exact command that
resolves it, or `null`. Match on `id`, since names can change. A `warn` never
changes the exit code.

Agent setup rows:

| `id` | What it checks |
|---|---|
| `claude-code-mcp-entry` | The per-user entry in `~/.claude.json` (or the enabled plugin). An entry left only in `~/.claude/settings.json`, which Claude Code does not read for MCP servers, is a warning; `--repair` moves it |
| `claude-desktop-mcp-entry` | The repo the Claude Desktop entry serves, with a warning and the fix command when that path is gone |
| `agent-hook-scripts` | Every hook source (user settings, the Claude Code plugin, the repo's `.claude/settings.local.json` and `.codex/hooks.json`) can find its entry point. User hooks repin with `repowise agents refresh`; the others need the install's scripts directory on `PATH` |
| `agent-hooks-firing` | The Claude Code hooks ran: `last ran <date>`, or a warning when 3 or more sessions in this repo left no hook record |

Each wired agent's row also states the MCP tool surface it gets (profile,
tool count, a `--tools` pin, and always-load for Claude Code), and names both
entries when two server names launch the local repowise server for one agent.

Settings rows: every setting is checked against the settings registry. A
clean repository shows one `settings` row. A wrong type, an out-of-range
number or a bad environment variable fails its own row (`setting-<key>`, for
example `setting-decisions-mode`) with the key, the value, what it accepts and
the `repowise config set` or `reset` command that fixes it; an unknown key
warns with the closest real key. `--repair` resets bad file values to their
defaults.

Evidence rows (`coverage-evidence`, `runtime-evidence`, also under `--quick`)
say whether coverage and runtime evidence are stored, the commit each
measured, its age, and `current` or `stale` against HEAD. They never warn;
a row with nothing stored or a stale measurement names
`repowise coverage setup` or `repowise evidence setup` as its fix.

Doctor also reports index freshness and a stuck update lock, a missing vector
store when a real embedder is set, and, on an index built without a model, the
command that adds model-written documentation (`repowise generate --provider
claude_cli` when Claude Code is signed in on a paid plan, with a minute
estimate).

The `CLI version` row compares the installed CLI with the latest release on
[PyPI](https://pypi.org/project/repowise/) and prints the upgrade command for
your install method (`uv tool upgrade repowise`, `pipx upgrade repowise` or
`python -m pip install -U repowise`). It shows both the `repowise` on your
`PATH` and the one running the current process, which differ when an MCP
client runs a stale executable. The row is advisory: it never updates
anything, never fails `doctor` when PyPI is unreachable, and reports an
unparsable version as "unknown".

> **Note**
>
> After upgrading, restart Claude Code, Codex, Cursor or any MCP client so it
> starts the new executable.

## `repowise telemetry`

Inspect and control anonymous, opt-out usage telemetry. What is collected and
what never is: [Telemetry](https://docs.repowise.dev/reference/telemetry).

```bash
repowise telemetry status     # whether telemetry is enabled, and why
repowise telemetry disable
repowise telemetry enable
```

`REPOWISE_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1` in the environment also
turns it off.

## `repowise costs`

Model spend recorded during `init`, `update` and the other commands that call
a model.

```bash
repowise costs [PATH] [OPTIONS]
```

| Name | Type | Default | Description |
|---|---|---|---|
| `--since` | string |  | Only show costs since this date (ISO format, e.g. 2026-01-01). |
| `--by` | operation \| model \| day | `operation` | Group costs by operation, model or day. |
| `--repo-path` | string | `.` | Repository path. |
| `--repo` | string |  | Workspace repo alias to query (implies workspace mode). |
| `--all` | boolean | `false` | In workspace mode, sum costs across every repo instead of only the primary. |
| `--no-workspace` | boolean | `false` | Force single-repo mode from a workspace. |
| `--format` | table \| json | `table` | Output format. |

```bash
repowise costs
repowise costs --since 2026-01-01 --by model
repowise costs --repo backend --format json
repowise costs --all
```

## `repowise whats-new`

Release notes for versions you have not seen yet. By default it lists releases
newer than the last one you viewed, then records the current version as seen.
It works offline from the changelog bundled with the install.

| Name | Type | Default | Description |
|---|---|---|---|
| `--version` | string |  | Show notes for one release (e.g. 0.62.0). |
| `--all` | boolean | `false` | Show the full changelog history. |
| `--format` | table \| json | `table` | json carries each selected release with its summary, highlights and stats. |

```bash
repowise whats-new
repowise whats-new --version 0.62.0
repowise whats-new --all
```

`repowise update` shows a short what's-new panel after an upgrade, and
`update` and `serve` print a one-line notice when a newer release is
available. See [Upgrading](https://docs.repowise.dev/upgrading).

## `repowise grammars fetch`

Downloads the grammars that otherwise download on first use (COBOL, Apex)
into a directory, for a machine with no network. Copy the directory over and
set `REPOWISE_GRAMMAR_DIR` to it. Exits 1 if any grammar fails.

```bash
repowise grammars fetch ./grammars
```

## `repowise plugins`

Lists the plugins repowise loaded (from `repowise.plugins` entry points and
the `REPOWISE_PLUGINS` variable), whether each loaded or why it failed, the
seams each registered, and the implementation chosen for each named seam.

```bash
repowise plugins [--format table|json]
```

Each registration is listed as `kind:name`; a built-in seam whose import
fails is listed with the error. A plugin can add commands but never replaces
a built-in one. A seam switches implementation through `REPOWISE_SEAM_<NAME>`
(see [Environment variables](https://docs.repowise.dev/installation/env-vars#plugins-and-seams)).
A repository's `.repowise/.env` cannot select plugins or seams.

## Next

- [Configuration](https://docs.repowise.dev/installation/configuration) explains `config.yaml` and what gets indexed.
- [Config keys](https://docs.repowise.dev/installation/config-reference) lists every key `repowise config` can change.
- [Troubleshooting](https://docs.repowise.dev/getting-started/troubleshooting) starts from `repowise doctor` output.
