Reference

CLI reference

Every modem command and flag.

The core

CommandWhat it does
modemWhere things stand: sessions, running jobs, recent files.
modem claudeOpens the agent on your computer, or reattaches. Also codex; kimi coming soon.
modem run "…"Runs a task headless and returns immediately.

Setup and tools

CommandWhat it does
modem setupAccount, computer and tools in one pass. Runs automatically if you skip it.
modem setup --newProvisions a fresh computer: use if yours is unreachable for good.
modem connect <tool>github, claude, codex. Persists on the computer.
modem doctorDiagnoses the computer and the connection.
modem versionPrints the version of the installed binary.

Jobs

CommandWhat it does
modem run "…"Starts a job. Flags below.
modem logs [id] [-f]Output of the current job, or the one you name.
modem stop [id]Stops it and keeps what it produced.
modem lsEvery session and every job.
Flag of runEffect
--agent claude|codexWhich agent. Default claude.
--in <folder>Working directory on the computer.
--timeout 45mHard limit. Default 30m, maximum 4h.
--shellPlain shell command, no agent.
-fFollow immediately.

Files

CommandWhat it does
modem push <path>Sends a file, or a whole folder with its environment files.
modem pull <path> [dest]Brings something back.
modem files [path]Lists the computer's disk.
modem shellA plain shell up there.

Keys

KeyEffect
Ctrl+QDetach from an interactive session; it keeps running.
Ctrl+CGoes to the agent, as it would locally.

Aliases and older names

login still works for setup, sync for push, get for pull, ps and jobs for ls, sh for shell. Mistyping a command suggests the closest one instead of dumping the whole help.

modem login --code XXXX-XXXX is the reconnection flow: it exchanges a one-time code from the site for your account token, on a new machine or after a reinstall. Reconnect codes are valid for 60 minutes.

Files and environment

NamePurpose
~/.modem/config.jsonYour account token and your computer's address. Written by modem setup.
MODEM_URLTarget a machine directly, bypassing the account. Development only.
MODEM_TOKENThat machine's access token.