Claude Code and Codex
The aderra command runs Claude Code or Codex on Aderra’s models, billed to your Aderra plan’s credits. Aderra’s image and video tools work inside them too.
The same command also runs Aderra’s own agent: plain aderra in the terminal, aderra web in the browser. See Aderra Agent.
Install
Section titled “Install”You need Node.js 18 or newer for Claude Code and Codex (22.19 or newer for Aderra Agent), on macOS or Linux.
curl -fsSL https://aderra.ai/cli | shThis installs aderra into ~/.local/bin. The installer only keeps a copy that carries Aderra’s signature. If it says to add that folder to your PATH, do so and open a new terminal.
Log in
Section titled “Log in”-
In the Aderra app, open Connect (the terminal icon in the left bar).
-
Open step 2, Sign in, click Generate key and copy it. It starts with
ak_and is only shown once. -
Run the command below and paste the key when asked. It stays hidden as you paste. Press Enter at the Server question to keep
https://api.aderra.ai.Terminal window aderra login
The Connect page also offers a ready-made aderra login ak_… line to copy. It works, but the key then sits in your shell history, so aderra warns you and suggests revoking that key and logging in again with the prompt. In a script, pipe the key in instead: aderra login --key-from-stdin < keyfile.
Your key is saved in ~/.config/aderra/config.json, readable only by your user.
Use it
Section titled “Use it”| Command | What it does |
|---|---|
aderra claude |
Start Claude Code on Aderra (installs Claude Code if missing) |
aderra codex |
Continue your last Codex session in this folder (installs Codex if missing) |
aderra codex new |
Start a fresh Codex session |
aderra codex resume |
Pick an earlier Codex session in this folder, including ones you started without Aderra |
aderra whoami |
Show the server, the key (masked) and the model |
aderra update |
Update to the latest version |
aderra version |
Print the version |
aderra logout |
Remove the saved key |
aderra --help |
Every command |
Anything you type after aderra claude or aderra codex is passed to Claude Code or Codex.
Add --model <id> to choose a model for one launch, for example aderra claude --model glm-5.3-flash-uncensored. The default is glm-5.3-flash. Inside Claude Code, /model switches between GLM-5.3 Flash and GLM-5.3 Flash Unfiltered.
Good to know
Section titled “Good to know”- Your normal setup is left alone. Claude Code keeps your own MCP servers alongside Aderra’s image tools. Codex gets its own settings folder,
~/.config/aderra/codex, so picking an Aderra model never changes the model plaincodexuses. Your sessions are shared, which is whyaderra codexcan continue them. - Images you generate from Claude Code or Codex are saved to
./aderra-images/in the folder you’re working in. Your plan’s image rules apply, as in the app: see Images and video. - Web search inside Claude Code costs 10 credits per search, at most 5 per turn.
- Context: the terminal can read as much as your plan’s context window: 256k tokens on Plus, 1M on Pro and Max. If a long session hits a size or context error, run
/compactin Claude Code or Codex. - Rate limit: each terminal key can make 60 requests a minute. Claude Code waits and retries on its own when it hits the limit.
- Instructions: Aderra replaces the tool’s built-in system prompt with its own. What the tool sends as part of the conversation still reaches the model, such as the
CLAUDE.mdthat Claude Code adds to your first message. Claude Code options that change its system prompt, such as--system-prompt,--append-system-promptor output styles, have no effect. - Updates:
aderrachecks for updates every few hours. A very old copy refuses to run and asks you to update: runaderra update.
Set it up by hand
Section titled “Set it up by hand”If you’d rather not use the aderra command, the Connect page shows the settings for each tool under More ways to configure your tools. For Claude Code:
export ANTHROPIC_BASE_URL=https://api.aderra.aiexport ANTHROPIC_AUTH_TOKEN=ak_...export ANTHROPIC_MODEL=glm-5.3-flashexport ANTHROPIC_SMALL_FAST_MODEL=glm-5.3-flashclaudeSet up this way, Claude Code assumes a smaller context window than it does under aderra claude (which names the model glm-5.3-flash[1m]), so it compacts long sessions sooner. You don’t get Aderra’s /model list or image tools either. Codex can’t be set up by hand this way: current versions ignore OPENAI_BASE_URL, so use aderra codex.
A terminal key there spends your plan’s credits. An API key works too and spends your API wallet instead.