> ## Documentation Index
> Fetch the complete documentation index at: https://runinfra.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Crush

> Follow manual Crush setup steps; Connect writes no executable configuration.

Follow manual Crush setup steps without writing executable configuration.

Support level: `manual`.

<Note>
  Connect writes nothing for Crush. The command prints manual steps without login, configuration changes, or an API request. Confirm the app's settings and request destination yourself.
</Note>

## Connect Crush

Print the manual instructions:

```bash theme={"dark"}
npx @runinfra/connect crush
```

The printed instructions cover these seven steps:

1. Connect writes nothing for Crush. Native `crushrc` is Bash, and legacy `crush.json` fields are shell-resolved. Keep a backup before editing. Check `~/.config/crush/crushrc` on macOS and Linux or `%USERPROFILE%\.config\crush\crushrc` on Windows. Check `XDG_CONFIG_HOME` and `CRUSH_GLOBAL_CONFIG` for location overrides.
2. For legacy `crush.json` only, use `type: openai-compat` and `base_url: https://api.runinfra.ai/v1` in `providers.runinfra`. Review `api_key` before using `${RUNINFRA_API_KEY:?set RUNINFRA_API_KEY}` as its value. For native `crushrc`, use `--type openai-compat`, `--base-url`, and `--api-key` with an exported variable.
3. For legacy `crush.json`, confirm both `models.large` and `models.small` use provider `runinfra` and an exact RunInfra model id. Native model ids use `provider/model`. Press **Ctrl+L** to open the model picker. Confirm the intended model there.
4. Do not guess model limits or capabilities. Review the `--context-window` and `--default-max-tokens` limit flags before setting them. Empty `openai-compat` model lists auto-discover models. Explicit metadata takes precedence over discovered values.
5. Review project `.crushrc`, then `crushrc`, before the global native file. Check legacy `.crush.json` and `crush.json`, `CRUSH_GLOBAL_DATA`, and workspace `.crush` state for conflicting selections. Data files are application state, not configuration. Do not edit them by hand.
6. Restart the whole Crush process after reviewing configuration and permissions. Do not use `crush run` as an automatic verifier. Test only in an isolated disposable environment. Confirm the request destination separately.
7. To disconnect, undo only the provider, model, and credential changes you made. Alternatively, restore your reviewed backup without discarding later edits. Connect `off` does not manage Crush files. Keep a shared environment key if another app uses it. Removing it does not revoke it. Connect could not confirm the full legacy `crush.json` schema, `${RUNINFRA_API_KEY:?set RUNINFRA_API_KEY}` expansion, `models.large`/`models.small` selection, path and state precedence, discovery completeness, required metadata, parser and reload behavior, changes after saves or `crush run` permissions against the current Crush documentation; check the [configuration guide](https://github.com/charmbracelet/crush/tree/main/docs/config) and [run implementation](https://github.com/charmbracelet/crush/blob/main/internal/cmd/run.go) before relying on it.

## What Connect writes

Nothing. Connect does not generate a shell script, JSON configuration, model catalog, or key. Review the configuration yourself and keep your own backup.

Check `~/.config/crush/crushrc` on macOS and Linux or `%USERPROFILE%\.config\crush\crushrc` on Windows. Review `XDG_CONFIG_HOME` and `CRUSH_GLOBAL_CONFIG` before choosing the file to edit. Keep legacy `crush.json` fields separate from native Bash `crushrc` instructions.

Connect could not confirm the complete location override order, empty or relative override handling, or legacy-file precedence against the current Crush documentation; check the [configuration guide](https://github.com/charmbracelet/crush/tree/main/docs/config) before relying on it.

### Key placement

For legacy `crush.json` only, review this expression before using it as the provider's `api_key`:

```text theme={"dark"}
${RUNINFRA_API_KEY:?set RUNINFRA_API_KEY}
```

For native `crushrc`, use `--api-key` with an exported variable. Export `RUNINFRA_API_KEY` securely in Crush's launch environment. Connect does not write a reference or set the environment. Even legacy JSON `api_key` and `base_url` fields are shell-resolved. Review them as executable expressions.

Connect could not confirm the exact legacy expression's expansion, credential resolution or JSON `env` precedence against the current Crush documentation; check the [configuration guide](https://github.com/charmbracelet/crush/tree/main/docs/config) and [resolution implementation](https://github.com/charmbracelet/crush/blob/main/internal/config/resolve.go) before relying on it.

## Verify

Connect prints no automatic verification command. Confirm the selected model and actual request destination yourself.

<Warning>
  Do not use `crush run` as an automatic verifier. Review tool permissions before testing. Test only in an isolated disposable environment. Confirm the request destination separately.
</Warning>

A no-tools prompt is not a permission boundary. Confirm both large and small model selections during a separately authorized check.

Connect could not confirm current `crush run` permission behavior or an enforceable no-tools limit against the current Crush documentation; check the [run implementation](https://github.com/charmbracelet/crush/blob/main/internal/cmd/run.go) before relying on it.

## Restart

Restart the whole Crush process after reviewing your setup. Confirm both the large and the small model selection.

## Known behaviours

For native `crushrc`, use `--type openai-compat` and `--base-url` with `https://api.runinfra.ai/v1`. Review `models.large` and `models.small` only for legacy `crush.json`. Use the native **Ctrl+L** picker to confirm the intended `provider/model` selection.

Empty `openai-compat` model lists auto-discover models. Explicit metadata takes precedence over discovered values. Review `--context-window` and `--default-max-tokens` before setting limits. Do not guess metadata or copy limits from a different model.

Review project `.crushrc`, then `crushrc`, before the global native file. Check legacy files, `CRUSH_GLOBAL_DATA`, and workspace `.crush` state for conflicting selections. Do not hand-edit application state.

Connect could not confirm discovery completeness, startup timeout or provider removal, required legacy metadata, parser tolerance, state precedence, reload behavior or saved selections against the current Crush documentation; check the [configuration guide](https://github.com/charmbracelet/crush/tree/main/docs/config), [schema](https://github.com/charmbracelet/crush/blob/main/schema.json), and [resolution implementation](https://github.com/charmbracelet/crush/blob/main/internal/config/resolve.go) before relying on it.

## Troubleshooting

| Symptom                                           | What to check                                                                                                                                                               |
| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Connect prints steps instead of configuring Crush | This is manual support. Connect does not manage executable configuration.                                                                                                   |
| A discovered provider disappears                  | Review discovery and saved selections in the current configuration guide. Do not assume a particular startup timeout or complete metadata.                                  |
| Crush uses another model or credential            | Confirm the native picker or both legacy model slots. Review project files, workspace state, global data, and shell-resolved fields without hand-editing application state. |

## Revert

There are no Connect-written files or snapshots to restore for this manual setup. Undo only the provider, model, and credential changes you made. Alternatively, restore your reviewed backup without discarding later edits. Undo manual environment changes yourself. Keep a shared environment key if another app uses it. Removing a saved key does not revoke it. `off` and `off --force` do not manage Crush files.

## Related

<Columns cols={3}>
  <Card title="Connect" icon="plug" href="/docs/tools-sdks/connect">
    Set up, inspect, and restore your coding agent.
  </Card>

  <Card title="Chat completions" icon="braces" href="/docs/api-reference/chat-completions">
    Read the request contract.
  </Card>

  <Card title="Models" icon="list" href="/docs/api-reference/models">
    Find model ids and context windows.
  </Card>
</Columns>
