Melious
CLI

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.

One-off prompts

Send a prompt, stream the response back:

melious run "Explain the difference between TCP and UDP"

Streaming is on by default. We don't think of it as a feature — it's the sane way to read inference in a terminal. Use --no-stream only if something downstream needs the full response as one chunk.

Interactive chat

Keep a conversation going in one session:

melious run -i

If you run melious run with no prompt on an interactive terminal, you land in the same chat mode — the -i is implicit when we can tell you're at a keyboard.

History lives in memory for the life of the process. Pass --save-on-exit session.json to persist it, and --load session.json to pick it up again.

File context

Attach files with -f. They're injected into the message ahead of your prompt text, so the model sees the file first, then what you want done with it:

melious run -f src/main.go "Explain what this code does"

Repeat the flag for multiple files:

melious run -f src/main.go -f src/handler.go "How do these files interact?"

Or use a glob — quoted, so your shell doesn't expand it before we see it:

melious run -f "src/**/*.ts" "Find potential bugs in this codebase"

System prompts

Set a system prompt inline:

melious run --system "You are a senior Go developer. Be concise." "Review this function"

Load one from a file when it gets long or you want to version it:

melious run --system-file rules.md "Refactor the auth module"

Or set a default that applies to every run on this machine:

melious config set run.system_prompt "Always respond in bullet points"

An inline --system wins over --system-file, which wins over the config default.

Piping

melious run reads stdin when it's available, so it works as a pipeline stage:

cat error.log | melious run "What's causing these errors?"
git diff | melious run "Summarize these changes"

Pass --raw to strip the stats footer and terminal formatting — what you want when the output is going into a file or another program:

cat data.json | melious run --raw "Extract all email addresses" > emails.txt

Persisting a session

Save a conversation on exit:

melious run -i --save-on-exit chat.json

Load one and keep going:

melious run -i --load chat.json

Do both to keep the same file updated across sessions:

melious run -i --load chat.json --save-on-exit chat.json

The saved file is plain JSON — safe to commit to a repo, edit by hand, or diff across runs.

Flags

FlagTypeDefaultDescription
--modelstringfrom configOverride the model for this run
--presetstringfrom configRouting flavor (balanced, speed, price, eco). See Routing.
--temperaturefloat0.7Sampling temperature, [0, 2]
--max-tokensint4096Cap on the response
--top-pfloatTop-p nucleus sampling
-i, --interactiveboolfalseForce interactive mode
-f, --filestring[]Attach a file as context (repeatable)
--systemstringInline system prompt
--system-filestringLoad system prompt from a file
--rawboolfalseStrip formatting and the stats footer
--no-streamboolfalseWait for the whole response before printing
--show-envboolfalsePrint environmental impact after the response
--loadstringResume a saved conversation
--save-on-exitstringWrite the conversation to a file when the session ends

--show-env implies --no-stream. Environmental impact is computed from the full response — we don't emit it mid-stream because the number would be wrong until the last chunk lands.

Examples

Ask about a codebase:

melious run -f "src/**/*.py" "What does this project do?"

Quick translation, pipeline-style:

echo "Hello, how are you?" | melious run --raw "Translate to German"

Push a reasoning model on the speed route:

melious run --model deepseek-r1-0528 --preset speed "Solve this: 2^10 + 3^7"

Deterministic-ish output:

melious run --temperature 0.1 "List the planets in our solar system"

On this page