All docs pages

DocsReference

Headless mode and the CLI

Run ModelDeck's engines, local server and MCP server with no window, and control them with the modeldeck command.

Coming in the next release

Everything on this page is merged into ModelDeck but is not in a published release yet.

What it is

Headless mode runs ModelDeck's engines, the local server and the MCP server with no window, no menu bar icon and no display. It works on macOS, Windows and Linux. You control it with the modeldeck command.

It uses the same folder as the app, ~/.modeldeck, so your models, presets, settings, downloads and logs are shared. Only one of the two can run the engines at a time; see The app and headless mode.

Headless mode ships as a separate archive, not inside the Mac app. It is not offered for download on this site yet.

Start serving with no window
  1. Unpack the archivemodeldeck-headless-<platform>-<arch>, with its own Node runtime
  2. Run modeldeck serveEngines, the local server and MCP start
  3. Load a modelmodeldeck load <model>, or let a request load it
  4. Call the APIAny OpenAI or Anthropic client, as with the app
  5. StopCtrl+C, or modeldeck stop

Install

The archive holds bin/modeldeck (modeldeck.cmd on Windows), the program, its own Node runtime, the engine help files and the licenses. On Windows and Linux it also holds the llama.cpp engine. On a Mac it uses llama.cpp from Homebrew, like the app.

macOS

The archive is not signed, so clear the quarantine flag after unpacking it:

xattr -dr com.apple.quarantine <folder>

Splash, GGUF and MLX all work, as in the app.

Windows

Unpack the .zip and run bin\modeldeck.cmd. GGUF is the only engine.

Linux

Unpack the .tar.gz and run bin/modeldeck. GGUF is the only engine.

Serve

modeldeck serve

ModelDeck prints the API and MCP addresses and keeps running until you press Ctrl+C or run modeldeck stop.

OptionWhat it does
--port NUse this port for the local server for this run. 8000 and 8001 are refused. Engines still use 8101 to 8199.
--no-mcpDo not start the MCP server.
--quietPrint less.

The memory check, the API key, loading on first request and idle unloading work as in the app, from the same settings.

Commands

CommandWhat it does
modeldeck serveRun in the foreground.
modeldeck stopStop a headless ModelDeck and its engines.
modeldeck statusWho owns this ModelDeck folder, the server address, whether it needs a key, and the loaded models.
modeldeck models [--rescan]Models on this computer, with id, name, engine, size and quant.
modeldeck enginesEach engine, whether it is available, and its version.
modeldeck psLoaded models.
modeldeck load <model> [--preset P] [--ctx N] [--ttl M] [--no-wait]Load a model by library id, name or a unique part of its name, and wait until it is ready. --ttl sets the idle minutes.
modeldeck unload <model>Unload a model.
modeldeck search <query> [--limit N]Search Hugging Face.
modeldeck download <repo> <file...>Download files into the model folder. Ctrl+C stops watching; the download stays resumable.
modeldeck downloadsDownloads and their progress.
modeldeck logs [<instance>] [--follow] [--limit N]The app log, or one engine's log.
modeldeck service install, uninstall, statusRun headless ModelDeck at login. See Start at login.

Every command takes --home <dir> to use another ModelDeck folder, --json for raw output, --help and --version.

Exit codeMeaning
0Done.
1Error.
2Wrong usage.
3Another ModelDeck owns this folder.
4Nothing is running.

The app and headless mode

One ModelDeck at a time owns the engines and the local server for a ModelDeck folder.

  • If the app is running, modeldeck serve stops with exit code 3. Other commands, such as status, load and models, talk to the app instead.
  • If headless ModelDeck is running, opening the app shows "ModelDeck is already running without a window" and quits. Stop headless mode with modeldeck stop (or modeldeck service uninstall if it runs as a service), then open the app.
  • A ModelDeck that crashed is noticed within about two minutes, so the next one can start.

Headless mode cannot read API provider keys saved in the app, so it uses local engines only.

Start at login

modeldeck service install sets headless ModelDeck to start when you log in. Add --dry-run to see what it would do without doing it.

macOS

It installs a launch agent for your user, which restarts ModelDeck if it exits with an error. Its output goes to ~/.modeldeck/logs/headless.log. It never touches the Splash background server or the app's own login item.

Windows

It adds a scheduled task for your user, ModelDeck\Headless, that starts at logon and restarts up to three times. Stop it with modeldeck stop; ending the task in Task Scheduler kills ModelDeck without stopping its engines.

Linux

It adds a systemd user service, modeldeck.service, and enables it. Read its log with journalctl --user -u modeldeck. To start it at boot without logging in, run loginctl enable-linger $USER yourself; ModelDeck prints the command but never runs it.

modeldeck service uninstall stops a running headless ModelDeck first, so its engines stop cleanly.

For the steps in order, with how to preview, check and remove it, see Run headless as a service. To try headless mode first, follow Run ModelDeck with no window.

These docs describe ModelDeck as of app commit 7d38f80, checked 2026-12-03. Features merged after the latest release are marked Coming in the next release.