# ed machines docker compose compare

> Compares two masked revision files saved by compose config. No tool runs and nothing on the machine changes.

- Canonical URL: https://getedith.pro/docs/cli/machines-docker/compose-compare
- Updated: 2026-12-02

Compares two masked revision files saved by
[`compose config`](https://getedith.pro/docs/cli/machines-docker/compose-config). No tool runs and nothing on the
machine changes.

```
ed machines docker compose compare <before> <after> [--json] [--output <file>]
```

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<before>` | local file, required | none | Earlier revision. |
| `<after>` | local file, required | none | Later revision. |
| `--json` | flag | off | Print the comparison envelope as JSON. |
| `--output` | new local file | none | Also write the envelope there. An existing file is never replaced. |

The envelope holds `before`, `after` and `changes`. Each change has `service`,
`field` (`Image`, `Bind mounts` or `Ports`), `before` and `after`; a service that
exists on one side only has an empty array on the other. The text output also
lists each revision's port conflicts.

Both revisions must share the same machine, project and directory. Each file is
limited to 6 MiB, masked again and rebuilt before comparison, and an invalid
file fails without printing its content.

## Examples

```
ed machines docker compose compare before.json after.json
ed machines docker compose compare before.json after.json --json --output review.json
```

## Where to go next

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