Skip to content
Edith

Docs

Command reference

ed running-apps

ed running-apps is the Running Apps page's Running apps card on stdout: what is running on this Mac right now, and a way to quit any of it, one app at a time or everything at once. Reach for it when you want the list without opening a window, or when a script needs a quiet desktop before something noisy runs.

Applying a quit needs --yes. Edith does the quitting, the same way the Running Apps page does.

At a glance

Command What it does
ed running-apps ls Lists every app with a Dock presence, with its pid, CPU, memory and bundle id. Runs when you type ed running-apps with no subcommand, and answers to ed running-apps list.
ed running-apps quit Previews or applies an exact plan for one app by name, bundle id or prefix, or everything except Finder and Edith with --all.

Commands

Exit codes

Code When
0 The list or preview was printed, or Edith acknowledged a confirmed quit request. --help and --version also exit 0.
1 ed running-apps quit was given neither an app name nor --all, was given both, or named a protected app.
2 The command line was wrong in the ordinary way: an unknown flag, a second positional argument, or a value the parser could not read.
3 The named app is not running, or the name is a prefix that matches more than one running app.
4 Edith did not acknowledge a confirmed ed running-apps quit --yes.

ed running-apps ls only ever exits 0 or 2. Code 1 is otherwise the catch-all for an unexpected error escaping either command, and nothing on the listing path throws one.

Notes and gotchas

  • ed running-apps with no subcommand is ed running-apps ls, and ed running-apps list is the same command again. Completion offers ls and quit; the list alias works but is not among the candidates.
  • ed app and ed running-apps are different groups. The singular one acts on Edith itself, open, quit, relaunch and update checks; the plural one acts on everything else running on the Mac. There is no prefix matching between subcommand names, so the two never collide, but the names are one letter apart and easy to mistype.
  • ed running-apps quit <TAB> completes the current running app names and bundle ids. ed running-apps quit -<TAB> lists --all, --force, --yes, --json, and --help.
  • The two argument errors on quit exit 1 rather than 2 even though they read like usage errors. Gate on 1 as well as 2 if you are distinguishing a bad command line from a real failure.
  • Every quit without --yes is a free preview. It names the exact targets, and changes nothing.
  • The confirmed command quits exactly the apps in the plan. --all is not worked out again, so an app launched after planning cannot be included.
  • Confirmed commands wait for Edith to confirm. Exit 0 means Edith received the exact plan and reports how many termination requests macOS accepted. It does not mean each process has finished closing.
  • An empty app name matches every app rather than none, because the empty string is a prefix of everything: ed running-apps quit "" exits 3 and lists all of them. It is a harmless way to see the resolver's ambiguity message.
  • Exact name beats exact bundle id beats unique prefix, and the prefix rule applies to names only. ed running-apps quit com.spotify matches nothing even though ed running-apps quit com.spotify.client works.
  • Object keys are sorted in every document this group emits, so two runs diff cleanly. Array order is insertion order, which for ls is the name order the table shows.
  • Both commands see only apps with a Dock presence. Menu bar agents, helpers and daemons are invisible to ls and unreachable by quit.
  • The Running Apps page and ed share the same list, resource sampling, protected apps and quitting.
  • The UI asks before it acts, with a confirmation dialog naming the app or the count. --yes is the command line equivalent for both named and all-app quits.

Where to go next

  • ed app for acting on Edith itself rather than on other apps, including quitting and relaunching it.
  • ed menu-bar-stats for CPU and memory per process on this Mac, covering everything running and not only the apps with a Dock icon.
  • ed machines power for the same idea on another machine, where ed machines kill signals a remote process.
  • Conventions and contracts for the exit code table, the --json guarantee and the full list of what needs the app running.
  • The ed command line for the rest of the reference.