# ed install

> ed install in the Edith ed command line reference. Links ed and edith into a directory on your PATH.

- Canonical URL: https://getedith.pro/docs/cli/getting-started/install
- Updated: 2026-12-02

Links `ed` and `edith` into a directory on your `PATH`.

```
ed install [--json] [--directory <directory>]
```

Options

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `--json` | flag | off | Emit JSON on stdout instead of a sentence |
| `--directory <directory>` | path, `~` expanded | `/usr/local/bin` when writable, otherwise `~/.local/bin` | Link into this directory instead of the default |

`--json` shape:

```json
{
  "directory": "/Users/you/.local/bin",
  "linked": [
    "ed",
    "edith"
  ],
  "message": null,
  "onPath": true,
  "skipped": []
}
```

Examples

```
ed install
ed install --directory ~/bin
ed install --json
/Applications/Edith.app/Contents/MacOS/ed install
```

A name that is already linked to the right binary is left alone and appears in
neither `linked` nor `skipped`, so a second `ed install` in a row reports an
empty list and still exits 0. A name occupied by a real file is left alone and
listed in `skipped`, because the installer never overwrites something it did not
create. A name occupied by a symlink is replaced whatever it points at, which is
how a stale link from an older install gets repaired.

`onPath` compares the target directory against the entries of `PATH` after
standardising both, so a match is exact rather than textual. When it is false
the human output adds `note: <directory> is not on PATH` on stderr and still
exits 0, because the links were made either way.

`message` is null on success. A missing bundled binary, an occupied unmanaged
path, or a failed link is reported on stderr and exits 1 before a success
document is emitted. The Install button in Terminal settings does the same
thing and shows the same failure.

`ed install` links the names to the `ed` it runs from. Run it through a link
that is already on your `PATH` and `ed` is relinked onto itself and stops
working. Run it from the copy inside the app, never through the link:

```
/Applications/Edith.app/Contents/MacOS/ed install
```

If the self-link has already happened, the same line puts everything back.

## Where to go next

- [Getting started with `ed`](https://getedith.pro/docs/cli/getting-started), the rest of this group
- [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
