# ed clipboard inspect

> Lists the representations of one entry, or previews one of them.

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

Lists the representations of one entry, or previews one of them.

```
ed clipboard inspect <index> [--type <type>] [--bytes] [--json]
```

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<index>` | integer, from 1 | required | The entry number, counting from 1. |
| `--type` | type identifier or number | none | Preview one representation by type identifier or by its number. |
| `--bytes` | flag | off | Show the first bytes as hex instead of the decoded preview. |
| `--json` | flag | off | Emit JSON on stdout. |

An app that copies usually offers several representations of the same content,
such as `public.utf8-plain-text`, `public.html` and `public.rtf`. Clipboard
history saves one of them per entry. While an entry is still what is on the
pasteboard, `inspect` lists every type of the first pasteboard item, at most 24,
by name only. Nothing is read until you preview or copy one, so apps that
provide data lazily never render types you do not ask for. Once anything else
is copied, the entry offers only its saved copy.

```
$ ed clipboard inspect 1
#  TYPE                    NAME        SIZE      SOURCE
1  public.utf8-plain-text  Plain text            On the pasteboard
2  public.html             HTML                  On the pasteboard
```

`SIZE` is known for the saved copy and empty for types that have not been read.
With `--json` the list is an object:

```json
{
  "id": "7F1C2B9A-4D3E-4A5B-9C8D-1E2F3A4B5C6D",
  "index": 1,
  "items": 1,
  "live": true,
  "representations": [
    {
      "name": "Plain text",
      "number": 1,
      "origin": "pasteboard",
      "sizeBytes": null,
      "type": "public.utf8-plain-text"
    }
  ]
}
```

`live` is true while the entry is the current pasteboard. `origin` is
`pasteboard` or `saved`. `items` is how many items were on the pasteboard; only
the first is listed.

`--type public.html` reads that one representation and prints the decoded
preview: text as text, HTML as its source, rich text without formatting, a
binary property list as XML, and an image as its name, pixel size and file
size. Data that is not text, and malformed data, prints as a hex dump of the
first 4 KB, with a note on stderr explaining why. `--bytes` always prints the
hex dump. With `--json` the preview object adds `format` (`text`, `image` or
`bytes`), `text`, `bytes`, `imageBytes`, `truncated`, `notice` and `detail`.

If the pasteboard changes between the list and the preview, the preview fails
and asks you to inspect again rather than showing a different clip.

To copy one representation, use [`ed clipboard copy`](https://getedith.pro/docs/cli/clipboard/copy) with
`--type`.

| Code | When |
| --- | --- |
| 0 | The list or preview was printed |
| 1 | The pasteboard changed, or the app no longer provides that type |
| 3 | No entry with that number, or no representation with that type or number |
| 4 | The history is empty |

## Where to go next

- [`ed clipboard`](https://getedith.pro/docs/cli/clipboard), 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
