Canonical: https://weaveos.com/router/claude-code

[Home](https://weaveos.com/)/[Weave Router](https://weaveos.com/products/router)/Configure Claude Code with Weave Router

Claude Code setup · Sources checked October 16, 2026

# Configure Claude Code with Weave Router

Run npx @weave-os/router --claude to configure Claude Code. The installer manages Claude settings for the selected scope. Check Router status and reopen Claude Code so the new routing configuration takes effect.

[Read the full quickstart](https://weaveos.com/router/quickstart)[Read the guide ↓](https://weaveos.com/router/claude-code#article-how-do-you-install-the-claude-code-connection)

On this page

- [How do you install the Claude Code connection?](https://weaveos.com/router/claude-code#article-how-do-you-install-the-claude-code-connection)
- [What configuration changes?](https://weaveos.com/router/claude-code#article-what-configuration-changes)
- [How do you check routing and available models?](https://weaveos.com/router/claude-code#article-how-do-you-check-routing-and-available-models)
- [Can you use a self-hosted endpoint?](https://weaveos.com/router/claude-code#article-can-you-use-a-self-hosted-endpoint)
- [How do you return to direct routing?](https://weaveos.com/router/claude-code#article-how-do-you-return-to-direct-routing)
- [What if Claude Code still uses the previous connection?](https://weaveos.com/router/claude-code#article-what-if-claude-code-still-uses-the-previous-connection)
- [Sources](https://weaveos.com/router/claude-code#sources)

## How do you install the Claude Code connection?

With Claude Code available and the [quickstart prerequisites](https://weaveos.com/router/quickstart) met, run:

```bash
npx @weave-os/router --claude
```

The explicit `--claude` flag selects terminal installation for Claude Code. Complete the setup prompts for your endpoint and account, then inspect the result:

```bash
npx @weave-os/router status --claude
```

Quit and reopen Claude Code after setup or an on/off change. Claude Code reads its Router setting when it launches. An already-running session can retain the earlier setting.

## What configuration changes?

Choose where the installer manages Claude Code settings:

Scroll horizontally if needed →

| Scope   | Managed settings                          | How to select it                           |
| ------- | ----------------------------------------- | ------------------------------------------ |
| User    | `~/.claude/settings.json`                 | Default installation                       |
| Project | `.claude/settings.json` in the repository | Add `--scope project` from that repository |

For a project installation:

```bash
# Run from the repository you want to configure.
npx @weave-os/router --claude --scope project
npx @weave-os/router status --claude --scope project
```

Use the same scope when inspecting, disabling, or removing an installation. Review the managed settings and keep credentials out of version control. The installer documentation describes the current handling of plan credentials and keys; avoid copying secrets into a hand-written configuration example.

The Router configures a connection for Claude Code. It does not replace the editor, repository permissions, or tool permissions you choose in the client.

## How do you check routing and available models?

Use the terminal commands for an explicit client and scope:

```bash
npx @weave-os/router status --claude
npx @weave-os/router models --claude
```

Inside Claude Code, the installed commands include `/router-status` and `/router-models`. They inspect the configured Router connection and model roster. Editing enabled models requires credentials with the corresponding permission.

Weave routes each upstream request, or action. A Claude Code interaction can contain many actions, so the routed model can change while the overall task continues. The [semantics document](https://github.com/weave-os/router/blob/cbe758442460ca68db8f4fe9837db087c50cf1e5/docs/SEMANTICS.md) defines the distinction between a session, turn, and action.

## Can you use a self-hosted endpoint?

The installer supports local deployment and a custom base URL:

```bash
npx @weave-os/router --claude --local
npx @weave-os/router --claude --base-url https://router.example.com
```

The custom URL is an example. Use your actual deployment and follow its provider-key and access requirements. Self-hosted provider-key storage and hosted subscription access are different configurations. Do not infer the credential boundary of one from the other.

Use the [Router plans](https://weaveos.com/pricing/router) for current hosted offerings and the source repository for self-hosting requirements.

## How do you return to direct routing?

For a user-scope installation:

```bash
npx @weave-os/router off --claude
# Enable the saved Router connection again:
npx @weave-os/router on --claude
```

The installed `/router-off` and `/router-on` commands expose the same switch inside Claude Code. Quit and reopen the client after changing it. Disabling routing preserves the configuration for reuse.

To remove the installed configuration:

```bash
npx @weave-os/router --uninstall --claude
```

Include `--scope project` for a project installation. Recheck status and inspect the selected settings after removal.

## What if Claude Code still uses the previous connection?

First reopen the client. Then run status for the same scope used during installation and verify the endpoint. A project configuration and a user configuration can differ. Check reported account health before changing provider settings by hand.

If the problem persists, use the [current installer documentation](https://github.com/weave-os/router/tree/main/install/npm) and report the command, scope, client version, and redacted status output. Keep keys and tokens out of issue reports.

## Sources

- [Link Claude and Codex subscriptions](https://docs.weaveos.com/router/subscription-accounts)
- [Claude installer, settings, status, and uninstall documentation](https://github.com/weave-os/router/blob/cbe758442460ca68db8f4fe9837db087c50cf1e5/install/npm/README.md)
- [Router quickstart and self-hosting](https://github.com/weave-os/router/blob/cbe758442460ca68db8f4fe9837db087c50cf1e5/README.md)
- [Canonical action-level routing semantics](https://github.com/weave-os/router/blob/cbe758442460ca68db8f4fe9837db087c50cf1e5/docs/SEMANTICS.md)

## Check Claude Code setup scope

Choose user or project configuration and confirm status after reopening the client.

[Read the full quickstart](https://weaveos.com/router/quickstart)

## Related pages

- [Router quickstart ↗](https://weaveos.com/router/quickstart)
- [Configure Codex CLI ↗](https://weaveos.com/router/codex)
- [Router plans ↗](https://weaveos.com/pricing/router)

On this page

- [How do you install the Claude Code connection?](https://weaveos.com/router/claude-code#article-how-do-you-install-the-claude-code-connection)
- [What configuration changes?](https://weaveos.com/router/claude-code#article-what-configuration-changes)
- [How do you check routing and available models?](https://weaveos.com/router/claude-code#article-how-do-you-check-routing-and-available-models)
- [Can you use a self-hosted endpoint?](https://weaveos.com/router/claude-code#article-can-you-use-a-self-hosted-endpoint)
- [How do you return to direct routing?](https://weaveos.com/router/claude-code#article-how-do-you-return-to-direct-routing)
- [What if Claude Code still uses the previous connection?](https://weaveos.com/router/claude-code#article-what-if-claude-code-still-uses-the-previous-connection)
- [Sources](https://weaveos.com/router/claude-code#sources)
