Skip to content
Edith

Docs

Command reference

ed run and ed runs

Run inbox saves the output and exit status of a command you choose to wrap, and tells you when it finishes. Nothing is added to your shell; wrap a command only when you want its result kept.

Terminal
ed run --label "Build" -- make builded run --no-notify -- sh -c 'printf "check failed\n" >&2; exit 7'ed runs lsed runs show <id>ed runs open <id>ed runs remove <id>ed runs diagnose

Running a command

ed run executes the arguments after -- directly, in your current directory with your environment and standard input. Use an explicit shell (sh -c '...') for pipelines, redirects or shell functions. --label sets the title shown in the inbox and the notification (up to 256 characters, control characters removed); without it the executable name is used. --no-notify skips the notification.

The command's standard output and standard error become pipes. Edith copies every byte to your terminal unchanged and saves a copy of each stream. Because the streams are pipes rather than a terminal, many tools turn off colour, progress bars and other interactive output, and full-screen programs do not work. Run interactive programs directly. Standard input stays your terminal, and the command runs in the foreground, so Control-C and Control-Z reach it; when it is suspended, ed run suspends with it and resumes on fg.

ed run exits with the command's exit code. INT, TERM, HUP and QUIT sent to ed run are passed to the command's process group. When the command dies from a signal, the result records 128 + signal and ed run dies from the same signal. A missing command returns 127, one that cannot be executed returns 126, invalid ed run arguments return 2, and a failure to start returns 125. After the command exits, output still held open by its child processes is read for up to two seconds; anything later is marked as incomplete capture.

Reading results

Command What it does
ed runs ls Every saved result as a JSON array, newest first.
ed runs show <id> One result as JSON.
ed runs open <id> Writes a text report and opens it in the default app. Each stream is previewed up to 1 MiB; the full output stays in the result folder.
ed runs remove <id> Deletes a finished result and its output. A running command cannot be removed.
ed runs diagnose Prints the result folder and the notification permission state.

A result has id, label, startedAt, duration in seconds, exitCode (null while running), signal, captureFailed and notification. These commands do not need Edith running.

Results live in the Terminal data folder of the Edith copy that owns the ed you ran: ~/Library/Application Support/Edith/Data/terminal/run-inbox. Each run has its own private folder with result.json, stdout and stderr. The command line and environment are not saved, but the output can contain secrets, so remove results you no longer need. Edith keeps the newest 200 finished results for up to 30 days and removes results left running for more than a day, for example after a crash. If a result cannot be saved, ed run says so on standard error and still runs the command.

Notifications

When the command finishes, ed run asks Terminal in the running Edith to post a notification, waiting at most three seconds. It never starts Edith for this: if Edith is closed, Terminal is off, or the request times out, the result is saved with notification set to unavailable. Other values are submitted, denied, permissionRequired, failed and disabled (--no-notify). Submitted means macOS accepted it; Focus and notification settings can still hide it. Allow notifications with ed permissions request notifications.

Clicking the notification opens that run's report. It never runs the command again. The Run inbox button in Terminal and the Run inbox action on its Home card list every saved result.

Terminal also answers these operations through ed invoke:

Terminal
ed invoke terminal terminal.runInbox.open --json '{}'ed invoke terminal terminal.runInbox.diagnose --json '{}'ed invoke terminal terminal.runInbox.notify --json '{"id":"<run id>"}'

open shows the Run inbox and returns {"opened":true}. diagnose and notify return {"status":"..."}; notify accepts only a finished run saved in this copy of Edith.