> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usegandalf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# gandalf bundle: export, import, inspect, verify

> Package snapshots into portable .gandalf bundles and move them between machines with verification, dry-run import, quarantine, and experimental apply.

`gandalf bundle` manages `.gandalf` archives that carry a snapshot from one machine to another. It has four subcommands: `export`, `import`, `inspect`, and `verify`. Bundle content apply is destructive and requires `--experimental`.

## Synopsis

```bash theme={null}
gandalf bundle export --name <snapshot> --out <path> [--metadata-only] [flags]
gandalf bundle import <bundle-path> [--dry-run] [--apply-content --experimental] [--quarantine] [--trust] [flags]
gandalf bundle inspect <bundle-path> [--json]
gandalf bundle verify <bundle-path> [--json]
```

## Common flags

| Flag              | Description             | Default                          |
| ----------------- | ----------------------- | -------------------------------- |
| `-p`, `--project` | Project directory       | `.`                              |
| `--home`          | Home directory          | `$HOME`                          |
| `--store`         | Gandalf store directory | `~/.gandalf` or `$GANDALF_STORE` |
| `--agent`         | Filter by agent         | (unfiltered)                     |
| `--json`          | Emit JSON output        | off                              |

## bundle export

| Flag              | Description                   | Default |
| ----------------- | ----------------------------- | ------- |
| `--name`          | Snapshot name (required)      | -       |
| `--out`           | Output bundle path (required) | -       |
| `--metadata-only` | Skip file content             | off     |

```bash theme={null}
gandalf bundle export --name baseline --out daily.gandalf --project .
gandalf bundle export --name baseline --out daily.gandalf --metadata-only --project .
```

## bundle import

| Flag              | Description                                            | Default |
| ----------------- | ------------------------------------------------------ | ------- |
| `--dry-run`       | Preview import without writing                         | off     |
| `--apply-content` | Apply content-backed files (requires `--experimental`) | off     |
| `--quarantine`    | Quarantine suspicious content                          | off     |
| `--experimental`  | Enable experimental import                             | off     |
| `--trust`         | Trust bundle signature without prompt                  | off     |

```bash theme={null}
gandalf bundle import daily.gandalf --dry-run --project .
gandalf bundle import daily.gandalf --apply-content --quarantine --experimental --project .
gandalf bundle import daily.gandalf --apply-content --experimental --project .
```

<Warning>
  `--apply-content` without `--experimental` returns `GANDALF_EXPERIMENTAL_REQUIRED`. Bundle apply refuses known sensitive prefixes; preview with `--dry-run` or `--quarantine` first.
</Warning>

## bundle inspect

Prints format version, snapshot name, content flag, and bundle checksum.

```bash theme={null}
gandalf bundle inspect daily.gandalf
gandalf bundle inspect daily.gandalf --json
```

## bundle verify

Verifies format, checksums, and signature. Exits non-zero if invalid.

```bash theme={null}
gandalf bundle verify daily.gandalf
gandalf bundle verify daily.gandalf --json
```

## Related

* [Bundles guide](/guides/bundles)
* [`gandalf doctor`](/cli/doctor)
