CLI

# hotcfg diff

Show a colored, line-by-line diff between two versions of an environment.

usage

```
hotcfg diff <bin_id> --from <version> [--to <version>] [--env <env>] [--context <n>]
```

Fetches two versions of one environment and prints a unified diff. Object keys are sorted first, so a reordered file shows no changes.

terminal

```
$ hotcfg diff mobile-flags --env staging --from v1
--- mobile-flags staging v1
+++ mobile-flags staging v2
@@ -1,9 +1,9 @@
 {
   "features": {
-    "checkout_v2": false,
+    "checkout_v2": true,
     "new_onboarding": false
   },
   "limits": {
-    "max_upload_mb": 25
+    "max_upload_mb": 50
   }
 }
```

When there's nothing to show, it prints `✓ No differences between v1 and v2 (staging)`. Either way it exits with `0`.

## Flags

| Flag | Default | Description |
| --- | --- | --- |
| `--from` | required | The old version: `3`, `v3` or `latest`. |
| `--to` | `latest` | The new version. |
| `--env` | `production` | The environment both versions are in. |
| `--context` | `3` | Lines of context around each change. |

To compare staging with production before promoting, use the dashboard's promote dialog, which diffs the two environments.

Last updated 5 November 2026
