# ed shelf

> ed shelf reads and writes the Shelf, the tray of files you park by dragging them to the notch and pick up again later.

- Canonical URL: https://getedith.pro/docs/cli/shelf
- Updated: 2026-12-02

`ed shelf` reads and writes the Shelf, the tray of files you park by
dragging them to the notch and pick up again later. Reach for it when a script
should leave a file where the notch will hand it to you, or when you want the
path of something you already dropped there without opening the shelf at all.

The shelf is a plain folder with an index beside it: the files sit flat in
`~/Library/Application Support/Edith/Shelf`, and `.index.json` in that same
folder records each one's id, name, canvas position and when it landed. `share` asks
Shelf to send the selected items with AirDrop.

Items are numbered from 1, newest first by the time they were added. That
number is what `path`, `update`, `rm`, `open`, `reveal`, `share`, `copy-path`,
`rename` and `qr --item` take. It is
`ed`'s own ordering: the notch tray shows the newest file first too, so the
number here names a row in this listing.

## At a glance

| Command | What it does |
| --- | --- |
| `ed shelf` | Runs `ed shelf ls`, which is the default subcommand. |
| `ed shelf ls` | Lists what is parked, newest first, with size and when it landed. |
| `ed shelf path <n>` | Prints the full path of one item, which is what to pipe into another tool. |
| `ed shelf add <file>` | Puts a copy of a file on the Shelf in the notch and leaves the original where it is. |
| `ed shelf add-text <text...>` | Writes text into a new shelf item. |
| `ed shelf update <n> --x <number> --y <number>` | Sets one item's stored canvas position. |
| `ed shelf rm <n...>` | Previews deleting selected shelf copies; `--yes` applies it. |
| `ed shelf clear` | Previews emptying the shelf; `--yes` applies it. |
| `ed shelf purge [window]` | Previews removing items older than the configured or named window. |
| `ed shelf open <n...>` | Opens selected items in their default applications. |
| `ed shelf reveal <n...>` | Reveals selected items in Finder. |
| `ed shelf share <n...>` | Sends selected items with AirDrop. |
| `ed shelf copy-path <n...>` | Copies the parked paths of selected items in one of five formats. |
| `ed shelf rename <n...>` | Previews a batch rename of selected shelf copies and saves the plan. |
| `ed shelf rename-apply <plan>` | Applies a saved rename plan with `--yes`. |
| `ed shelf rename-history` | Lists finished renames, newest first. |
| `ed shelf rename-undo <record>` | Previews restoring the names from a finished rename. |
| `ed shelf metadata <file...>` | Shows embedded metadata and flags identifying fields. |
| `ed shelf manifest create\|verify` | Creates or checks a SHA-256 manifest. |
| `ed shelf qr` | Makes a QR code PNG from text or a text item. |
| `ed shelf review` | Reviews text for likely credentials before you share it. |

`ed shelf list` is the same command as `ed shelf ls`, and `ed shelf` with
nothing after it runs `ls`, including its flags: `ed shelf --json` is
`ed shelf ls --json`.

## Commands

- [`ed shelf ls`](https://getedith.pro/docs/cli/shelf/ls)
- [`ed shelf path`](https://getedith.pro/docs/cli/shelf/path)
- [`ed shelf add`](https://getedith.pro/docs/cli/shelf/add)
- [`ed shelf add-text`](https://getedith.pro/docs/cli/shelf/add-text)
- [`ed shelf update`](https://getedith.pro/docs/cli/shelf/update)
- [`ed shelf rm`](https://getedith.pro/docs/cli/shelf/rm)
- [`ed shelf clear`](https://getedith.pro/docs/cli/shelf/clear)
- [`ed shelf purge`](https://getedith.pro/docs/cli/shelf/purge)
- [`ed shelf open`](https://getedith.pro/docs/cli/shelf/open)
- [`ed shelf reveal`](https://getedith.pro/docs/cli/shelf/reveal)
- [`ed shelf share`](https://getedith.pro/docs/cli/shelf/share)
- [`ed shelf copy-path`](https://getedith.pro/docs/cli/shelf/copy-path)
- [`ed shelf rename`](https://getedith.pro/docs/cli/shelf/rename)
- [`ed shelf rename-apply`](https://getedith.pro/docs/cli/shelf/rename-apply)
- [`ed shelf rename-history`](https://getedith.pro/docs/cli/shelf/rename-history)
- [`ed shelf rename-undo`](https://getedith.pro/docs/cli/shelf/rename-undo)
- [`ed shelf metadata`](https://getedith.pro/docs/cli/shelf/metadata)
- [`ed shelf manifest`](https://getedith.pro/docs/cli/shelf/manifest)
- [`ed shelf qr`](https://getedith.pro/docs/cli/shelf/qr)
- [`ed shelf review`](https://getedith.pro/docs/cli/shelf/review)

## Exit codes

| Code | When this group produces it |
| --- | --- |
| 0 | The read, mutation or action request succeeded. Also an empty shelf under `ls`, a preview, and `--help` on the group or any verb. |
| 1 | A file or index mutation failed. The hint is the system's own description. |
| 2 | The command line was wrong in ArgumentParser's own terms: an unknown flag, a missing `<index>` or `<file>`, an `<index>` that is not an integer, or an extra positional argument. |
| 3 | `add` was given a path with nothing at it, or an item command was given a number below 1 or above the number of items. |
| 4 | An item command was run on an empty shelf, or `share` could not reach an enabled Shelf. |

For local index operations, exit 4 means the shelf is empty. For `share`, it
means the Shelf extension is off, the
items disappeared before Edith handled them, or no shelf panel could
present the picker. `ls` treats an empty shelf as success, so use it when
probing state.

## Notes and gotchas

- The shelf folder is flat. Every item is a direct child of
  `~/Library/Application Support/Edith/Shelf`, and the index is `.index.json`
  in that same folder, hidden by its leading dot. Because names are made
  unique against the folder, adding a file called `.index.json` lands as
  `.index 2.json` rather than clobbering the index.
- `ed` and the Shelf in the notch change the shelf the same way. Changes made
  by `ed` appear in a running shelf, and the next UI
  action starts from the same index instead of restoring a stale in-memory list.
- `ls` sorts newest first every time, but the index file is written in whatever
  order the writer used. `add` appends, the way the app does. A confirmed `rm`
  filters the current index by the previewed id, preserving the stored order of
  everything else.
- Each item can carry a `position` recorded by dragging its tile around the
  notch canvas. `ls`, `path`, add results and action results return it as either
  `{ "x": number, "y": number }` or `null`. `update` writes the same shared
  field as a native canvas drag.
- `add` and `add-text` report the new item's index from the snapshot that was
  committed. The number therefore matches the next `ls` result even when an
  existing item carries a timestamp from the future.
- There is no `ed shelf get`, no `ed shelf copy` and no way to pull an item
  back out. `path` plus `cp` is the whole story, and the shelf's copy stays
  until you remove it.
- The tools behind `rename`, `metadata`, `manifest`, `qr` and `review` also
  open from the notch tray: right-click a file, or use the tray's more menu for
  every file. Each opens in its own window so the notch can close while you
  work. None of them live in Shelf settings.
- A rename is journaled before any file moves. If Edith stops in the middle,
  the next shelf read finishes or rolls it back. A journal that cannot be read
  is moved aside to a `.rename-quarantined-<id>` folder in the shelf folder,
  with any files it was holding, so `ls` and every other command keep working.
- Local file, text, position and removal commands do not need the Shelf to be
  running, so you can park and read files even when the notch is hidden.
  `share` needs the Shelf turned on. Turn it on in the Library or with
  `ed extensions enable shelf`.
- `purge` uses `shelfKeepDuration` unless you name `forever`, `oneHour`,
  `oneDay`, `oneWeek` or `oneMonth`. It previews exact file paths by default
  and removes them only with `--yes`. The running shelf uses the same expiry
  executor when it starts and expands.
- How the notch behaves (showing it, opening on hover, displays without a
  notch) lives in Notch settings, the Settings button on Notch in the Library.
  Whether a tool's activity appears is the Show in notch switch in that tool's
  own settings. Dragging files to the notch opens its drop tray, which keeps
  them on the Shelf. The only Shelf setting is `shelfKeepDuration`, how
  long parked files stay before `purge` removes them, under Files in Shelf
  settings.
- The table flattens control characters out of a name, so a filename
  containing a newline or a tab prints on one line. `--json` carries the name
  exactly as it is on disk, which is what to match on.
- `--help` works on the group and every verb, prints on stdout and exits
  0. `--version` is inherited from the root and works on any of them too,
  printing the CLI version.
- Completion knows the group and reads the current shelf indices. `ed shelf <TAB>`
  offers the verbs, `ed shelf add <TAB>` completes file paths, and every item
  slot offers the current item numbers, including repeated grouped selections.

## Where to go next

- [`ed clipboard`](https://getedith.pro/docs/cli/clipboard), the other thing the notch panel holds, and
  the one whose entries are numbered the same way.
- [`ed extensions`](https://getedith.pro/docs/cli/extensions), to turn the Shelf itself on or off.
- [`ed config`](https://getedith.pro/docs/cli/config), for the Shelf's expiry setting.
- [Conventions and contracts](https://getedith.pro/docs/cli/conventions), for the exit code table and
  the `--json` guarantee in full.
- [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
