> For the complete documentation index, see [llms.txt](https://cristiandis.gitbook.io/ntix/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cristiandis.gitbook.io/ntix/commands/diff.md).

# diff

## ntix diff

Show what would change without modifying anything.

### Usage

```bash
ntix diff [config-path] [options]
```

If no path is provided, NTIX uses `~/ntix/config.lua` (creating it on first run).

### Options

| Flag              | Short | Description                                        |
| ----------------- | ----- | -------------------------------------------------- |
| `--upgrade`       | `-u`  | Check for and show available upgrades              |
| `--adopt`         | `-a`  | Show packages that would be adopted into state     |
| `--apply-configs` | `-c`  | Show `configFiles` actions (new / update / orphan) |

By default, `diff` does **not** check for upgrades - it only shows installs, removals, and packages already at the desired version. Pass `-u` to include upgrade detection.

### Output

NTIX renders a tree with section headers, color-coded by action.

| Section                    | Symbol    | Color  | Meaning                                                                          |
| -------------------------- | --------- | ------ | -------------------------------------------------------------------------------- |
| imports                    | `imports` | Dim    | Imported config files                                                            |
| **To install**             | `↑`       | Green  | Packages not yet installed                                                       |
| **To upgrade**             | `↑`       | Yellow | Unpinned packages with newer version (only with `-u`)                            |
| **To adopt**               | `✚`       | Cyan   | Installed packages that would be added to state (only with `-a`)                 |
| **Installed, not managed** | `✓`       | Dim    | Installed packages NTIX does not track (informational)                           |
| **Already managed**        | `✓`       | Dim    | Packages at the correct version                                                  |
| **Buckets to add**         | `↑`       | Green  | Scoop buckets to add (only when scoop is enabled)                                |
| **Buckets to remove**      | `↓`       | Red    | Scoop buckets to remove                                                          |
| **Orphans**                | `✗`       | Red    | Orphaned packages to clean up                                                    |
| **Config files**           | `⚑`       | White  | Managed files: `[new]` green, `[update]` yellow, `[orphan]` red (only with `-c`) |

Manager names are colored: winget (purple), chocolatey (blue), scoop (pink).

### Example

```
config.lua
├── ↑ To install (3)
│   ├── winget: Google.Chrome
│   ├── winget: 7zip.7zip (23.01)
│   └── scoop: fd
└── ✓ Already managed (1)
    └── chocolatey: ripgrep
```

Warnings appear in yellow for packages not found in their manager.
