Commands#
Everything the app does goes through the daemon, and most of it can be done or
inspected from the computer with mewla. Commands that talk to a running
daemon reach it through its local control socket; nothing here needs the
network. Most accept --json for scripts. mewla <command> --help prints the
flags for that command, and a command group named alone (mewla worker) its
subcommands. Help goes to standard output and exits 0; errors go to standard
error.
Run the daemon#
mewla # start on 127.0.0.1:9876 (same as mewla serve)
mewla --lan # also listen on Wi-Fi/LAN and Tailscale, for a trusted network
mewla -addr "$(tailscale ip -4):9876" # listen on host:port only, here your Tailscale IP
mewla -loopback-only # this computer only: no TLS listeners on Wi-Fi/LAN or Tailscale (test daemons)
mewla doctor [--json] # is this machine ready? platform, state, port, agents
mewla deps # offer this system's official agent CLI install (Linux, macOS)
mewla deps -agent codex # install that agent, and Brain runs on it (Mewla for Mac's Install buttons run this)
mewla setup # guided setup on top of doctor: pick Brain's agent
mewla setup remote # over SSH: sign in with a code, run in the background, pair a phone
mewla update [--check] # verify and install the latest release, then restart Mewla onto it
mewla telemetry [status|on|off|show|reset] # anonymous usage counts (docs/security-and-privacy.md#usage-counts)
mewla restart # restart Mewla running in the background; Sessions keep running
mewla restart -if-older # the same, only when the running Mewla is older than this one (Mewla for Mac runs it after an update)
mewla version [--json] # version, commit and platform
mewla boot install|status|uninstall # start at login: systemd user service (Linux), LaunchAgent (macOS), scheduled task (Windows)
mewla boot give-back # once Mewla has stopped: Codex and Claude Code get their own settings back
-state-dir DIR selects a state directory other than ~/.mewla. Pass the same
value to every command that should use it.
To run a second, throwaway Mewla beside your own (to test onboarding, say) set
MEWLA_STATE_ROOT=/absolute/dir for the daemon and for every command that talks
to it, and give it its own -addr port. That moves all of Mewla's state (devices,
Brain, Calendar, Work) and leaves HOME alone, so your agents stay signed in and
your own Mewla is untouched.
Pair and manage devices#
mewla login [-name <word>] # remote access: an HTTPS address that works from any network
mewla logout [-delete-account] # turn remote access off; -delete-account deletes the account
mewla web [--print] # open the web UI in this computer's browser, paired; print its addresses
mewla pair [address] # one-time code: phone QR and a short link for this computer's browser
mewla pair --details # the same code as paste links for phone and every browser address
mewla address list [--json] # every address phones and browsers can use
mewla address add <https-url> # an HTTPS tunnel or proxy in front of this computer
mewla address remove <address>
mewla devices list [--json] # id, name, last seen, the app it last connected with ("0.4.6 android"; unknown (pre-0.4) for the Expo app)
mewla devices pending # browsers waiting for approval
mewla devices approve <shown-number> # the number the waiting browser shows
mewla devices deny <shown-number>
mewla devices revoke -id <device-id>
See Connect and pair.
Brain and Work#
mewla brain executors --json # Brain's agent and the agents available
mewla brain use <executor> # move Brain to another agent; the thread stays
mewla brain executors add <name> -like claude|codex # a second sign-in as its own executor
mewla brain executors login <name> # sign that executor in to its account
mewla brain workspace # path to Brain's notes
mewla brain live-text on|off|status # Brain's Claude replies show as they are written (on by default)
mewla brain objective show|clear
mewla brain objective set "Ship atlas-notes v1.4 this week" # the first line of the tray in the app
mewla brain work list --json # open Work; -all, -full, -id <work> for more (-id adds transcript paths)
mewla memory search "<phrase>" [--from user|brain|context|all] [--since 30d] [--limit 20] [--json]
mewla memory show <id> [--around 3] [--json] # a chat message with its neighbours
mewla brain work update -id <work> -status done
mewla brain work update -id <work> -status waiting \
-question "Keep both copies, or the newest edit?" -choice "Keep both" -choice "Newest wins" \
-recommend "Newest wins" # the phone tags that button "Brain's pick"
mewla brain work update -id <work> -status waiting -wait-for "the deploy window" -until "2026-11-25 22:00"
mewla brain work update -id <work> -until 3d # moves the end of the standing wait
mewla brain work update -id <work> -wait-for "" # ends the wait
mewla brain work event -id <work> -kind deploy.done -dedupe deploy-42 -payload <file> -actionable
mewla brain work event adds an event to a Work from a script. With
-actionable it is delivered: Brain is woken for that Work with the event, or
the command fails and says why (for example, Brain still has an earlier event of
that Work to handle; send it again with a new -dedupe once that is done).
Without -actionable the event is only recorded. The same -dedupe key is the
same event. A Work that waits (-status waiting -wait-for …) refuses such an
event until the wait ends; a Trigger's own firing ends it. To watch something
and wake Brain when it changes, use a Trigger instead
of a script loop.
See Brain and Work.
Workers#
mewla worker list --json
mewla worker status -id <session> --json
mewla worker capture -id <session> --json # the transcript
mewla worker send -id <session> --work-id <work> -text "Also update the tests"
mewla worker send -id <session> -command /compact # the agent's own command, not a prompt
mewla worker receipt -id <session> --work-id <work> --turn-id <turn> # did an input arrive?
mewla worker answer -id <session> -prompt <id> -choice 1 # any blocking prompt: permission, plan, startup, question; -prompt also takes an approval id
mewla worker approvals [-id <session>] # decisions agents wait on (Claude permission hooks, Codex app-server requests)
mewla worker approve -id <session> -approval <id> -option allow # or deny
mewla worker close -id <session>
mewla attach [name|id] # pick a live Session, or name one; Ctrl-\ detaches
mewla attach --all # every live Session tiled in this terminal, updating
mewla host status [--json] # the session host and the Sessions it runs
attach shows a Session's terminal where you type, at its size, and types
into it; Ctrl-\ detaches and the Session keeps running. Every Session runs in
the session host, which outlives daemon restarts and updates.
A Session has one size, the one its program draws for. The terminal a person
last acted on sets it: attach sets it when it attaches, when its window is
resized and when you type into it; the app sets it when its terminal opens or
is shown again and when you type there. Every other terminal showing the
Session is drawn again at that size and keeps showing it right: attach shows
the host's screen cut to its window (the bottom rows of a taller screen, the
left columns of a wider one), and the Android app scales the screen down to a
size you can still read and lets you drag sideways for the rest (the iOS app
and the web still show that size on their own grid until you act there).
Typing there, or resizing that window, makes its size the Session's again;
scrolling there only reads and leaves the size as it is.
With no argument it opens a picker of the live Sessions, newest first: name
(the Worker's name, Brain or Shell), agent, state (working, idle, needs
input), directory and age. The arrow keys move, typing filters, Enter attaches
and Esc cancels. Without a terminal it prints the list with each Session's id.
With an argument it takes a Worker's name in any case (or the start of exactly
one name), brain, or an id (mh-…); a name that fits several Sessions lists them and exits
non-zero.
mewla attach --all (or Tab in the picker) tiles every live Session in the
terminal as a grid that keeps updating. Each tile shows its number, name,
agent and state, and the end of that Session's screen, read from the session
host's own terminal state: the grid only watches, and never resizes or types
into a Session. The arrow keys or Tab move, 1-9 or a click choose, and Enter
opens the chosen one full screen to type into (this terminal's size becomes
its size, as with a plain attach). In an opened Session Ctrl-] returns to the
grid, Ctrl-\ leaves, and a Session that ends returns to the grid; q or Ctrl-\
leaves from the grid. Resizing the terminal re-tiles it. Tiles are at least 36
columns by 7 rows, so when more Sessions are live than fit, the grid shows
the newest ones and its last line says how many need a bigger terminal.
send -command types one of the agent's own slash commands into the Session
instead of a prompt. Only /compact is allowed, optionally with instructions
on the same line (-command "/compact keep the open questions"), for Claude,
Codex and pi. It admits no Turn and needs no Work, so it also reaches a Worker
whose Work no longer owns its Session. It is refused while the agent is working
or a prompt is open. Mewla sends it itself when a Claude Worker stops on
"Request too large … Run /compact", and continues its Turn once it compacted.
answer replies to a prompt a delegated Worker is stopped at: a numbered menu
(a permission or plan request, a startup question) by -choice <option number>,
or an AskUserQuestion by -answers '[{"selected":[1],"other":""}]', one entry
per question with 1-based option numbers. -prompt is the id Brain receives in
the Worker's needs_input ("event":"prompt_blocked", with the prompt's options
in details.prompt and the exact command in details.answer_with). Every
blocking prompt raises that one event, whether the daemon read it from the
terminal or a permission hook is holding it (a sub-agent's dialog is not drawn in
the terminal at all). Allowing a permission Brain holds needs -basis, the brief
sentence that authorizes it; -escalate -basis "<why>" hands it to the user
instead. For a prompt in the terminal the daemon reads the terminal again first
and sends no key when that prompt has passed (prompt_gone). While a prompt is
open, worker send refuses with prompt_open instead of typing into it. A
permission a hook is waiting on is resolved through that decision, not by keys.
approvals and approve stay for the requests that have no terminal prompt to
answer: a Codex app-server approval is allowed or declined straight through
Codex, without keys. Claude Workers run in bypass mode by default, so Claude
permissions are rare (an ask rule or organization policy), and Brain answers
them with answer. The phone answers the same requests.
mewla worker spawn, worker progress, worker release, brain context,
brain playbooks, brain gc and the other brain work actions (create,
close, event, resolve) are what Brain and its Workers call. You can run
them, but you rarely need to.
Services, Calendar, Screen, Extensions, Resources, Watch#
mewla service list --json
mewla service register -unit my-preview.service -name "Docs preview" -port 3080
mewla service unregister -unit my-preview.service
mewla service tunnel start|status|stop -id <service> -generation <generation>
mewla calendar list --json
mewla calendar create -title "Review plan" -kind reminder -date 2026-10-09 -time 09:30
mewla calendar create -title "Digest" -kind scheduled_action -date 2026-10-09 -time 09:30 -instruction "..." -source-thread <thread> -executor claude -model <model> -reasoning low
mewla calendar run -id <item> --json
mewla calendar snooze -id <item> -minutes 15 --json
mewla calendar done -id <item> --json
mewla calendar cancel -id <item> -revision <revision> --json
mewla trigger list --json
mewla trigger create -title "Open PRs" -every 10m -check './poll.sh' -instruction "Review each new PR" -source-thread <thread>
mewla trigger check|pause|resume|delete -id <trigger>
mewla screen status # support, permissions, allowed devices, keep-awake
mewla screen disable # turn Screen off; every device must be allowed again
mewla screen enable [-allow-sleep]
mewla agent-use status|on|off|fix # agents use your Chrome; the app's one switch
mewla agent-use need <screen_recording|accessibility|chrome> --reason "…" # ask for a missing permission: one card in Brain's thread
mewla computers list [-all] # other Mewla computers this Brain can use: executors, sign-ins, rules
mewla computers rules [mac] [-set TEXT | -file F | -clear] # a computer's own rules; every Worker started there gets them (-set: yours, this computer only)
mewla computers allow mac [-no] # your yes on this computer: mac may start Workers, read files and run commands here
mewla worker spawn -computer mac … # a Worker there; its Work stays here
mewla computers read|ls mac:<path> # a file or folder there
mewla computers run mac -- <command> # a command there (instead of ssh)
mewla computers invite | add <invite> # connect two computers without the app
mewla computers remove mac
mewla agents mcp connect [-for claude|codex] # let Claude Code or Codex hand work to Brain (see Agents outside Mewla)
mewla agents mcp list|approve|deny|revoke|requests
mewla connections list --json
mewla connections import-gh # copy your current gh login into the daemon's vault
mewla resources # one resource sample as JSON
mewla gc status [--all] # what this Session holds and what happens to it when it ends; collected today; held Sessions; the trash
mewla heavy run [-wait 60m] -- <command> # one heavy job at a time here (VM, emulator, release build); while another runs, says who and since when
mewla heavy status # who holds the heavy lock now, and since when
mewla gc keep PATH --until DATE --why REASON # keep a path in this Session's TMPDIR past it (30 days at most; keeps do not nest); from Brain's host: a path in t/, trashed when the keep ends
mewla gc release PATH|<id> # trash a path in this Session's TMPDIR (Brain: in t/) now, or end one of its keeps
mewla gc restore <id> # put a trashed item back where it was (in t/: unmarked, 48 h from now)
mewla gc why PID|PATH # what holds it: its scratch, Session and Work, or "not Mewla's"
mewla repo-map scan <folder|URL> # observe a repository into its map folder (~/.mewla/repo-maps/…); see repo-map.md
mewla repo-map render <map folder> # check map.json against the code and write the page, index.html
mewla watch status # signals per source and project, last pass, errors
mewla watch projects
mewla watch signals --project mewla --source human --since 24h
mewla watch problems --rule judgment
mewla watch enable && mewla watch judge # agent judgment; costs tokens
mewla watch problem label <id> real|not|later --note "why" # later takes --for 1d|3d|2w (default 7d)
mewla watch problem link <id> --work <work id> # Work that handles it: fixing, then fixed
mewla watch triage [--backlog] # hand Brain the new problems; --backlog sends every waiting one
mewla watch brief # hand Brain the morning brief now
mewla watch project rename --project <id> --name "New name"
mewla watch project link-linear --project <id> --team KEY --confirm
Details: Services, Calendar, Triggers, Extensions, Agents outside Mewla, Resources, Watch.
Mail#
Email addresses of an agent's own, receive only, on the Agent Mail Extension (it must be on in Extensions). Output is JSON; mail text is third-party data.
A=$(mewla mail new --for "sign-up at example.com" | jq -r .address) # open 7 days (--days up to 90), released when the Session ends
mewla mail wait "$A" --from example.com --timeout 3m # next unread mail: text, codes, links
mewla mail messages [ADDRESS] [--limit N]
mewla mail read ID [--html]
mewla mail attachment ID N --out PATH
mewla mail list [--all]
mewla mail keep ADDRESS --days N # also past the end of the Session
mewla mail release ADDRESS # mail to it is refused from now on
Details: Agent Mail.