# ed invoke

> Send an operation and a JSON payload to an enabled, running extension:

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

Send an operation and a JSON payload to an enabled, running extension:

```sh
ed invoke <id> <operation> --json '{"value":"synthetic"}'
printf '%s' '{"value":"synthetic"}' | ed invoke <id> <operation> --json -
ed invoke <id> <operation> --timeout 120 --json '{}'
ed invoke <id> <operation> --json - --raw
```

The default payload is `{}`. The output is exactly the extension's JSON response. `--raw` decodes a JSON string response and prints its UTF-8 text with a trailing newline. It rejects other response types. Use it for an extension's plain-text statusline. Operation names and payload schemas are defined by the downloaded extension. Only operations the extension defines are accepted.

Install and enable the extension first. An incompatible, disabled, stopped, or unknown extension returns an error. If the extension restarts or updates during the request, the request fails.

`--timeout` accepts 1 to 1800 seconds; the default is 30 seconds. Provider hooks can pipe their JSON event to an extension's operation and receive its JSON response. Closing the input without valid JSON, exceeding the payload limit, disconnecting, or reaching the timeout ends the request. See [conventions](https://getedith.pro/docs/cli/conventions) for limits and exit codes.

## Usage status lines

For Usage, enable the extension, open its settings, and connect the Claude Code status line explicitly. This preserves a previous status-line command and restores it when Usage stops. You can inspect or manage the same owned connection through the active worker:

```sh
ed invoke usage usage.statusline.install --json '{}'
ed invoke usage usage.statusline.status --json '{}'
ed invoke usage usage.statusline.remove --json '{}'
ed invoke usage usage.statusline.hook --json - --raw < synthetic-status.json
```

The installed provider hook pipes its JSON input to `usage.statusline.hook`. It returns a JSON string, and `--raw` prints the provider's plain-text line. Input is limited to 512 KiB and must finish within five seconds. A document without usable limits returns an empty line. Disabling Usage restores the previous command or removes its exact owned hook; reenabling resumes only the saved opt-in connection. Foreign edits remain untouched. Explicitly disconnecting clears the connection intent.

## Messaging Downloads operations

Messaging Downloads finds the files WhatsApp, Telegram and Signal saved to Downloads and plans what to do with them using the rules in its settings. Every operation reads and writes JSON, and nothing moves unless a run is sent with `"dryRun": false`:

```sh
ed invoke messagingDownloads status --json '{}'
ed invoke messagingDownloads rules --json '{}'
ed invoke messagingDownloads plan --json '{}'
ed invoke messagingDownloads run --json '{}'
ed invoke messagingDownloads run --timeout 300 --json '{"dryRun":false}'
ed invoke messagingDownloads run --timeout 300 --json '{"dryRun":false,"items":["WhatsApp Image 2026-01-01 at 10.00.00.jpeg"]}'
ed invoke messagingDownloads history --json '{"limit":10}'
ed invoke messagingDownloads show --json '{"runId":"00000000-0000-4000-8000-000000000000"}'
ed invoke messagingDownloads undo --json '{"runId":"00000000-0000-4000-8000-000000000000"}'
```

`plan` scans Downloads and returns every detected file with its `source` (`whatsApp`, `telegram`, `signal` or `general`), `kind` (`images`, `videos`, `documents`, `voiceNotes` or `other`), how it was detected (`quarantine`, `whereFrom`, `folder`, `fileName` or `downloads`), its size and age, and an `action`: `trash`, `organize` (with a `destination` inside Downloads) or `keep` (with a `reason` such as `starred` or `openedRecently`). `summary` totals the files and bytes per action.

`run` is a dry run by default and returns the fresh plan. With `"dryRun": false` it applies the plan, limited to `items` (paths relative to Downloads) when given, and returns the logged run: each entry's original path, where it went, and whether it moved. A file that changed size since the review stays in place. `skipped` lists requested paths that are no longer in the plan. Moves never overwrite a file; a clash gets a numbered name. Trashed files go to the macOS Trash.

`history` lists logged runs, newest first, with `undoable` while any of their files are still in the Trash or the organized folders. `undo` puts those files back and marks the run undone; files no longer in the Trash are reported as `gone`.

Errors are JSON on stderr, for example `{"error":{"code":"runNotFound","message":"No logged run has the id ..."}}`. Codes are `invalidInput`, `unknownOperation`, `downloadsMissing`, `runNotFound`, `alreadyUndone`, `nothingToUndo`, `busy` and `unsafePath`. The extension only reads Downloads and never needs Full Disk Access.

## Device scenes

Save, preview and apply Simulator setups with the [Device scenes actions](https://getedith.pro/docs/cli/invoke/device-scenes).

## Link routing and project presets

Preview and save link routing with the [Crossway operations](https://getedith.pro/docs/cli/crossway),
and save, open and retry project presets with the
[Launchweave operations](https://getedith.pro/docs/cli/launchweave).

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