Configuration
Set up authentication and customize your Melious CLI settings
Configuration
Authentication
Log In
melious auth loginThe login flow:
- Offers to open melious.ai/account/api/keys in your browser
- Prompts you to paste your API key (
sk-mel-...) - Validates the key against the API
- Saves credentials to
~/.melious/credentials.json
Check Status
melious auth statusShows your current authentication state — key (masked), email, plan, and when you authenticated.
Log Out
melious auth logoutRemoves the saved credentials file.
Alternative Authentication
You can also authenticate via environment variable:
export MELIOUS_API_KEY=sk-mel-your-key-hereThe CLI checks MELIOUS_API_KEY first, then falls back to the credentials file.
For a single command, use the --api-key flag:
melious run --api-key sk-mel-your-key-here "Hello"The --api-key flag and MELIOUS_API_KEY environment variable take precedence over saved credentials. This is useful for CI/CD or switching between accounts.
Config Commands
Configuration is stored at ~/.melious/config.json.
Show All Settings
melious config showUse --json for machine-readable output:
melious config show --jsonGet a Value
Use dot-notation to read a specific key:
melious config get models.mainmelious config get run.temperatureSet a Value
melious config set models.main qwen3-235b-a22b-instructmelious config set run.temperature 0.5melious config set defaults.preset speedEdit in Your Editor
melious config editOpens config.json in your preferred editor. Respects $VISUAL, then $EDITOR, then falls back to a platform default (notepad on Windows, nano on Linux/macOS).
Reset to Defaults
melious config resetAsks for confirmation before overwriting your config with defaults.
Config Reference
All available configuration keys with their types and default values:
Models
| Key | Type | Default | Description |
|---|---|---|---|
models.main | string | qwen3-235b-a22b-instruct | Primary model for chat and generation |
models.secondary | string | qwen3-235b-a22b-instruct | Secondary/mid-tier model |
models.lightweight | string | qwen3-30b-a3b-instruct | Fast model for lightweight tasks |
Defaults
| Key | Type | Default | Description |
|---|---|---|---|
defaults.tool | string | claude-code | Default tool for melious launch |
defaults.preset | string | balanced | Default routing preset |
Run
| Key | Type | Default | Description |
|---|---|---|---|
run.system_prompt | string | "" | Default system prompt for all runs |
run.temperature | float | 0.7 | Temperature (0-2) |
run.max_tokens | int | 4096 | Maximum tokens in response |
run.stream | bool | true | Stream responses by default |
Image
| Key | Type | Default | Description |
|---|---|---|---|
image.model | string | flux-1-schnell | Default image generation model |
image.size | string | 1024x1024 | Default image dimensions |
image.quality | string | standard | Quality level (standard or hd) |
image.style | string | vivid | Style (vivid or natural) |
Diff
| Key | Type | Default | Description |
|---|---|---|---|
diff.context_lines | int | 30 | Lines of context around each hunk |
diff.model | string | qwen3-coder-480b-a35b-instruct | Model used for code reviews |
Stats
| Key | Type | Default | Description |
|---|---|---|---|
stats.show | bool | true | Show stats footer after responses |
stats.time | bool | true | Show response duration |
stats.tokens | bool | true | Show token counts |
stats.cost | bool | true | Show credit cost |
stats.environment | bool | true | Show CO2 and renewable % |
Output
| Key | Type | Default | Description |
|---|---|---|---|
output.color | bool | true | Colored terminal output |
output.language | string | auto | Output language |
autoupdate | bool | true | Check for CLI updates automatically |
Per-Tool Model Overrides
You can set model overrides for individual tools:
melious tools model opencode qwen3-235b-a22b-instructThese are stored under tool_models in the config and take precedence over the global models.* values when launching that tool. See Managing Tools for details.
Routing Presets
Presets control how your requests are routed across Melious infrastructure. They are applied as a suffix to the model ID:
| Preset | Description |
|---|---|
balanced | Default. Balanced cost, speed, and quality |
speed | Prioritize low latency |
price | Prioritize lowest cost |
eco | Prioritize renewable energy and low carbon |
Set your default preset:
melious config set defaults.preset speedOr use per-request:
melious run --preset eco "Summarize this article"The preset is applied as a model suffix internally (e.g., qwen3-235b-a22b-instruct:speed). You don't need to include the suffix manually.