How CLI Workers Work
A CLI worker spawns the Claude Code CLI as a subprocess and routes chat completion requests through it. From the API caller’s perspective, a CLI worker is indistinguishable from a GPU worker — the same OpenAI/Anthropic-compatible endpoints work with both.
This is pass-through inference: the router sends the request, the worker relays it to Claude Code, and streams tokens back. There is no agent framework, no skill injection, and no context file management — that lives in the commercial server.
Prerequisites
npm install -g @anthropic-ai/claude-code
claude login # Interactive OAuth — or use CLAUDE_CODE_OAUTH_TOKEN for headless
Running a CLI Worker
CLI workers use the same auxot-worker binary as GPU workers. The router’s policy determines which mode a connected worker runs in — GPU or CLI. To run a CLI worker, connect auxot-worker with a key that the router has assigned CLI mode:
AUXOT_GPU_KEY=adm_xxx \
AUXOT_ROUTER_URL=router:8080 \
ANTHROPIC_API_KEY=sk-ant-... \
./auxot-worker
Or with Docker:
docker run -d \
-e AUXOT_GPU_KEY=adm_xxx \
-e AUXOT_ROUTER_URL=router:8080 \
-e ANTHROPIC_API_KEY=sk-ant-... \
ghcr.io/auxothq/auxot-worker:latest
The worker connects to the router, fetches its policy, and starts handling jobs using Claude Code as the inference backend. Ensure Claude Code is authenticated — set CLAUDE_CODE_OAUTH_TOKEN for headless deployments.
Authentication
| Method | How |
|---|---|
| Interactive | Run claude login once on the machine; credentials cached in ~/.claude/ |
| Headless | Set CLAUDE_CODE_OAUTH_TOKEN=sk-ant-... in the environment |
Model Selection
| Variable | Values | Description |
|---|---|---|
AUXOT_CLI_DEFAULT_MODEL | sonnet, opus | Default Claude model to use |
Callers can also specify the model per-request via the model field in the API request.
Tool Control
| Setting | Value | Effect |
|---|---|---|
AUXOT_CLI_TOOLS | (unset) | No tools enabled (default) |
AUXOT_CLI_TOOLS | "Bash,Read,Write" | Only the listed tools |
AUXOT_CLI_TOOLS | "All" | All tools enabled (use with caution) |
Economics
A Claude Pro or Max subscription gives unlimited inference through the CLI worker at a fixed monthly cost — see anthropic.com for current pricing. For high-volume workloads, compare this against per-token API pricing.
Difference from the Commercial Server
The commercial Auxot Server also uses CLI workers, but wraps them in a full agent framework with skill injection, context files, and Tool Worker Policies — where MCP packages and credentials are configured per policy and dispatched through connected tools workers. If you need those features, see Auxot Server →.