The System One EventUtahGo To Event Page →

Docs

Set up Midium, use every part of it, run it for your team, and build on it.

CLI reference

Every `midium` command and flag — engine, setup and account, models, agents and connections, and maintenance.

For developers

The midium command controls Midium from a terminal: start and stop the engine, manage models and your account, connect agent apps, and ask a model a quick question. Output is plain text, so it works over SSH, in scripts and in cron. Run midium for the command list with a one-line status, and midium <command> --help for a command's options.

Install#

  • With the Midium app — installed on first launch: the app links ~/Midium/bin/midium and adds ~/Midium/bin to your shell's PATH. Open a new terminal. To relink it, use Midium → Install Command Line Tool… in the menu bar.
  • A Mac without the app — see Install for the install script, then run midium setup.

The CLI reads your key and port from the environment, then from ~/Midium/.env, so there's nothing to export. Commands exit 0 on success and non-zero on failure; an unknown command exits 2, and Ctrl-C exits 130. Commands with --json print JSON for scripts.

Engine#

Shell
midium start                # run the engine in this terminal (Ctrl-C stops it)
midium start --detach       # run it in the background
midium stop                 # stop the engine
midium restart              # restart it and wait until it answers
midium open                 # open the desktop app, or bring it to the front
midium status [--json]      # running? version, mode, loaded models, memory
midium logs [-f] [-n N] [--errors]
CommandFlags
start--detach — run in the background (logs: midium logs). Refuses if an engine is already running.
stop—
restart—
open— Needs someone logged in at the screen; over SSH use midium start --detach.
status--json
logs-f, --follow — keep printing new lines. -n, --lines N — how many lines (default 100). --errors — error.log instead.

When the app runs the engine, stop and restart go through it:

CommandThe app runs the engineEngine started with midium start, or no app
midium stopQuits the app, which stops its engine (otherwise the app would start it again)Stops the engine
midium restartRestarts the engine; the app stays openStops it and starts it again in the background
midium startSays Midium is already runningStarts the engine (or waits if the app is restarting its own)
midium openBrings the app to the frontOpens the app, which uses the running engine

Setup and account#

Shell
midium setup                                        # pick Free, Hub or Join
midium setup --mode free --yes
midium setup --mode hub --license-token <token> --yes
midium setup --mode join --invite <invite-link> --yes
midium login                                        # sign in (opens the browser)
midium logout
midium account [--json]
midium hub subscribe                                # buy Midium Commercial; make this Mac the Hub
midium hub activate [token]                         # make this Mac a Hub
midium join <invite-link>                           # join a team's Hub
CommandFlags
setup--mode free|hub|join. --license-token <token> (Hub). --invite <link> (Join). --brave-key <key> — a Brave Search key for web search. --yes — never prompt.
login--password — email and password instead of the browser (for SSH). --email <address>. --no-browser — print the sign-in link instead of opening it. --signup — create an account.
logout—
account--json
hub subscribe--no-browser — print the payment link (pay from another device). --yes — skip the confirmation.
hub activatetoken — optional. Without one, uses your sign-in, or a license left by an older Courier install.
joininvite-link — required.

Signing in connects your account's Midium Cloud models and Midium Plus. hub subscribe signs you in if needed, shows this Mac's price, opens the payment page, waits for the payment and activates the Hub. See Plans, Hub and Join a Hub.

Models#

Shell
midium models list [--json]
midium models catalog [search] [--type chat] [--fits] [--all] [--json]
midium models show <model> [--json]
midium models install <model> [--load]
midium models downloads [--json]
midium models add <name>
midium models settings <name>
midium models remove <name>
CommandWhat it doesFlags
models listModels on this Mac — Ready (your models) and Installed (on disk) — with memory in use and to load.--json
models catalog [search]Models you can install, by category, with their status here. search filters by id, name or family.--type chat|vision|image|video|embedding|rerank|speech|system. --fits — only models that fit this Mac's memory (sizes each one; slower). --all — include older picks. --json.
models show <model>One catalog model: memory needed, variants.--json
models install <model>Download a catalog model. It shows as Installed and loads on first use. Ctrl-C stops watching; the download continues.--variant <name> — a quantization, such as 8bit. --context N — context window in tokens. --load — load it once downloaded. --speculative — also install its speculative-decoding helper. --instances N, --batch-size N. --no-wait — start the download and return.
models downloadsDownloads in progress and recent ones.--json
models add <name>Installed → Ready.--instances N — copies to load (each takes its own memory). --batch-size N — requests each copy works on at once.
models settings <name>Show or change how a Ready model is served. A loaded model reloads to apply a change: running requests finish first.--instances N, --batch-size N, --context N. --yes — reload without asking.
models remove <name>Ready → Installed: frees its memory, keeps its files. Cancels a download in progress.—

When a name matches several models or variants, the CLI shows a menu (↑/↓, Enter). In a terminal, install, add and settings ask for copies and requests per copy, showing the memory each choice needs. See Models.

Agents and connections#

Shell
midium ask "What's 2+2?"
midium ask gemma "Summarize this"                 # name a model first; partial names work
midium ask -m "YOUR_MODEL" --system "Be terse." --no-stream "…"
cat notes.txt | midium ask "Summarize"            # a piped prompt works too

midium connect hermes                             # Hermes Agent
midium connect openclaw --vaults                  # OpenClaw, with your vaults
midium connect openbot --model "YOUR_MODEL"        # OpenBot
midium connect hermes --status

midium key [--reveal | --bare]
midium tunnel
CommandFlags
ask [model] "<prompt>"A first word that names a chat model is the model; quote names with spaces. A partial name works, and several matches open a menu. -m, --model <name> — the model, as a flag. --system <text> — a system prompt. --no-stream — print the answer when it's done. With no model, uses the Sub-agent model from Settings → Agent, else one already in memory, else your first chat model.
connect hermes|openclaw|openbotWrites Midium into that app's settings as its model provider (backing up the old file). --model <name> — the model it uses (a menu when omitted). --vision-model <name> — a model for images when the main one can't see. --embedding-model <name>|off — OpenClaw's memory search. --vaults / --no-vaults — OpenClaw and OpenBot: add or remove your vaults as an MCP server. --dry-run — show the changes without writing. --status — is it connected? --json.
keyMasked by default. --reveal — the full key. --bare — only the key, nothing else (for scripts and other apps' key commands). On a server install, prints the operator key (UCE_KEY).
tunnelPrints the ssh -L command to run on another computer, so it can reach this Mac's dashboard and API at http://localhost:9100/.

See Connectors, Authentication and Remote access.

Maintenance#

Shell
midium config list [--reveal] [--json]
midium config get <KEY> [--reveal] [--json]
midium config set <KEY> <value>
midium doctor
midium update [--check] [--yes] [--force]
midium version
CommandFlags
config listEvery value in ~/Midium/.env, secrets masked. --reveal — show secrets. --json.
config get <KEY>One value. --reveal, --json.
config set <KEY> <value>Set one value.
doctorA checklist: version, engine port, mode, API key, platform, disk, memory.
updateInstalls the latest release when it's newer. --check — only report: exit 0 when up to date, 2 when an update is out. --yes — don't ask (on an app install: update from the CLI). --force — reinstall even when up to date.
versionPrint the Midium version.

On a Mac with the app, midium update asks whether to update from the app (it opens so you can click Update) or from the CLI (it downloads the new app, checks its signature, quits and replaces the app, and reopens it). Without the app, it runs the install script again and restarts the engine.

Something here wrong or out of date? Tell us.