Skip to content
Edith

Docs

Command reference

Conventions

These rules hold for every ed command, so you can rely on them when a script or an agent reads the output. A command page that repeats one of them repeats it for convenience, not to add an exception.

This page covers what --json promises, which stream carries what, what each exit code means, how a failure is printed, how flags and values are read, how confirmations work, when Edith needs to be running, and where to get help.

Output for people and for scripts

Without --json, a command prints a table or a few lines meant for reading. With --json, it prints data meant for a program.

The flag is --json, long form only, and it goes on the command that produces the output: ed clipboard ls --json. There is no -j.

A command that offers --json prints exactly one JSON document on stdout, followed by a newline. Object keys are always sorted. Arrays keep the order the command built them in. That is what makes two runs of the same command diff cleanly:

Output
$ ed version --json{  "appRunning": true,  "version": "1.0.0"}

The rest of the shape rules:

  • Pretty output is indented two spaces per level. An empty array is [] and an empty object is {}.
  • An optional value is printed as null rather than having its key dropped, so a --json shape has the same keys on every run whether or not the value is there.
  • Dates are ISO 8601, as in 2026-08-06T22:57:22Z. A missing date is null.
  • A whole number prints as an integer, so a percentage of exactly three prints 3 and not 3.0. A number that is not finite prints null.
  • Text passes through as UTF-8 rather than as \u escapes, so a track title keeps its accents.

The top level is not always an object. Anything that is a list is a list: ed usage limits, ed usage projects, ed usage sources, ed permissions refresh, ed calendar ls, ed clipboard ls, ed download ls, ed machines ls, ed extensions ls, ed app actions, ed app paths, and ed app links all print a top-level array. Others, ed version, ed permissions ls, ed usage summary and ed install among them, print an object.

Not every command takes --json. ed guide --json prints the complete command catalog for automation. ed schema and ed config export are already JSON, so there is nothing to switch on. Plain ed guide, ed completions zsh, ed completions bash, ed completions fish, ed machines exec, ed machines docker logs and ed machines docker compose logs print something that is not Edith's to shape: a manual, a shell script, or another program's own output.

Two commands print a stream instead of one document, and only with --follow:

Output
ed menu-bar-stats stats --json                  one pretty document, then exited menu-bar-stats stats --json --follow         one compact document per line, until interrupteded machines metrics <machine> --json            one pretty document, then exited machines metrics <machine> --json --follow   one compact document per line

Following prints newline-delimited JSON, so ed menu-bar-stats stats --json --follow | jq . reads one sample at a time. The third --follow, on ed usage refresh, means something else: it attaches to a refresh already in progress, and still ends in one document.

ed config get on a setting that is not a string prints the value as compact JSON on one line, so a list setting reads as ["a","b"].

stdout is data, stderr is commentary

stdout carries the answer and nothing else: the table, the JSON document, the file contents, the remote command's own output. stderr carries everything about the answer: errors, hints, progress, and notes such as a list being truncated. So you can pipe stdout straight into jq:

Output
ed extensions ls --json | jq '.[] | select(.enabled) | .id'

Commands that would otherwise sit silent while they work show progress on stderr. ed usage refresh shows a header, a row per phase and a summary. ed cleaner scan, ed cleaner clean, ed machines files get, ed machines files put and ed app relaunch show a spinner that names what they are on, and the two transfers count bytes. Progress is switched off when nobody is watching: --json turns it off, and so does stderr not being a terminal, NO_COLOR being set, or TERM being dumb. A piped or redirected run never gets a spinner or escape sequence in its log.

On a non-zero exit, stdout is empty. A command that fails never leaves half a document behind, so ed usage summary --json > out.json either writes a whole document or writes nothing.

ed machines exec, and the ed <machine> <command...> shorthand for it, keeps the remote command's two streams apart: its stdout arrives on your stdout and its stderr on your stderr, unlabelled and unbuffered, so the shorthand works in a pipeline.

Exit codes

There are five:

Code Name Meaning
0 success The command did what it was asked. A preview or a dry run that changed nothing on purpose is also 0, and so are --help and --version.
1 failure The command was understood and refused or could not finish: a value that failed validation, a write to a read-only setting, a remote command that exited non-zero, a broadcast where at least one machine failed.
2 usage The command line was wrong: an unknown flag, a missing argument, an unparseable value, or a number outside what the option accepts.
3 notFound The thing you named does not exist, or names more than one thing: an unknown machine, an ambiguous machine prefix, an unknown setting key, permission, guide topic, shell, usage range or app action.
4 unavailable The thing you named exists but cannot be reached or acted on right now: an extension is off, a permission is missing, a machine is down, docker is not usable, the store you asked to read is empty, or the command timed out.

A few details worth knowing:

  • When ed cannot reach Edith at all, even after starting it, it exits 4; see What needs Edith running.
  • A setting value that is the wrong type or outside the allowed set is 1 rather than 2, because the command line was well formed and the value was the thing that was wrong.
  • Numbers are checked for both form and range, so --interval 0 and --interval fast both exit 2.
  • An unknown machine, setting key, permission, app action, guide topic, completion shell, --range value or --source name is 3, and the hint lists the valid names.
  • 4 is also the code for an empty store, because an empty store is something you cannot act on rather than something that failed: no clipboard history yet, an empty shelf, an empty download queue, no limits collected yet, no workspaces saved, no music folder chosen. It is also the code for a machine that does not answer and for docker that is missing on the far side.

The passthrough exception

ed machines exec passes the remote command's own exit status through rather than mapping it onto the five codes. So do the ed <machine> <command...> shorthand, ed machines docker logs and ed machines docker compose logs. These are not limited to 0 through 4:

Output
$ ed devbox test -f /etc/nope$ echo $?1$ ed devbox sh -c 'exit 42'$ echo $?42

Everything else in ed machines uses the normal codes. A machine that cannot be reached is 4 whatever you were trying to run on it, because the remote command never started.

How a failure is reported

A failure prints its message on stderr, then a hint when there is one:

Output
error: <message>hint: <hint>

The message says what happened in lower case and without a full stop. The hint is a next step, usually a command you can run or the list of things you could have named instead.

Multi-line failures stay readable. Remote output often arrives as several lines, and only the first one carries the label; the rest are indented to line up underneath it:

Output
$ ed machines power reboot devbox --yeserror: Devbox did not reboot: sudo: a password is required       Call to Reboot failed: Interactive authentication required.hint: give this account passwordless sudo for systemctl on Devbox

Every line is trimmed, and blank lines are dropped.

Discover, then act

Nothing in ed asks you to guess a name, and every list that tells you the valid names is quick to run:

Output
ed machines ls            every configured machine, and whether it is connecteded config ls              every setting, its group, its type and its current valueed config describe <key>  the type, the allowed values and the default, before you writeed extensions ls          extension ids, and which are oned permissions ls         permission ids, and what the app last observeded usage sources          the agents that produced the usage historyed cleaner categories     the cache categories the cleaner knowsed tools ls               the command line tools extensions use, and whether they are installeded app actions            the one-shot actions, what each needs, and whether it can run now

Where a name is forgiving, it is forgiving in a defined order rather than fuzzily. A machine resolves by exact name, then by ssh config alias, then by ID, then by a unique prefix, all ignoring case. A prefix that matches more than one machine exits 3 and lists the matches rather than picking one, and an unknown name exits 3 and lists the machines that do exist. A config key that does not exist exits 3 and offers the keys that contain what you typed.

Two commands answer "can I do this right now" without failing. ed version --json and ed permissions ls --json both carry an appRunning field, and ed app actions reports each action's available flag. Read one of those first rather than running a command to find out whether it would work.

Flags and values

Long options take their value as the next word or after an equals sign, so --limit 5 and --limit=5 are the same. There are only three short forms: -f for --follow on ed menu-bar-stats stats, ed machines metrics, ed machines docker logs and ed machines docker compose logs; -a for --all on ed machines docker ps and ed machines files ls; and -t for --tty on ed machines exec.

Boolean flags are presence only. --no-machines on ed usage refresh is the one negative flag: it is independent from --machines, and passing both is a usage error. The words on, off, true, false, yes, no, 1, 0, enabled and disabled are read as setting values, by ed config set and by ed music shuffle and ed music repeat, and never as flag values.

Options that repeat collect their values: --source and --machine on ed usage summary, daily and models narrow to several agents, and --root on ed cleaner scan and clean sweeps several folders. Every other option takes its last value.

-- ends option parsing. ed machines exec and the ed <machine> <command...> shorthand take everything after it as is, which is how a remote command keeps its own flags:

Output
ed machines exec devbox -- ls -la /srved devbox ls -la /srv

-h and --help work on every command, print to stdout and exit 0. --version works on every command too, with the same stdout and exit 0.

Shared options

--player appears on ten commands: ed music status, play, pause, stop, toggle, next, previous and volume, plus open-current and reveal-current. It takes builtin, spotify or apple, and leaving it out means whichever player is active. An unknown name exits 3.

--range, --source and --machine appear on ed usage summary, daily and models. --range takes today, week, month or all and defaults to all; an unknown range exits 3 with the valid ones listed. --source and --machine repeat and are unset by default, and a source or a machine the collected history has never seen exits 3 and points at the ones it has. ed usage projects takes --range with the same default, and neither --source nor --machine.

Other options with the same name can have a different default on different commands. --limit is the one to watch:

Output
ed clipboard ls --limit <n>            25 by default, 0 means all of themed download ls --limit <n>             25 by default, 0 means all of themed color ls --limit <n>                25 by default, 0 means all of themed usage projects --limit <n>          25 by default, and must be greater than zeroed app updates --limit <n>             20 by default, and must be greater than zeroed machines files search --limit <n>   300 by default, and must be greater than zero

Arguments

Positional arguments come in the order the synopsis shows them. <machine> always resolves the same way, as described above. An index is always 1-based and always counts in the order the matching ls printed, whether it is a clipboard entry, a shelf item, a download, a saved forward, a snippet or a pane. A <path> on a machines files command is a remote path and a <local> is a local one, and cp, mv and rm take several of them before the destination, like the shell tools they mirror.

Confirmations and previews

Commands that delete, quit, restart or otherwise change something you cannot easily undo preview first. Without --yes they print what they would do, change nothing, and exit 0, so a missing --yes is never an error to handle. With --yes they do it. JSON previews say so with applied: false and requiresConfirmation: true.

Examples include ed machines rm, ed machines power reboot, ed machines power shutdown, ed machines docker volume-rm, ed machines docker prune, ed cleaner clean, ed running-apps quit, ed music rm, ed app quit, ed app relaunch, ed app rollback and ed app clear-updates. ed machines files rm moves to the Trash without asking and needs --yes only for --delete, which removes for good.

Secrets are never an argument value. ed machines add and ed machines edit take --password-stdin and --key-passphrase-stdin and read the secret from stdin, so it cannot end up in a process listing or your shell history.

What needs Edith running

Most commands are answered by the Edith app. When Edith is not running, ed opens it in the background, without showing a window, and waits up to about 20 seconds for it to answer. If Edith still cannot be reached, the command fails on stderr with:

Output
Edith is not running for this app installation. Open this Edith app and try again.

and exits 4.

These commands never need the app: ed guide (without --json), ed schema, ed version, ed status, ed install, ed uninstall, ed completions and ed app rollback. ed app relaunch --yes starts Edith itself.

A command that comes from an extension needs that extension turned on. ed extensions ls lists which are on, and ed guide --json lists every command you can run right now. A change made with ed reaches Edith at once.

A command that runs longer than its time limit is cancelled and exits 4 with The command timed out and was cancelled. Most commands allow 30 seconds; ed invoke takes --timeout, and installing or updating extensions and tools allows up to 30 minutes.

Extension and Library commands

ed invoke and every ed extensions command (ls, info, install, update, enable, disable, remove, status, verify, doctor, setup) always print JSON, so --json is optional for them. --help prints usage text, and --version prints an object containing version.

A failure prints a JSON object with error and exitCode on stderr and leaves stdout empty. Their exit codes:

Exit code Meaning
0 Success
1 The operation failed or was refused
2 Unknown command, invalid arguments, or invalid JSON
4 Edith could not be reached, or the request timed out and was cancelled

Limits you may plan around: a request or result can be up to 8 MiB. Read the request from stdin with --json -; stdin must finish within five seconds. An ed invoke timeout ranges from 1 to 1800 seconds and defaults to 30 seconds.

ed invoke never turns an extension on by itself. Stopping ed with Ctrl-C cancels the request in Edith too. Removing an extension deletes its package and keeps its settings and your data.

Getting help

  • ed <command> --help, or ed help <command>, prints the full help for any command, including every option.
  • ed guide prints the built-in manual, and ed guide --json prints every command, alias, flag, default and help text as one JSON catalog.
  • ed docs ask "<what you want to do>" names the commands that handle a plain-language request, and ed docs show <command> prints its reference page.
  • Tab completion knows every command, option and value. See Getting started.

Where to go next