# ed running-apps quit

> Plans or applies a request to quit one running app, or every unprotected app. Finder and Edith are always protected.

- Canonical URL: https://getedith.pro/docs/cli/running-apps/quit
- Updated: 2026-12-02

Plans or applies a request to quit one running app, or every unprotected app.
Finder and Edith are always protected.

```
ed running-apps quit <app> [--force] [--yes] [--json]
ed running-apps quit --all [--force] [--yes] [--json]
```

Without `--yes`, both forms are previews. They resolve the exact targets, print
the plan, change nothing, and do not require Edith to be running.

## Arguments

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<app>` | running app name or bundle id | none | Select an exact name, exact bundle id, or unambiguous name prefix. Required unless `--all` is used. Running names and bundle ids complete dynamically. |

## Options

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `--all` | flag | off | Select every app except Finder and both Edith processes. Cannot be combined with an app name. |
| `--force` | flag | off | Plan or request `forceTerminate` instead of a normal quit. This can prevent an app from saving. |
| `--yes` | flag | off | Apply the exact plan. Required for named targets and `--all`. |
| `--json` | flag | off | Emit one JSON document on stdout. |
| `--help`, `-h` | flag | off | Print help and exit 0. |
| `--version` | flag | off | Print the CLI version and exit 0. |

Naming neither a target nor `--all` exits 1. Combining both also exits 1:

```
$ ed running-apps quit
error: say which app to quit
hint: pass a name, or --all

$ ed running-apps quit --all Safari
error: --all quits everything, so it takes no app name
```

Resolution tries a case-insensitive exact name, a case-insensitive exact bundle
id, then an unambiguous name prefix. Missing and ambiguous targets exit 3.
Protected named targets exit 1 before any request is sent.

## Preview and apply

A named preview is one line on stdout:

```
$ ed running-apps quit Spotify
would quit Spotify; pass --yes to apply
```

An all-app preview includes the exact names captured by the plan:

```
$ ed running-apps quit --all
would quit 3 apps: Music, Safari, Spotify; pass --yes to apply
```

Pass `--yes` to quit them:

```
$ ed running-apps quit Spotify --yes
Edith accepted quit for 1 of 1 apps
```

## `--json` shape

Preview and apply use the same stable object. `applied` says whether execution
was requested. `acknowledged` says whether Edith answered. `requested` is the
exact target count and `changed` is how many termination requests macOS
accepted. Neither count proves that every app has already closed.

```json
{
  "acknowledged": false,
  "applied": false,
  "changed": 0,
  "force": false,
  "operation": "runningApps.quit",
  "requested": 1,
  "targets": [
    {
      "active": false,
      "bundleID": "com.spotify.client",
      "name": "Spotify",
      "pid": 18719
    }
  ]
}
```

With `--yes`, the same plan becomes:

```json
{
  "acknowledged": true,
  "applied": true,
  "changed": 1,
  "force": false,
  "operation": "runningApps.quit",
  "requested": 1,
  "targets": [
    {
      "active": false,
      "bundleID": "com.spotify.client",
      "name": "Spotify",
      "pid": 18719
    }
  ]
}
```

## Behaviour notes

The CLI and Running Apps page share the same plan and protections. The Running
Apps page's confirmation dialogs supply the confirmation that `--yes` supplies
on the command line.

`--yes` quits exactly the apps the preview listed. Edith checks protected apps
again before quitting, and a missing confirmation from Edith exits 4 instead of
claiming success.

An app with unsaved changes may show a save dialog and remain open after macOS
accepts the termination request. Check the list again when a script needs to
know whether the target closed:

```
ed running-apps quit Spotify --yes
sleep 2
ed running-apps ls --json | jq -r '.[].name'
```

`--force` skips normal termination and can lose unsaved work. It still requires
`--yes`.

## Examples

```
ed running-apps quit Spotify
ed running-apps quit Spotify --yes
ed running-apps quit com.spotify.client --force --yes
ed running-apps quit --all --json
ed running-apps quit --all --yes --json
```

## Where to go next

- [`ed running-apps`](https://getedith.pro/docs/cli/running-apps), the rest of this group
- [`ed running-apps ls`](https://getedith.pro/docs/cli/running-apps/ls), discovery and output fields
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
