CLI Reference
A concise reference for Melange CLI commands, output, authentication, and automation.
melange uses human-readable tables in a terminal and structured output for
scripts and agents. Run melange <command> --help for every flag and example.
Command groups
| Command | Purpose |
|---|---|
melange auth | Sign in, inspect authentication, print the resolved token, or sign out |
melange library | Search and inspect public library repositories and providers |
melange repo | List, inspect, create, edit, and delete repositories |
melange model | Upload, import, inspect, monitor, download, and manage repository models |
melange report | Read general, LLM, and package benchmark reports |
melange deploy | List deployment options and generate exact SDK deployment guides |
melange usage | Inspect current usage and plan quotas |
melange mcp | Serve the MCP server (stdio or Streamable HTTP) — 18 tools (17 over HTTP) |
melange api | Call a public /v1 endpoint that does not yet have a dedicated command |
melange model download is billable. Repository deletion and other
consequential commands require confirmation. Agents should resolve the complete
target and ask the user before passing --yes.
Structured output
These flags are shared by server-backed commands:
| Flag | Behavior |
|---|---|
--json | Print the complete documented JSON result |
--jq EXPRESSION | Filter JSON and print the selected value |
--template TEMPLATE | Format JSON with a Go template |
--paginate / --all | Fetch every page and merge list results where supported |
Data is written to standard output. Progress and diagnostics are written to
standard error. Prefer --json or --jq for scripts and agents.
melange repo list --paginate --jq '.results[].full_name'
melange usage quotas --jsonHuman output
In a terminal, lists print as aligned tables under a ruled header with a row
count, and detail commands print aligned Label: value blocks. When output is
piped or redirected, the same commands print headerless tab-separated values —
stable for scripts.
--format selects that layout explicitly instead of by detection:
| Value | Behavior |
|---|---|
auto | Table in a terminal, tab-separated values otherwise (default) |
table | Force the table, for example when piping into a pager |
tsv | Force tab-separated values in a terminal |
--format also governs value formatting, so a forced table shows relative
times and human byte sizes, and forced tsv shows RFC 3339 timestamps and raw
byte counts. It never adds color to a non-terminal; color follows NO_COLOR
and TERM=dumb.
melange model list -R acme/whisper --format table | less -RAgents should leave --format at auto and read --json.
Repository and model targeting
Repositories use ACCOUNT/REPO. Every melange model command requires an
explicit -R ACCOUNT/REPO; model keys are not repository names.
melange model list -R zetic/whisper-tiny --json
melange model status MODEL_KEY -R zetic/whisper-tiny --jsonPublic Hugging Face IDs and Melange repository names may look similar. Use the repository and model identifiers returned by Melange instead of guessing.
Environment
| Variable | Purpose |
|---|---|
MELANGE_API_KEY | Use an access token or PAT from the environment; highest credential priority |
MELANGE_API_KEY_FILE | Read a credential from a file and fail if the file is unavailable |
MELANGE_HOST | Override the API host; defaults to https://api.zetic.ai |
MELANGE_API_TIMEOUT | Set the timeout for an ordinary API call, such as 45s or 2m |
MELANGE_DEBUG | Log sanitized request and response lines to standard error |
NO_COLOR | Disable colored output |
TERM=dumb | Disable colored output |
Credential precedence is:
MELANGE_API_KEY
> MELANGE_API_KEY_FILE
> OAuth (operating system keyring or config, auto-refreshed)
> PAT in the operating system keyring
> PAT config fallbackRun melange auth status to see the active API host and credential source
without revealing the token. Use melange help environment for config and
state-file locations.
Exit codes
| Code | Meaning | Recommended action |
|---|---|---|
0 | Success | Continue |
1 | API, network, or command failure | Inspect the error; it may be transient |
2 | Invalid arguments or flags | Fix the command; do not retry unchanged |
4 | Missing or rejected credentials | Authenticate again |
130 | Interrupted | Treat as cancellation; upload sessions are preserved |
Use --no-input when automation must never prompt.
Full command help
Generated command reference
Browse the generated page for every command and subcommand.
Melange CLI on GitHub
View releases, source code, the agent skill, and issue tracker.
Useful built-in topics:
melange help environment
melange help formatting
melange help exit-codes