Configuration
Where credentials and config live, how to log in, how to edit either file, and every available config key with its default.
For the API-side picture of keys and scopes, see Authentication.
Authentication
Log in
melious auth loginThe CLI offers to open melious.ai/account/api/keys in your browser, then asks you to paste a key (sk-mel-...). We validate the key against the API before writing it to ~/.melious/credentials.json — that way a typo fails here, not on your first real call.
Check what's saved
melious auth statusShows the masked key, the account email, plan, and when you last authenticated.
Log out
melious auth logoutRemoves ~/.melious/credentials.json. Nothing else is touched.
Other ways to pass a key
An environment variable wins over the credentials file:
export MELIOUS_API_KEY=sk-mel-<YOUR_API_KEY>A per-command flag wins over both:
melious run --api-key sk-mel-<YOUR_API_KEY> "Hello"--api-key and MELIOUS_API_KEY take precedence over the saved credentials. Handy for CI, scripts, or temporarily borrowing another key without overwriting the one on disk.
Editing config
Show everything
melious config showAdd --json for a machine-readable dump.
Read one key
melious config get models.main
melious config get run.temperatureKeys are dot-notated and match the reference below.
Write one key
melious config set models.main qwen3-235b-a22b-instruct
melious config set run.temperature 0.5
melious config set defaults.preset speedOpen in your editor
melious config editWe check $VISUAL, then $EDITOR, then fall back to notepad on Windows and nano elsewhere. "Nano over vim" is a call we made deliberately — we'd rather a new user find their way out than respect the muscle memory of people who've already set $EDITOR.
Reset to defaults
melious config resetAsks for confirmation before overwriting your file.
Config reference
Every key, its type, and what it does. Defaults are what a fresh install uses.
Models
| Key | Type | Default | Description |
|---|---|---|---|
models.main | string | qwen3-235b-a22b-instruct | Main model for chat and one-off runs |
models.secondary | string | qwen3-235b-a22b-instruct | Mid-tier fallback for tools that use a tiered model |
models.lightweight | string | qwen3-30b-a3b-instruct | Small, fast model for cheap work |
Defaults
| Key | Type | Default | Description |
|---|---|---|---|
defaults.tool | string | claude-code | Tool that melious launch starts with no argument |
defaults.preset | string | balanced | Routing flavor. See Routing. |
Run
| Key | Type | Default | Description |
|---|---|---|---|
run.system_prompt | string | "" | Default system prompt prepended to every run |
run.temperature | float | 0.7 | Sampling temperature, [0, 2] |
run.max_tokens | int | 4096 | Cap on completion length |
run.stream | bool | true | Stream by default; set to false for a single blocking response |
Image
| Key | Type | Default | Description |
|---|---|---|---|
image.model | string | flux-1-schnell | Default image model |
image.size | string | 1024x1024 | Default dimensions |
image.quality | string | standard | standard or hd |
image.style | string | vivid | vivid or natural |
Diff
| Key | Type | Default | Description |
|---|---|---|---|
diff.context_lines | int | 30 | Lines of context around each hunk sent for review |
diff.model | string | qwen3-coder-480b-a35b-instruct | Model used for melious diff |
Stats
| Key | Type | Default | Description |
|---|---|---|---|
stats.show | bool | true | Show the stats footer after a response |
stats.time | bool | true | Include response duration |
stats.tokens | bool | true | Include token counts |
stats.cost | bool | true | Include credit cost |
stats.environment | bool | true | Include carbon and renewable-energy percentage |
Output
| Key | Type | Default | Description |
|---|---|---|---|
output.color | bool | true | Colored terminal output |
output.language | string | auto | Language for CLI strings (auto follows system locale) |
autoupdate | bool | true | Check for CLI updates in the background once a day |
Per-tool model overrides
Launched tools inherit models.* by default. Override per tool with melious tools model:
melious tools model opencode qwen3-235b-a22b-instructThese land under tool_models in the config and beat the global models.* when that specific tool is launched. See Managing tools.
Choosing a flavor
The CLI reads your default from defaults.preset and applies it as a suffix to the model ID at request time — qwen3-235b-a22b-instruct:speed, and so on. Override per-request with --preset on any command that hits inference. The flavors and what they weight are documented in Routing.
Melious CLI
How you use Melious from a terminal — prompts, code review, image generation, and handing off to coding tools like OpenCode and Claude Code. One key, one config, one place to see what you spent.
Chat and prompts
The fast path: one prompt, one response, streamed to your terminal. Also drops into interactive chat when you leave the prompt off, accepts stdin for pipelines, and can pull files into the message for context.