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 -iIf 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.txtPersisting a session
Save a conversation on exit:
melious run -i --save-on-exit chat.jsonLoad one and keep going:
melious run -i --load chat.jsonDo both to keep the same file updated across sessions:
melious run -i --load chat.json --save-on-exit chat.jsonThe saved file is plain JSON — safe to commit to a repo, edit by hand, or diff across runs.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--model | string | from config | Override the model for this run |
--preset | string | from config | Routing flavor (balanced, speed, price, eco). See Routing. |
--temperature | float | 0.7 | Sampling temperature, [0, 2] |
--max-tokens | int | 4096 | Cap on the response |
--top-p | float | — | Top-p nucleus sampling |
-i, --interactive | bool | false | Force interactive mode |
-f, --file | string[] | — | Attach a file as context (repeatable) |
--system | string | — | Inline system prompt |
--system-file | string | — | Load system prompt from a file |
--raw | bool | false | Strip formatting and the stats footer |
--no-stream | bool | false | Wait for the whole response before printing |
--show-env | bool | false | Print environmental impact after the response |
--load | string | — | Resume a saved conversation |
--save-on-exit | string | — | Write 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"Configuration
Where credentials and config live, how to log in, how to edit either file, and every available config key with its default.
Code review
Run a model over a git diff and get review notes back — bugs, security issues, performance problems, style. Not a replacement for human eyes, but the pass you run before you ask for those eyes, to catch the obvious stuff.