Melious
CLI

Configuration

Set up authentication and customize your Melious CLI settings

Configuration

Authentication

Log In

melious auth login

The login flow:

  1. Offers to open melious.ai/account/api/keys in your browser
  2. Prompts you to paste your API key (sk-mel-...)
  3. Validates the key against the API
  4. Saves credentials to ~/.melious/credentials.json

Check Status

melious auth status

Shows your current authentication state — key (masked), email, plan, and when you authenticated.

Log Out

melious auth logout

Removes the saved credentials file.

Alternative Authentication

You can also authenticate via environment variable:

export MELIOUS_API_KEY=sk-mel-your-key-here

The 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 show

Use --json for machine-readable output:

melious config show --json

Get a Value

Use dot-notation to read a specific key:

melious config get models.main
melious config get run.temperature

Set a Value

melious config set models.main qwen3-235b-a22b-instruct
melious config set run.temperature 0.5
melious config set defaults.preset speed

Edit in Your Editor

melious config edit

Opens 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 reset

Asks for confirmation before overwriting your config with defaults.


Config Reference

All available configuration keys with their types and default values:

Models

KeyTypeDefaultDescription
models.mainstringqwen3-235b-a22b-instructPrimary model for chat and generation
models.secondarystringqwen3-235b-a22b-instructSecondary/mid-tier model
models.lightweightstringqwen3-30b-a3b-instructFast model for lightweight tasks

Defaults

KeyTypeDefaultDescription
defaults.toolstringclaude-codeDefault tool for melious launch
defaults.presetstringbalancedDefault routing preset

Run

KeyTypeDefaultDescription
run.system_promptstring""Default system prompt for all runs
run.temperaturefloat0.7Temperature (0-2)
run.max_tokensint4096Maximum tokens in response
run.streambooltrueStream responses by default

Image

KeyTypeDefaultDescription
image.modelstringflux-1-schnellDefault image generation model
image.sizestring1024x1024Default image dimensions
image.qualitystringstandardQuality level (standard or hd)
image.stylestringvividStyle (vivid or natural)

Diff

KeyTypeDefaultDescription
diff.context_linesint30Lines of context around each hunk
diff.modelstringqwen3-coder-480b-a35b-instructModel used for code reviews

Stats

KeyTypeDefaultDescription
stats.showbooltrueShow stats footer after responses
stats.timebooltrueShow response duration
stats.tokensbooltrueShow token counts
stats.costbooltrueShow credit cost
stats.environmentbooltrueShow CO2 and renewable %

Output

KeyTypeDefaultDescription
output.colorbooltrueColored terminal output
output.languagestringautoOutput language
autoupdatebooltrueCheck for CLI updates automatically

Per-Tool Model Overrides

You can set model overrides for individual tools:

melious tools model opencode qwen3-235b-a22b-instruct

These 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:

PresetDescription
balancedDefault. Balanced cost, speed, and quality
speedPrioritize low latency
pricePrioritize lowest cost
ecoPrioritize renewable energy and low carbon

Set your default preset:

melious config set defaults.preset speed

Or 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.

On this page