Melange
Melange for Agents (CLI)

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

CommandPurpose
melange authSign in, inspect authentication, print the resolved token, or sign out
melange librarySearch and inspect public library repositories and providers
melange repoList, inspect, create, edit, and delete repositories
melange modelUpload, import, inspect, monitor, download, and manage repository models
melange reportRead general, LLM, and package benchmark reports
melange deployList deployment options and generate exact SDK deployment guides
melange usageInspect current usage and plan quotas
melange mcpServe the MCP server (stdio or Streamable HTTP) — 18 tools (17 over HTTP)
melange apiCall 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:

FlagBehavior
--jsonPrint the complete documented JSON result
--jq EXPRESSIONFilter JSON and print the selected value
--template TEMPLATEFormat JSON with a Go template
--paginate / --allFetch 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 --json

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

ValueBehavior
autoTable in a terminal, tab-separated values otherwise (default)
tableForce the table, for example when piping into a pager
tsvForce 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 -R

Agents 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 --json

Public Hugging Face IDs and Melange repository names may look similar. Use the repository and model identifiers returned by Melange instead of guessing.

Environment

VariablePurpose
MELANGE_API_KEYUse an access token or PAT from the environment; highest credential priority
MELANGE_API_KEY_FILERead a credential from a file and fail if the file is unavailable
MELANGE_HOSTOverride the API host; defaults to https://api.zetic.ai
MELANGE_API_TIMEOUTSet the timeout for an ordinary API call, such as 45s or 2m
MELANGE_DEBUGLog sanitized request and response lines to standard error
NO_COLORDisable colored output
TERM=dumbDisable 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 fallback

Run 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

CodeMeaningRecommended action
0SuccessContinue
1API, network, or command failureInspect the error; it may be transient
2Invalid arguments or flagsFix the command; do not retry unchanged
4Missing or rejected credentialsAuthenticate again
130InterruptedTreat as cancellation; upload sessions are preserved

Use --no-input when automation must never prompt.

Full command help

Useful built-in topics:

melange help environment
melange help formatting
melange help exit-codes

On this page