# ed attention rules import

> Validates a JSON rule document and merges categories and rules by stable ID. Existing entries omitted from the document remain unchanged.

- Canonical URL: https://getedith.pro/docs/cli/attention/rules/import
- Updated: 2026-12-02

Validates a JSON rule document and merges categories and rules by stable ID.
Existing entries omitted from the document remain unchanged. All validation
finishes before anything is saved. Run the same import again to update the same
rules without creating duplicates.

```
ed attention rules import rules.json --dry-run --json
ed attention rules import rules.json --json
```

The document must contain `categories` and `rules` arrays. Use an empty categories
array to import rules targeting existing categories. Rule IDs must be unique,
category IDs must be unique, names cannot be empty, categories must exist and
rules must have match criteria. The JSON response reports input counts and
whether the changes were saved.

## Where to go next

- [`ed attention rules`](https://getedith.pro/docs/cli/attention/rules)
- [`ed attention rules export`](https://getedith.pro/docs/cli/attention/rules/export)

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

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