# ed grab file

> ed grab file in the Edith ed command line reference. ed grab

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

[`ed grab`](https://getedith.pro/docs/cli/grab)

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

```bash
ed grab file PATH [--mode plain|breaks|line|table|code|barcode] [--copy] [--json]
```

Recognizes the text in a PNG, JPEG, HEIC, TIFF or GIF image. A relative path is resolved from the directory you run the command in. Prints the text; `--copy` also puts it on the clipboard. Without `--mode` the default mode from Text Grab settings is used. A missing file exits with a not found error and an image without text exits with an error. JSON output reports `id`, `text`, `mode`, `lines`, `source`, `url`, `date` and `copied`.

```bash
ed grab file ~/Desktop/receipt.png
ed grab file sheet.png --mode table --json
```

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