DevStation CLI
Models & Providers
Set up a model once and every new terminal just works. Keys are kept in a file only you can read, and never in a config file you might commit.
Log in
devstation loginIt asks which provider, then the key (hidden as you type), then the model. Or name the provider:
devstation login anthropic # Claude, directlydevstation login openrouter # one key for Claude, GPT, Gemini, DeepSeek and moredevstation login openai # OpenAI, or any compatible server: Ollama, LM Studio, Groq, TogetherFor scripts, the key can come from standard input:
echo "$OPENROUTER_API_KEY" | devstation login openrouterdevstation logout [provider] removes stored keys. devstation config shows every value in use and where it came from.
Use your Claude or ChatGPT subscription
DevStation can hand each turn to Claude Code or Codex running on your machine, signed in with your own account. The work then counts against your Claude Pro or Max plan, or your ChatGPT Plus or Pro plan, instead of an API key.
claude auth login # once, through Anthropic's own sign-indevstation login claude-code codex login # once, through OpenAI's own sign-indevstation login codexThe session looks the same as before: every command, edit and todo list is a cell, Shift+Tab switches to plan mode, and /resume carries a conversation on. The model is that CLI's own default. devstation config set model <name>, or /model <name> in a session, passes a different one through.
| Mode | claude-code | codex |
|---|---|---|
| normal and auto | Claude Code's auto mode: a classifier reviews each action | writes inside the project, with network access |
| plan | Claude Code's plan mode | read-only |
Note
claude or codex program, which uses its own login. Anthropic's terms allow exactly that, and do not allow other tools to use a Claude subscription's tokens directly. Keep it to your own account, for your own work.On these turns the engine uses its own tools, permissions and sandbox, so DevStation's container, budget and undo checkpoints do not apply. Use git, or the engine's own tools, to go back.
Endpoints
| To use | provider | baseUrl | Key |
|---|---|---|---|
| Anthropic | anthropic | default | yes |
| OpenRouter | openrouter | default | yes |
| OpenAI | openai | default (https://api.openai.com/v1) | yes |
| Ollama | openai | http://localhost:11434/v1 | none |
| LM Studio | openai | http://localhost:1234/v1 | none |
| Groq | openai | https://api.groq.com/openai/v1 | yes |
| Together | openai | https://api.together.xyz/v1 | yes |
| An Anthropic-compatible gateway | anthropic | the gateway's URL | yes |
| Claude Pro/Max, through Claude Code | claude-code | none | no: claude auth login |
| ChatGPT Plus/Pro, through Codex | codex | none | no: codex login |
baseUrl is everything up to, not including, /chat/completions. The openai provider always needs a model name, because every compatible server names them differently. For a local server, leave the key blank when asked.
Where settings live
~/.devstation/config.json provider, model, baseUrl (global).devstation/config.json the same, for one project (overrides global)~/.devstation/credentials.json API keys (owner-only, mode 600)config.json never holds a key: it is the file people share and commit, so a key there would end up in git. An apiKey field in it is ignored with a warning. Keys go through login into the credentials file, which only you can read, and doctor warns if its permissions are ever loosened.
{ "provider": "openai", "model": "llama3.3", "baseUrl": "http://localhost:11434/v1"}Change one setting
devstation config set model anthropic/claude-opus-5devstation config set provider openrouterdevstation config set baseUrl https://api.groq.com/openai/v1devstation config set model qwen2.5-coder --project # this workspace onlydevstation config get modeldevstation config unset baseUrldevstation config path # where the files areInside a session, /model <name> switches the model for that session only.
Which value wins
| Setting | First found wins |
|---|---|
| provider | DEVSTATION_PROVIDER → project config → global config → inferred from whichever key is exported |
| model | --model → DEVSTATION_MODEL → project config → global config → provider default |
| baseUrl | DEVSTATION_BASE_URL → project config → global config → provider default |
| key | the exported variable for that provider → ~/.devstation/credentials.json |
A provider you chose in a config file is never overridden by a key that happens to be exported for some other tool. With no settings files at all, ANTHROPIC_API_KEY is used first, then OPENROUTER_API_KEY.
On a server or in CI
Environment variables still work, and are what a server or CI job should use:
export ANTHROPIC_API_KEY=...export OPENROUTER_API_KEY=...export OPENAI_API_KEY=...Important
devstation login again.