Skip to content
KuponGuru
comparisons13 September 2026 · 3 min read · KuponGuru Editorial

Claude Code, Codex, Qwen Code, OpenCode, OpenClaw and Hermes: picking a coding agent CLI

Six terminal coding agents, what each one installs, which protocol it speaks, and the one configuration detail that makes the difference between a working setup and an afternoon spent debugging a key that was never broken.

A coding agent CLI is a program that sits in your terminal, reads your project, and edits it while you talk to it. Six of them are worth knowing about in 2026. They differ less than the marketing suggests, and the thing that actually decides whether one works for you is mundane: which API protocol it speaks, and therefore which models it can reach.

The two protocols, which is the whole story

Almost every one of these tools talks to a model in one of two shapes: Anthropic's Messages API, or OpenAI's. That single fact explains most setup failures.

An Anthropic-shaped client is configured with ANTHROPIC_BASE_URL and ANTHROPIC_MODEL. An OpenAI-shaped one uses OPENAI_BASE_URL and OPENAI_MODEL, and its base URL almost always ends in /v1. Point an Anthropic client at a /v1 URL, or name an OpenAI-only model in an Anthropic client, and you get an error that looks like a bad API key and is nothing of the sort.

The six

Claude Code

Anthropic's own CLI, and Anthropic-shaped. Install it with npm and configure it with three environment variables.

npm install -g @anthropic-ai/claude-code@latest

export ANTHROPIC_AUTH_TOKEN="your-key"
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
export ANTHROPIC_MODEL="claude-opus-5"

Because it reads those variables, it can be pointed at any Anthropic-compatible endpoint rather than only at Anthropic, which is what the gateway section below is about.

Codex CLI

OpenAI's, and OpenAI-shaped. Configured through a TOML file rather than environment variables, which is more verbose but easier to keep in version control.

# ~/.codex/config.toml
model = "gpt-6-astra"
model_provider = "openai"

[model_providers.openai]
name = "OpenAI"
base_url = "https://api.openai.com/v1"
wire_api = "responses"

Qwen Code

Alibaba's, and unusual in that it speaks both shapes. Its own documentation warns not to mix the two sets of environment variables in one shell, set one or the other, never both, because which one wins is not obvious and the failure is silent.

npm install -g @qwen-code/qwen-code@latest

OpenCode

Open source, and configured with a JSON file in the project directory rather than globally. That makes it the easiest of the six to give different settings per repository, which matters if you work across projects with different budgets or providers.

curl -fsSL https://opencode.ai/install | bash

OpenClaw

Runs an interactive onboarding wizard instead of asking you to write a config file, and supports both protocols as custom providers. The gentlest start of the six if you have not used one before.

npm i -g openclaw && openclaw onboard

Hermes

Nous Research's agent, and the only one of the six distributed through pipx rather than npm, so it is the natural fit if your machine is set up for Python rather than Node.

pipx install hermes-agent
hermes setup model

Running all six from one balance

Every one of these tools lets you replace the vendor's base URL with something else. That is how a gateway works: you point the client at the gateway, and it bills you from one balance regardless of whose model answers.

AgentRouter is the one we have checked in detail. It publishes a setup page for each of these six clients, serves six models across both protocols, and credits a new account $50. It is genuinely useful for trying several of these tools without opening six vendor accounts, with a real caveat about daily rationing on the Claude and GPT models that we set out in full on its offer page and in our separate write-up.

So which one?

  • Already paying Anthropic, want the least setup, Claude Code.
  • Already paying OpenAI, want config in git, Codex CLI.
  • Different settings per project, OpenCode.
  • Never used one of these before, OpenClaw, for the wizard.
  • Python machine, no Node, Hermes.
  • Want one tool that can swing between both protocols, Qwen Code, carefully.

None of them is dramatically better than the others at writing code, because none of them writes the code, the model does. Pick on how it fits your machine and your existing subscription, and change your mind later, which costs nothing.

Sources

Install commands and configuration shapes from each project's own published setup documentation, and from AgentRouter's six client guides, all read on 13 September 2026. These tools release often; check the current docs before pasting a command.

Affiliate Disclosure: Some links on KuponGuru are affiliate links. We may earn a commission at no additional cost to you. How we earn money

More guides