# ed scratchpad

> ed scratchpad is the command-line surface for the Scratchpad page under Mac Utilities.

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

`ed scratchpad` is the command-line surface for the Scratchpad page under Mac Utilities. It lists, reads, adds, renames, pins, searches, exports, deletes and restores the notes Scratchpad keeps in tabs. The floating note window opens with Option-Command-N by default, or with `ed scratchpad open`.

[The `ed` command line](https://getedith.pro/docs/cli)

| Command | What it does |
| --- | --- |
| [`ed scratchpad ls`](https://getedith.pro/docs/cli/scratchpad/ls) | Lists notes in tab order. |
| [`ed scratchpad show`](https://getedith.pro/docs/cli/scratchpad/show) | Prints a note's Markdown. |
| [`ed scratchpad new`](https://getedith.pro/docs/cli/scratchpad/new) | Adds a note as a new tab. |
| [`ed scratchpad append`](https://getedith.pro/docs/cli/scratchpad/append) | Adds a line to the end of a note. |
| [`ed scratchpad rename`](https://getedith.pro/docs/cli/scratchpad/rename) | Names a tab, or clears its name. |
| [`ed scratchpad pin`](https://getedith.pro/docs/cli/scratchpad/pin) | Pins or unpins a tab. |
| [`ed scratchpad search`](https://getedith.pro/docs/cli/scratchpad/search) | Finds notes containing every word of a query. |
| [`ed scratchpad export`](https://getedith.pro/docs/cli/scratchpad/export) | Saves a note as a `.md` or `.txt` file. |
| [`ed scratchpad delete`](https://getedith.pro/docs/cli/scratchpad/delete) | Previews a deletion, or applies it with `--yes`. |
| [`ed scratchpad undo`](https://getedith.pro/docs/cli/scratchpad/undo) | Restores the most recently deleted note. |
| [`ed scratchpad open`](https://getedith.pro/docs/cli/scratchpad/open) | Shows the floating note window. |

A `NOTE` argument is a note id, its position in the tab list (1 is the first tab) or its exact title, ignoring case and accents. Notes live only in Scratchpad's data folder on this Mac and are never uploaded. Each change is written to a new file that replaces the old one in a single step, and the previous save is kept as a backup, so a crash or a full disk never leaves half a note behind.

## Operations

Every action the page and the floating window take is also an `ed invoke` operation with JSON input and output. Errors are reported as JSON on stderr.

```bash
ed invoke scratchpad scratchpad.status --json '{}'
ed invoke scratchpad scratchpad.create --json '{"body":"# Groceries\n- milk"}'
ed invoke scratchpad scratchpad.write --json '{"id":"NOTE-ID","body":"# Groceries\n- milk\n- eggs","revision":1}'
ed invoke scratchpad scratchpad.search --json '{"query":"milk","limit":10}'
ed invoke scratchpad scratchpad.export --json '{"id":"NOTE-ID","format":"txt","path":"/Users/me/Desktop"}'
```

| Operation | Input | Result |
| --- | --- | --- |
| `scratchpad.status` | `{}` | Notes in tab order, the selected and most recent note, the note `undo` restores, settings and whether the window is open |
| `scratchpad.list` | `{}` | Note summaries in tab order |
| `scratchpad.read` | `{"id"}`; no id reads the selected note | The note with its Markdown `body` and `revision` |
| `scratchpad.create` | `{"body","name"}`, both optional | The new note, selected |
| `scratchpad.write` | `{"id","body","revision"}`; `revision` is optional and rejects the write if the note changed | The note with its new `revision` |
| `scratchpad.append` | `{"id","text"}`; no id appends to the selected note | The note |
| `scratchpad.rename` | `{"id","name"}`; an empty or missing name clears it | The note |
| `scratchpad.move` | `{"id","index"}`; pinned and unpinned notes stay in their own group | Status |
| `scratchpad.pin` | `{"id","pinned"}` | Status |
| `scratchpad.delete` | `{"id"}` | `deleted`, `title`, `undo` |
| `scratchpad.undo` | `{}` | The restored note |
| `scratchpad.select` | `{"id"}` | Status |
| `scratchpad.search` | `{"query","limit"}` | `query` and ranked `results` with `snippet`, `score` and `matches` |
| `scratchpad.export` | `{"id","format","path","overwrite"}`; `format` is `md` or `txt`, `path` is an absolute folder or file | `id`, `format`, `path` |
| `scratchpad.layout` | `{"layout"}`: `editor`, `split` or `preview` | Status |
| `scratchpad.open`, `scratchpad.close`, `scratchpad.toggle` | `{}` | Status, with `floating` |

## 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
