# ed machines snippets ls

> Lists the saved commands a machine offers: the ones saved against it, plus every shared one.

- Canonical URL: https://getedith.pro/docs/cli/machines/snippets-ls
- Updated: 2026-12-02

Lists the saved commands a machine offers: the ones saved against it, plus every
shared one. `list` is an accepted alias, and `ls` is the group's default, so
`ed machines snippets <machine>` runs it. The group itself answers to `snippet`
as well as `snippets`.

```
ed machines snippets ls <machine> [--json]
```

## Arguments

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<machine>` | string, required | none | Machine name, ssh alias, id or unambiguous prefix. |

## Options

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `--json` | flag | off | Emit JSON on stdout instead of the table. |
| `--help`, `-h` | flag | off | Print the help for this command on stdout and exit 0. |

Snippets are numbered from 1 in the order they were saved. Nothing is sorted,
and shared snippets sit in the same numbering as this machine's own:

```
$ ed machines snippets ls devbox
#  TITLE  SCOPE    COMMAND
1  logs   machine  journalctl -xe --no-pager
```

A machine with none prints `Devbox has no snippets` on stderr and exits 0.

## `--json` shape

```json
[
  {
    "command": "journalctl -xe --no-pager",
    "id": "F8D5CE93-C9B4-4A05-9109-9AEB1BD806BA",
    "index": 1,
    "sharedAcrossMachines": false,
    "title": "logs"
  }
]
```

`sharedAcrossMachines` is `true` for a snippet with no machine of its own, which
is the `shared` value in the SCOPE column.

## Examples

```
ed machines snippets ls devbox
ed machines snippets devbox
ed machines snippets ls devbox --json | jq -r '.[] | select(.sharedAcrossMachines) | .title'
```

## Behaviour notes

Read only, straight out of `snippets.json`, with no connection opened. Run an
entry by its displayed number with `ed machines snippets run <machine> <index>`.

## Where to go next

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