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

# export / import

> Export and import graph data.

## export

```bash theme={null}
kremis export -o <FILE> [-t <FORMAT>]
```

Export the graph to a file.

| Option            | Short | Description                          | Default     |
| ----------------- | ----- | ------------------------------------ | ----------- |
| `--output <path>` | `-o`  | Output file path                     | (required)  |
| `--format <fmt>`  | `-t`  | Export format: `canonical` or `json` | `canonical` |

## import

```bash theme={null}
kremis import -i <FILE> -B file
```

Import a graph from a canonical format file.

| Option           | Short | Description     |
| ---------------- | ----- | --------------- |
| `--input <path>` | `-i`  | Input file path |

<Warning>
  Import is currently supported only with the `file` backend (`-B file`). Import to `redb` backend is not yet implemented.
</Warning>

<Note>
  Import files are limited to **256 MiB**. Files exceeding this limit will return an error.
</Note>

## Examples

```bash theme={null}
# Export as canonical binary
kremis export -o graph.bin -t canonical

# Export as JSON
kremis export -o graph.json -t json

# Import (file backend only)
kremis import -i graph.bin -B file
```
