> ## 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.

# Cline

> Configure Cline's shared compatible provider file with manual IDE verification.

Configure Cline's shared compatible provider file with manual IDE verification.

Support level: `preview`.

<Note>
  This preview writes only `providers.json` with a literal API key. Connect could not confirm its paths, schema, selectors, authentication and helper resolution, `globalState`/Plan/Act precedence, model metadata fallback, CLI flags or restoration after native saves against the current Cline documentation; check the [configuration guide](https://docs.cline.bot/getting-started/config) and [CLI reference](https://docs.cline.bot/cli/cli-reference) before relying on it.

  `on` requires `--preview`. Preview is not a dry run: it writes settings and sends a request using credits. Confirm Cline's behavior separately.
</Note>

## Connect Cline

Have Cline installed, a workspace API key, and available RunInfra credits. Close all Cline processes and windows before applying or restoring settings.

```bash theme={"dark"}
npx @runinfra/connect cline --preview
```

The bare agent command is an alias for `on`. In an interactive terminal, Connect starts login if needed. Review and approve the proposed changes. Connect saves a snapshot, writes the provider file, and makes a real Chat Completions request that uses credits.

To choose a model during setup:

```bash theme={"dark"}
npx @runinfra/connect cline on --model deepseek-v4-flash --preview
```

See [Connect](/docs/tools-sdks/connect) for status, diagnostics, and key replacement.

## What Connect writes

| Platform        | Connect's default target                            |
| --------------- | --------------------------------------------------- |
| macOS and Linux | `~/.cline/data/settings/providers.json`             |
| Windows         | `%USERPROFILE%\.cline\data\settings\providers.json` |

Connect resolves home in this order: `HOME`, `USERPROFILE`, `HOMEDRIVE` plus `HOMEPATH`, then the operating system home directory. A nonempty `HOME` takes precedence over the Windows target above.

Connect's provider path uses the first applicable override:

1. `CLINE_PROVIDER_SETTINGS_PATH`, the full provider-file path.
2. `CLINE_DATA_DIR/settings/providers.json`.
3. `CLINE_DIR/data/settings/providers.json`.
4. `.cline/data/settings/providers.json` under the resolved home directory.

Connect requires absolute paths without control characters or surrounding whitespace. It refuses conflicting case-insensitive Windows variable names. `CLINE_PROVIDER_SETTINGS_PATH` does not prove that VS Code uses that file. Connect checks the extension data directory independently. Confirm the file Cline actually uses. Keep the same path environment for `off`.

Connect writes the `providers.openai-compatible` entry in a version-1 envelope. Its `settings` use `provider: openai-compatible`, `protocol: openai-chat`, `client: openai-compatible`, `baseUrl: https://api.runinfra.ai/v1`, and the selected catalog model id. It sets `lastUsedProvider` to `openai-compatible` and adds an empty `modes` object when absent. Unrelated providers are preserved.

### Key placement

Literal mode is the only supported mode. Connect stores the key in `providers.openai-compatible.settings.apiKey` and sets `tokenSource` to `manual`. It refuses helper mode without writing an environment reference or credential command. Connect puts no key in command arguments or hints.

Connect could not confirm these saved credential fields, authentication precedence, generic OpenAI environment overrides, helper resolution, keychain behavior or credential rotation against the current Cline documentation; check the [compatible-provider guide](https://docs.cline.bot/provider-config/openai-compatible) and [authentication implementation](https://github.com/cline/cline/blob/main/sdk/packages/core/src/auth/provider-auth-registry.ts) before relying on it.

## Verify

Connect prints manual follow-up guidance, not a Cline diagnostic command. Its API probe does not prove CLI or VS Code activation.

1. Select **OpenAI Compatible** in Cline.
2. Check the API key and `/v1` base URL using the [compatible-provider guide](https://docs.cline.bot/provider-config/openai-compatible).
3. Confirm CLI routing and VS Code Plan/Act selection separately.
4. Check the [CLI reference](https://docs.cline.bot/cli/cli-reference) for a supported diagnostic.

Use an authorized isolated environment for testing. Confirm the actual request destination and model. Explicit CLI selection does not prove saved Plan/Act selection or VS Code activation. A no-tools prompt is not a permission boundary.

## Restart

Close all Cline processes and windows before applying changes. Restart Cline afterward. Confirm CLI routing and VS Code Plan/Act selection separately.

## Known behaviours

Connect writes only `providers.json`. Review `globalState.json`, `secrets.json`, Plan/Act choices, and task, session, or remote policy for competing settings. Use Cline's supported controls. Check VS Code separately.

Connect reads legacy state, secrets, and model metadata as guards without changing them. It writes only the selected catalog model id. It does not create `settings/models.json`, supply context, output, or capability metadata, or migrate old Plan/Act Info metadata. Check fallback metadata in both CLI and IDE before real workloads. Do not treat fallback values as confirmed RunInfra capacity.

The managed entry's `updatedAt` is an ISO UTC stamp from planning when that entry changes. An unchanged replan retains the existing timestamp bytes. The stamp is not the exact file-write time.

Close stale Cline processes before changing settings. Review `globalState.json`, `secrets.json`, and `models.json` after native saves or migration. One-file restoration does not restore those other files.

Connect could not confirm current parser tolerance, required fields, model-id and selector rules, metadata fallback or migration, competing-setting precedence, restart behavior or native save effects against the current Cline documentation; check the [configuration guide](https://docs.cline.bot/getting-started/config), [compatible-provider guide](https://docs.cline.bot/provider-config/openai-compatible), and [CLI reference](https://docs.cline.bot/cli/cli-reference) before relying on it.

## Troubleshooting

| Symptom                                      | What to check                                                                                                                                           |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Helper mode is refused                       | Use literal mode. Connect does not configure Cline helper keys.                                                                                         |
| Connect finds legacy state or model metadata | Review Plan/Act, OpenAI authentication, headers, and compatible-provider metadata through Cline before retrying. Connect does not migrate them.         |
| The shared compatible profile is refused     | Review foreign credentials, non-manual token sources, headers, and unsupported settings. The provider name alone does not establish RunInfra ownership. |
| The provider file is refused                 | Use strict JSON without a BOM, duplicate keys, comments, or trailing commas. Nonempty `modes` and unsupported envelope fields require manual review.    |
| A file override is refused                   | Do not target `globalState.json`, `secrets.json`, or `models.json`, including case or dot-segment aliases.                                              |

## Revert

Close all Cline processes and windows, then run:

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

With intact state and snapshots, `off` restores the original bytes from before the first `on` in the active connection. If the provider file did not exist then, Connect removes it. Later `on` calls and key rotations keep that restore point.

If Cline or another editor changed the file, Connect refuses to overwrite it. Back up and review the edits before choosing to discard them:

```bash theme={"dark"}
npx @runinfra/connect cline off --force
```

Connect saves the current contents in a recovery snapshot and prints its id before restoring the origin. Keep the snapshots. Without the origin snapshot, cleanup targets only positively owned `apiKey` fields. It does not restore original bytes or remove selectors, metadata, or other files. See [Connect recovery](/docs/tools-sdks/connect#what-off-restores).

Restoring `providers.json` does not restore legacy state, secrets, or model metadata. Check CLI and VS Code selection separately after restart. Check Windows file permissions, streams, tools, and credential rotation in the installed app.

## 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>
