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

# Command reference

> Common Rye CLI commands for setup, supervision, diagnostics, audit, config, and upgrades.

Run `rye --help` for the full CLI surface.

Most commands support `--json` for scripting when the output is state-oriented.

## Setup and auth

| Command               | Purpose                                     |
| --------------------- | ------------------------------------------- |
| `rye version`         | Print the installed Rye version.            |
| `rye auth login`      | Start device-code login.                    |
| `rye auth status`     | Show current login state.                   |
| `rye auth logout`     | Revoke and clear local credentials.         |
| `rye upgrade`         | Upgrade to the latest stable release.       |
| `rye upgrade VERSION` | Upgrade or downgrade to a specific release. |

## Daemon and proxy

| Command                                                | Purpose                                               |
| ------------------------------------------------------ | ----------------------------------------------------- |
| `rye up`                                               | Start the daemon-managed proxy.                       |
| `rye up --install-ca`                                  | Start the proxy and install the Rye CA.               |
| `rye up --listen 127.0.0.1:19090`                      | Start on a custom address.                            |
| `rye up --intercept-patterns openai.com,anthropic.com` | Override intercepted domains.                         |
| `rye up --intercept-all`                               | Intercept all proxy traffic.                          |
| `rye up --auto-configure-proxy`                        | Configure the system proxy.                           |
| `rye up --auto-configure-proxy-pac`                    | Configure a macOS PAC file for matching domains only. |
| `rye down`                                             | Stop the proxy and restore proxy settings.            |
| `rye status`                                           | Show daemon, proxy, policy, and device state.         |

## Daemon management

| Command                       | Purpose                                            |
| ----------------------------- | -------------------------------------------------- |
| `rye daemon start`            | Start `ryed`.                                      |
| `rye daemon status`           | Show daemon PID, uptime, version, and socket path. |
| `rye daemon restart`          | Restart `ryed`.                                    |
| `rye daemon stop`             | Stop `ryed`.                                       |
| `rye daemon logs --lines 100` | Print daemon logs.                                 |
| `rye logs --lines 100`        | Alias for daemon logs.                             |

## Diagnostics

| Command             | Purpose                                                                             |
| ------------------- | ----------------------------------------------------------------------------------- |
| `rye doctor`        | Check auth, daemon, CA, proxy, DNS, gRPC, and app shim setup.                       |
| `rye doctor --fix`  | Apply safe local fixes, including shell profile proxy and CA environment variables. |
| `rye ca install`    | Install the Rye CA into the system trust store.                                     |
| `rye ca path`       | Print the Rye CA certificate path.                                                  |
| `rye ca regenerate` | Generate a new CA keypair.                                                          |

## Wrapping and shims

| Command                       | Purpose                                                             |
| ----------------------------- | ------------------------------------------------------------------- |
| `rye wrap claude`             | Run one Claude Code session under Rye supervision.                  |
| `rye wrap codex`              | Run one Codex CLI session under Rye supervision.                    |
| `rye wrap --exec claude`      | Inject proxy variables and replace the process without supervision. |
| `rye wrap --tee claude`       | Run with piped stdout and stderr without a PTY.                     |
| `rye app wrap claude codex`   | Install persistent app shims.                                       |
| `rye app list`                | List shim status.                                                   |
| `rye app doctor`              | Diagnose PATH and shim configuration.                               |
| `rye app unwrap claude codex` | Remove persistent app shims.                                        |

## History and approvals

| Command                                         | Purpose                                         |
| ----------------------------------------------- | ----------------------------------------------- |
| `rye history --last 1h`                         | Show captured proxy traffic from the last hour. |
| `rye history --domain anthropic.com --last 10m` | Filter history by domain.                       |
| `rye history --method POST --last 30m`          | Filter history by HTTP method.                  |
| `rye history export --format json --last 10m`   | Export captured traffic as JSON.                |
| `rye approvals --last 1h`                       | Show approval events from wrapped sessions.     |

## Config and intercept patterns

| Command                                      | Purpose                          |
| -------------------------------------------- | -------------------------------- |
| `rye config show`                            | Print resolved configuration.    |
| `rye config path`                            | Print the user config path.      |
| `rye config set KEY VALUE`                   | Set a config value.              |
| `rye config unset KEY`                       | Remove a config override.        |
| `rye intercept list`                         | List current intercept patterns. |
| `rye intercept add openai.com,anthropic.com` | Add intercept patterns.          |
| `rye intercept remove cursor.com`            | Remove intercept patterns.       |

Config keys include `env`, `client_id`, `auth_api_url`, `auth_ui_url`, and `grpc_endpoint`.

## Shell completions

Generate completions:

```bash theme={null}
rye completions generate zsh
rye completions generate bash
rye completions generate fish
```

Install completions for the current shell:

```bash theme={null}
rye completions install
```
