Skip to content

Repository files navigation

ClewdR

ClewdR

ClewdR is a Rust proxy for Claude — both Claude.ai and Claude Code — serving native Claude and OpenAI-compatible endpoints from a single binary.

It runs as one static executable on Linux, macOS, Windows and Android, with a Docker image available, and typically uses <10 MB RAM, starts in <1 s, and weighs ~15 MB.

Quick Start

  1. Download the latest release for your platform from GitHub. Assets are named clewdr-<os>-<arch>.zip, where <os> is one of linux, musllinux, macos, windows or android, and <arch> is x86_64 or aarch64.
    curl -L -O https://github.com/Xerxes-2/clewdr/releases/latest/download/clewdr-linux-x86_64.zip
    unzip clewdr-linux-x86_64.zip
    chmod +x clewdr
  2. Run the binary:
    ./clewdr
  3. Open http://127.0.0.1:8484 and enter the admin password printed to the console.

With Docker

docker run -d --name clewdr \
  -p 8484:8484 \
  -v clewdr-data:/etc/clewdr \
  ghcr.io/xerxes-2/clewdr:latest

Images are published for linux/amd64 and linux/arm64. Use :latest, or pin a release with :v0.13.1.

Mount something at /etc/clewdr, or the generated passwords are lost on every recreate. The config lives there as clewdr.toml, with logs under log/.

Read the passwords from the container:

docker logs clewdr | grep Password

Or set them yourself, which is easier to automate. Any config key can be set as an environment variable by upper-casing it and prefixing CLEWDR_; the value is read as the type that key holds, so CLEWDR_PASSWORD=12345 is the string 12345. Booleans accept true/false, yes/no, on/off and 1/0 in any case.

docker run -d --name clewdr \
  -p 8484:8484 \
  -v clewdr-data:/etc/clewdr \
  -e CLEWDR_PASSWORD=your-api-password \
  -e CLEWDR_ADMIN_PASSWORD=your-admin-password \
  ghcr.io/xerxes-2/clewdr:latest

The image already sets CLEWDR_IP=0.0.0.0 so the port is reachable, and disables the update checks, since an image cannot replace its own binary.

Adding Cookies

ClewdR needs at least one Claude.ai cookie before it can serve requests.

  1. Export your Claude.ai cookies (e.g. via browser devtools).
  2. Paste them into ClaudeSubmit Cookie, one cookie per line, and submit.
  3. ClaudeCookie Status then shows each cookie's state and remaining quota.

The Config tab covers everything else: the API and admin passwords, an outbound proxy, retry limits, and rules for skipping cookies. Server settings such as IP and port need a restart to take effect; the rest apply on save.

If you forget the password, delete clewdr.toml and start the binary again. Docker users can mount a persistent folder for that file.

Connecting a Client

All paths below are relative to http://127.0.0.1:8484.

Claude.ai Claude Code
Native Claude /v1/messages /code/v1/messages
OpenAI-compatible /v1/chat/completions /code/v1/chat/completions
Model list /v1/models /code/v1/models
Token counting /code/v1/messages/count_tokens

Streaming works on every endpoint. The API password is printed to the console on startup, separately from the admin password.

SillyTavern:

{
  "api_url": "http://127.0.0.1:8484/v1/chat/completions",
  "api_key": "password-from-console",
  "model": "claude-sonnet-4-6"
}

The model-list endpoint above returns the ids ClewdR currently accepts, including a -thinking variant of each.

Any other OpenAI-compatible client — Continue, Cursor and the rest — works the same way: point its API base at http://127.0.0.1:8484/v1/ and use the API password as the key.

Building from Source

The frontend compiles to WebAssembly into static/, which the server then serves. That directory is gitignored, so it has to be built first, or cargo run starts a server with no UI. cargo xtask handles the ordering:

cargo xtask check     # report on the required toolchain pieces
cargo xtask build     # release build of the frontend and the server
cargo xtask dev       # both, with frontend hot reload, on :3000
cargo xtask lint      # clippy over every valid feature combination
cargo xtask fmt       # format (always via nightly)
cargo xtask ci        # everything CI runs

Building the frontend needs rustup target add wasm32-unknown-unknown and cargo binstall trunk. Running cargo xtask itself needs nothing.

Two gotchas if you bypass xtask. Formatting must go through nightly, because .rustfmt.toml uses nightly-only options that stable silently ignores.

--all-features also fails: embed-resource/external-resource and portable/xdg are mutually exclusive pairs enforced in build.rs.

Resources

Thanks

  • wreq for the fingerprinting library.
  • Clewd for many upstream ideas.
  • Clove for Claude Code helpers.

About

High Performance LLM Reverse Proxy

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages