Claude Code CLI

Run , or enable Claude Code in the sleev TUI. Both update your Claude Code settings. Restart Claude Code if it is running.

To remove Sleev, run .

Manual setup

Merge the env block for your OS into ~/.claude/settings.json. Create the file if it doesn't exist.

macOS and Linux

Replace <home> with the full path of your home folder, for example /Users/you or /home/you. ~ doesn't work here. If you set XDG_DATA_HOME, the files are in $XDG_DATA_HOME/sleev/https-proxy. The gateway creates or updates both files when it starts.

Windows

Setup modes

Sleev connects Claude Code in one of two modes: HTTPS proxy mode (the default on macOS and Linux) or Base URL mode (the default on Windows). The automated setup command (sleev harness claude-code enable) configures the recommended mode for your operating system automatically. If you set up a mode by hand that isn't the default for your OS, disable Claude Code in sleev and then enable it again to change it back to the default.

HTTPS proxy mode

In HTTPS proxy mode, Claude Code routes its HTTPS traffic through the Sleev gateway proxy without needing to set ANTHROPIC_BASE_URL. This keeps features like Remote Control and mobile push notifications enabled. Sleev decrypts traffic to api.anthropic.com, optimizes model requests, and passes all other traffic through unchanged.

Key details:

  • Certificate trust: The gateway decrypts HTTPS traffic to api.anthropic.com, so NODE_EXTRA_CA_CERTS tells Claude Code to trust Sleev's local root CA (ca.pem).
  • Existing proxies: Sleev sets HTTPS_PROXY only for Claude Code, not system-wide. If you already use an HTTPS proxy with Claude Code, Sleev replaces it, and the gateway doesn't forward traffic to your proxy.
  • Process isolation: CLAUDE_CODE_SHELL_PREFIX unsets Sleev proxy variables before running shell tool commands, status lines, and stdio MCP servers on macOS and Linux. This prevents most child commands from inheriting Sleev's proxy and certificate settings, though commands executed without a shell or as exec-form hooks still retain them. Claude Code runs PowerShell commands without the shell prefix, and stdio MCP servers on Windows cannot execute the shell script outside Git Bash. This is why Base URL mode is the default on Windows.

Base URL mode

In Base URL mode, Claude Code routes Anthropic model requests directly to the Sleev gateway via ANTHROPIC_BASE_URL. All other connections bypass the gateway and connect directly.

Key details:

  • No certificate required: Claude Code sends model requests to the gateway over plain HTTP on 127.0.0.1, so you don't need to trust a local root certificate.
  • Child processes: Subprocesses started by Claude Code, including shell commands, hooks, and stdio MCP servers, inherit ANTHROPIC_BASE_URL. Any child scripts or tools that use the Anthropic SDK will also route their API requests through the Sleev gateway.
  • Disabled features: Setting ANTHROPIC_BASE_URL causes Claude Code to turn off features such as Remote Control (including mobile push notifications) and server-managed settings.

To use Base URL mode on macOS or Linux instead of the proxy, first run to remove the HTTPS proxy settings. Then add the Windows settings block above to ~/.claude/settings.json.