> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/cli/commands/storage.md).

# storage

Store files inside your integrator.io account, with no external file provider to configure. Celigo Storage is a folder tree that the platform hosts for you. Exports and imports read and write files there instead of an SFTP, S3, or Google Drive connection. MCP servers serve stored files to MCP clients as resources.

This command group manages that tree: list, upload, download, organize, and delete files and folders. It also queries the files in place: `query` runs one read-only SQL `SELECT` over stored CSV, JSON, NDJSON, or Parquet files, as a job the CLI waits for and prints. Since celigo-cli 2026.11.2 it reads the storage activity log too: `activity` lists who did what to which item, and `export-activity` writes the same entries to a CSV.

**REST API**: [File Storage](https://developer.celigo.com/api/api-reference/data-stores/file-storage) and [Storage Query](https://developer.celigo.com/api/api-reference/data-stores/storage-query)

```
celigo storage <subcommand> [args] [flags]
```

Supports all [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md).

***

## Subcommands

| Subcommand                        | Purpose                                                                                                                                                               |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `list`                            | List the items in one folder (the root by default), with optional MIME, sort, and date filters.                                                                       |
| `search <query>`                  | Search items by name recursively across the whole tree.                                                                                                               |
| `get <ids...>`                    | Get metadata for one or more items by ID — a batch get, up to 100 ids per call.                                                                                       |
| `upload <localPath>`              | Upload a local file, choosing a single or multipart transfer by size.                                                                                                 |
| `download <id> [localPath]`       | Download a stored file to disk or stdout. `--folder` downloads a folder and everything beneath it as one zip. An existing local file is replaced only with `--force`. |
| `query [sql]`                     | Run one read-only SQL `SELECT` over stored files and print the rows — inline up to 1,000, or to a file with `-o`. Added in celigo-cli 2026.9.6.                       |
| `query-status <jobId>`            | Get a storage query job's state: `queued`, `running`, `completed`, or `failed`. Added in celigo-cli 2026.9.6.                                                         |
| `query-results <jobId>`           | Read a completed query job's rows without resubmitting the query. Added in celigo-cli 2026.9.6.                                                                       |
| `replace <id> <localPath>`        | Replace a file's contents in place, keeping its ID, name, parent, and references.                                                                                     |
| `create-folder <name>`            | Create a folder.                                                                                                                                                      |
| `set <id> key=value …`            | Edit a storage item's `name` and/or `description`.                                                                                                                    |
| `move <ids...> --to <parentId>`   | Move up to 100 files or folders into another folder.                                                                                                                  |
| `copy <id> --to <parentId>`       | Copy a file into another folder (files only).                                                                                                                         |
| `merge <id> --to <destinationId>` | Merge a folder's contents into another folder and remove the source (folders only).                                                                                   |
| `delete <id>`                     | Soft-delete an item to the recycle bin.                                                                                                                               |
| `cancel-upload <id>`              | Abort an in-progress multipart upload.                                                                                                                                |
| `activity`                        | List the environment's storage activity log, newest entry first: who did what to which file or folder. Added in celigo-cli 2026.11.2.                                 |
| `export-activity`                 | Write the activity entries the filters match to a CSV behind a pre-signed download link. Added in celigo-cli 2026.11.2.                                               |

***

## `celigo storage list`

List the items in a single folder. With no `--parent` (or `--parent root`), `list` returns the root. With `--parent <id>`, it returns that folder's immediate children. Listings are one folder deep. Use `search` to look through the whole tree.

**Signature**

```bash
celigo storage list [flags]
```

**Arguments**

None.

**Flags**

| Flag                   | Type                | Default | Description                                                                                                                                                                                                                 |
| ---------------------- | ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--parent <id>`        | string              | —       | List the contents of this folder. Omit it, or pass `root`, for the top level. Since celigo-cli 2026.10.1, `root` names the top level here as it does for `move --to`; it used to be sent as a folder id and answered `404`. |
| `--mime <types...>`    | string (repeatable) | —       | Keep only items whose MIME type matches one of the values; several types are OR-matched. Sent as one `mimeType` query parameter per value.                                                                                  |
| `--sort <field>`       | string              | —       | Field to sort by: `name` or `lastModified`. Sent as `sort_by`.                                                                                                                                                              |
| `--order <dir>`        | string              | —       | Sort direction, `asc` or `desc`. Sent as `sort_order`.                                                                                                                                                                      |
| `--modified-gte <iso>` | ISO 8601            | —       | Keep items whose `lastModified` is at or after this timestamp (inclusive). Sent as `lastModified_gte`.                                                                                                                      |
| `--modified-lte <iso>` | ISO 8601            | —       | Keep items whose `lastModified` is at or before this timestamp (inclusive). Sent as `lastModified_lte`.                                                                                                                     |

Since celigo-cli 2026.11.2, the filters are checked before any request; earlier releases did not check them. The CLI refuses:

* A `--sort` other than `name` or `lastModified`, or an `--order` other than `asc` or `desc`: `Invalid --sort 'size'. Expected one of: name, lastModified.`
* A `--modified-gte` or `--modified-lte` that is not an ISO 8601 timestamp, and a `--modified-gte` that is not earlier than `--modified-lte`.
* A blank `--mime`, `--sort`, `--order`, `--modified-gte`, or `--modified-lte` (an unset shell variable).

Default table columns: `_id`, `type`, `name`, `size`, `mimeType`, `status`, `lastModified`.

**Example**

```bash
# The root folder
celigo storage list --format table

# CSVs in one folder, newest first
celigo storage list --parent 5f83a9b2c7d3e8f1a2b3c4d5 \
  --mime text/csv --sort lastModified --order desc
```

**Corresponds to**: [`GET /v1/storage/items`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) — with `_parentId` and the filter parameters above as query parameters. The CLI follows the response's `Link: rel="next"` cursor and returns the accumulated pages as one list.

***

## `celigo storage search`

Search items by name across the entire tree, regardless of which folder holds them. `search` accepts the same MIME, sort, and date filters as `list`, and since celigo-cli 2026.11.2 checks them the same way before the request.

**Signature**

```bash
celigo storage search <query> [flags]
```

**Arguments**

| Argument  | Type   | Required | Description                                                            |
| --------- | ------ | -------- | ---------------------------------------------------------------------- |
| `<query>` | string | Yes      | Text to match against item names. Matching is recursive from the root. |

**Flags**

| Flag                   | Type                | Default | Description                                                                                                                                |
| ---------------------- | ------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `--mime <types...>`    | string (repeatable) | —       | Keep only items whose MIME type matches one of the values; several types are OR-matched. Sent as one `mimeType` query parameter per value. |
| `--sort <field>`       | string              | —       | Field to sort by: `name` or `lastModified`. Sent as `sort_by`.                                                                             |
| `--order <dir>`        | string              | —       | Sort direction, `asc` or `desc`. Sent as `sort_order`.                                                                                     |
| `--modified-gte <iso>` | ISO 8601            | —       | Keep items whose `lastModified` is at or after this timestamp (inclusive). Sent as `lastModified_gte`.                                     |
| `--modified-lte <iso>` | ISO 8601            | —       | Keep items whose `lastModified` is at or before this timestamp (inclusive). Sent as `lastModified_lte`.                                    |

Default table columns: `_id`, `type`, `name`, `size`, `mimeType`, `status`, `lastModified`.

**Example**

```bash
celigo storage search "invoice" --mime application/pdf --format table

celigo storage search "orders" \
  --modified-gte 2026-07-01T00:00:00Z --modified-lte 2026-07-31T23:59:59Z
```

**Corresponds to**: [`GET /v1/storage/items?search=<query>`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) — the same collection endpoint as `list`, with a `search` query parameter instead of `_parentId`.

***

## `celigo storage get`

Get metadata for one or more items by ID — a batch get, up to 100 ids per call. Returns one entry per id, in request order. All metadata fields are requested by default; narrow the set with `--fields`. The `path` field is a breadcrumb built from the item's ancestor folder names (e.g. `/invoices/2026/inv-001.pdf`).

An unknown id fails the whole request (`422`) unless `--no-fail-fast`, which reports unknown ids inline as `{"_id", "notFound": true}` entries alongside the found items.

File ids only for now: despite the endpoint's item vocabulary, a **folder** id is rejected as not-found — folder metadata comes from `list`/`search` instead.

**Signature**

```bash
celigo storage get <ids...> [--fields <f,...>] [--no-fail-fast]
```

**Arguments**

| Argument   | Type              | Required | Description                               |
| ---------- | ----------------- | -------- | ----------------------------------------- |
| `<ids...>` | string (variadic) | Yes      | One or more storage file ids (up to 100). |

**Flags**

| Flag                | Type    | Default     | Description                                                                                                                                                                                                                                                                                                           |
| ------------------- | ------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--fields <fields>` | string  | all of them | Comma-separated fields to return per item (`_id` always rides along). Allowed: `name`, `description`, `size`, `mimeType`, `type`, `status`, `lastModified`, `_parentId`, `__ancestorIds`, `path`. Since celigo-cli 2026.11.2 the list takes `lastModified`, and `--format table` draws `_id` and the fields you name. |
| `--no-fail-fast`    | boolean | `false`     | Report unknown ids inline instead of failing the whole request.                                                                                                                                                                                                                                                       |

Default table columns: `_id`, `type`, `name`, `size`, `mimeType`, `status`, `lastModified`, `path`. The `lastModified` column was added in celigo-cli 2026.11.2.

**Example**

```bash
# Full metadata, including the path breadcrumb
celigo storage get 5f83a9b2c7d3e8f1a2b3c4d5 60a1b2c3d4e5f6a7b8c9d0e1

# Just names and sizes, tolerant of a stale id
celigo storage get 5f83a9b2c7d3e8f1a2b3c4d5 60a1b2c3d4e5f6a7b8c9d0e1 \
  --fields name,size --no-fail-fast
```

**Corresponds to**: [`POST /v1/storage/items/batch`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) — a pure read; the batch endpoint is on the CLI's read-only-POST allowlist, so it works in `read` mode.

***

## `celigo storage upload`

Upload a local file. The CLI reads the file's size and asks the API to start an upload. It then streams the bytes to the presigned URLs it gets back. Files up to 5 MiB use a single `PUT`; larger files use a multipart transfer. The MIME type is derived from the file extension. Unrecognized extensions become `application/octet-stream`. Requires `operate` mode.

Since celigo-cli 2026.10.1, an upload is held to what it can finish:

* An empty file is refused before any request: `./exports/orders.csv is empty (0 bytes); Storage cannot hold an empty file.`
* The transfer is held to the size measured before the upload starts. A file that grows or shrinks while it is read is refused instead of being stored truncated: `The file changed while it was being uploaded (8388608 bytes when the upload started, 6291456 now), so the upload was not completed. Upload it again once it is no longer being written.`
* A multipart upload names its pending item on stderr as soon as it starts — `upload 5f83a9b2c7d3e8f1a2b3c4d5 started - if it is interrupted, cancel it with: celigo storage cancel-upload 5f83a9b2c7d3e8f1a2b3c4d5` — and a SIGINT, SIGTERM, or SIGHUP (a closed terminal or a dropped SSH session) during the parts cancels that item with one request before the command exits `130`, `143`, or `129`.
* When the API issues fewer part URLs than the file needs, the CLI uploads them, then requests the next batch with the upload's `uploadId` and `issuedPartsCount` until every part is up. If the API will issue no more, the upload is not completed and the error names `storage cancel-upload`.
* A multipart completion that S3 answers with `200` and an `<Error>` document is a failed upload — the object was never assembled — not `Uploaded`. A multipart failure after the upload starts ends with `The pending item keeps the file's name until it is cancelled. Discard the pending upload with: celigo storage cancel-upload <id>`.

**Signature**

```bash
celigo storage upload <localPath> [flags]
```

**Arguments**

| Argument      | Type   | Required | Description                                                |
| ------------- | ------ | -------- | ---------------------------------------------------------- |
| `<localPath>` | string | Yes      | Path to a local file. It must exist and be a regular file. |

**Flags**

| Flag            | Type   | Default            | Description                                                                                             |
| --------------- | ------ | ------------------ | ------------------------------------------------------------------------------------------------------- |
| `--parent <id>` | string | —                  | Destination folder. Omit it, or pass `root` (since celigo-cli 2026.10.1), to upload into the top level. |
| `--name <name>` | string | the local filename | Name to store the file as.                                                                              |

**Example**

```bash
celigo storage upload ./exports/orders.csv --parent 5f83a9b2c7d3e8f1a2b3c4d5

# Store it under a different name
celigo storage upload ./tmp/2026-07.csv --name orders-july.csv --format json
```

**Corresponds to**: [`POST /v1/storage/files/initiateUpload`](https://developer.celigo.com/api/api-reference/data-stores/file-storage), followed by the file bytes going straight to the presigned storage URL(s) returned in the response. That second leg is an out-of-band transfer, not a Celigo API call — your API token is never sent with it.

***

## `celigo storage download`

Download a stored file by ID — or, with `--folder`, a folder and everything beneath it as one zip that the platform packages for you. The optional path controls where the bytes go:

| `[localPath]`         | Result                                                                                       |
| --------------------- | -------------------------------------------------------------------------------------------- |
| omitted               | Writes to the current directory under the stored name — `<folder-name>.zip` with `--folder`. |
| an existing directory | Writes into that directory under the stored name.                                            |
| a file path           | Writes to exactly that path.                                                                 |
| `-`                   | Streams the bytes to stdout.                                                                 |

With `--folder`, omit the path to get `<folder-name>.zip` in the current directory, or give an explicit file path. A directory path takes the filename from the download response's headers rather than from the folder's name, so prefer one of the other two forms for a predictable name.

Since celigo-cli 2026.10.1, `download` never replaces a local file unless you pass `--force` — the stored name is the server's, and a stored file called `.bashrc` could otherwise replace yours: `./orders.csv already exists; refusing to overwrite it. Pass --force to replace it, or choose another destination.` A path you name is checked before any request; a name the server supplies, before the first byte is written. A directory is never replaced, `--force` or not, and a path whose directory does not exist is refused up front. The bytes are staged in a temporary file beside the target and renamed into place when the transfer finishes, so a failure never truncates an existing file, and a SIGINT, SIGTERM, or SIGHUP removes the staged file.

Also since celigo-cli 2026.10.1, a name taken from the response's headers is only ever a file name: only its last path component is used, so it can never choose the directory written to. An RFC 5987 `filename*` is preferred to `filename`, `%XX` escapes are decoded, and a `%` that is not valid percent-encoding is kept as sent (`100%.csv`). With `--folder`, the zip is saved as `<name>.zip`, never `<name>.zip.zip`.

Since celigo-cli 2026.11.2, a leading `~` in `[localPath]` means your home directory. With `-`, stdout holds the file's bytes and nothing else. A failure prints on stderr only: the JSON error document that a failed command otherwise prints on stdout since celigo-cli 2026.11.2 is never written there.

**Signature**

```bash
celigo storage download <id> [localPath] [--folder] [--force]
```

**Arguments**

| Argument      | Type   | Required | Description                                                                                                                   |
| ------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `<id>`        | string | Yes      | Storage item ID of the file — or of the folder, with `--folder`.                                                              |
| `[localPath]` | string | No       | Destination: a directory, an explicit file path, or `-` for stdout. Defaults to the stored filename in the current directory. |

**Flags**

| Flag       | Type    | Default | Description                                                                                                                                                                             |
| ---------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--folder` | boolean | `false` | The ID is a folder. The platform packages it and everything beneath it into a zip, which the CLI downloads as `<folder-name>.zip` unless you give a path. Added in celigo-cli 2026.9.6. |
| `--force`  | boolean | `false` | Replace the destination file if it already exists. A directory is never replaced. Added in celigo-cli 2026.10.1.                                                                        |

**Example**

```bash
# ./orders.csv, using the stored name
celigo storage download 5f83a9b2c7d3e8f1a2b3c4d5

# Refresh a copy you downloaded before
celigo storage download 5f83a9b2c7d3e8f1a2b3c4d5 ./orders.csv --force

# Into a directory, keeping the stored name
celigo storage download 5f83a9b2c7d3e8f1a2b3c4d5 ./downloads/

# Straight into a pipeline
celigo storage download 5f83a9b2c7d3e8f1a2b3c4d5 - | head -5

# A whole folder as one zip, named after the folder
celigo storage download 60a1b2c3d4e5f6a7b8c9d0e1 --folder

# The same zip at a path of your choosing
celigo storage download 60a1b2c3d4e5f6a7b8c9d0e1 --folder ./archive/inbound-orders-2026-07.zip
```

**Corresponds to**: [`GET /v1/storage/files/{_id}/download`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) — or [`GET /v1/storage/folders/{_id}/download`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) with `--folder` — which returns a `downloadUrl` (and the folder's `name`); the CLI then streams the bytes from that presigned URL (an out-of-band transfer, not a Celigo API call).

***

## `celigo storage query`

Run one read-only SQL `SELECT` over files in Celigo Storage and print the rows. Files are the tables: quote a storage path where a table name goes (`FROM "orders/sept.csv"`), or pass it to a reader function when the read needs options (`read_csv_auto('orders/sept.csv', header = true)`). CSV/TSV, JSON, NDJSON, and Parquet files are supported. A folder of same-format files reads as one table when its path ends with a slash (`FROM "orders/2026/"`); without the slash the folder is refused as "not a file". Added in celigo-cli 2026.9.6.

The query is validated at submit — exactly one `SELECT`, allow-listed functions, every path readable — and queued as a job. The command polls the job about once a second, reports each status change on stderr, and delivers the result when the job completes:

| Situation            | What prints                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| up to 1,000 rows     | Page 1 of the result set: `{page, pageCount, rowCount, hasMore, rows}` in JSON output, or a table whose columns follow the `SELECT` list.                                                                                                                                                                                                                                                  |
| more than 1,000 rows | The job envelope (`jobId`, `status`, `rowCount`, `pageCount`, `columns`, `truncated`, `executionMs`) plus a stderr hint. The rows stay on the server: save them with `query-results <jobId> -o rows.csv`, print them with `--all`, or add `LIMIT` for a sample. Nothing is resubmitted.                                                                                                    |
| `-o <path>`          | Every row streamed to the file one page at a time — RFC 4180 CSV with a header row in `SELECT` column order for a `.csv` path, otherwise a JSON array with one row per line — then the job envelope with `path` and `format` (`csv` or `json`) added. Never guarded by the row limit. The rows go to a temporary file beside the target, renamed into place when the last page is written. |
| `--all`              | Every row, merged across pages, however many there are.                                                                                                                                                                                                                                                                                                                                    |
| `--page <n>`         | That one results page.                                                                                                                                                                                                                                                                                                                                                                     |
| `--no-wait`          | The submit response (`{jobId, status}`) as soon as the job is queued. Poll it with `query-status`, read it with `query-results`.                                                                                                                                                                                                                                                           |

`BIGINT` and `DECIMAL` values arrive as strings. A job that fails at run time — a column whose auto-detected type breaks part-way through the file, for example — exits `1` with the engine's message and its suggested read options (`types=`, `sample_size=-1`, `all_varchar=true`). A result set the engine truncated is flagged on stderr; narrow the query for the rest.

Since celigo-cli 2026.10.1, the flags are checked before the query is submitted, so a refused flag never leaves a job queued behind it. `--page` and `--timeout` must be positive whole numbers (`--timeout 5m` used to mean 5 seconds). `--no-wait` refuses `-o`, `--page`, and `--all`, which it used to ignore: `--no-wait prints the job envelope without waiting for rows, so -o would be ignored. Drop --no-wait, or read the rows later with: celigo storage query-results <jobId> -o <path>.` An `-o` file that already exists is refused unless `--force`, and so are a directory and a path whose directory does not exist, so a rate-limited submit is never spent on a file that cannot be written.

Since celigo-cli 2026.11.2, under `--format table` a `--jq` expression reads the page envelope (`{page, pageCount, rowCount, hasMore, rows}`), as it does in JSON output. Earlier releases gave it the bare rows. The same holds for `query-results`.

**Signature**

```bash
celigo storage query [sql] [-f <path>] [--no-wait] [--timeout <seconds>] [-o <path>] [--force] [--page <n>] [--all]
```

**Arguments**

| Argument | Type   | Required | Description                                                                                                                                                                                                                                                                                                                                                                    |
| -------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `[sql]`  | string | No       | The SQL text — one `SELECT` statement, quoted for your shell. Required unless `--file` is given; with neither, the command exits `1` with `Provide the SQL as an argument or with --file <path>.` Since celigo-cli 2026.11.2, passing both is refused: `Pass either a SQL query argument or --file <path>, not both.` Earlier releases read the file and ignored the argument. |

**Flags**

| Flag                  | Type    | Default | Description                                                                                                                                                                                                                               |
| --------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-f, --file <path>`   | string  | —       | Read the SQL text from a file instead of the argument. A leading `~` is expanded.                                                                                                                                                         |
| `--no-wait`           | boolean | `false` | Submit and print the job envelope (`{jobId, status}`) without waiting for the result. Cannot be combined with `-o`, `--page`, or `--all`.                                                                                                 |
| `--timeout <seconds>` | integer | `120`   | How long to wait for the job, in whole seconds. On timeout the command exits `1` and names the `query-status` and `query-results` commands that pick the job up — the job itself may still finish.                                        |
| `-o, --output <path>` | string  | —       | Save every row to this file — CSV for a `.csv` path, otherwise a JSON array — and print the envelope with `path` and `format`. A leading `~` is expanded. Cannot be combined with `--page`. An existing file is refused unless `--force`. |
| `--force`             | boolean | `false` | Replace the `-o` file if it already exists. Added in celigo-cli 2026.10.1.                                                                                                                                                                |
| `--page <n>`          | integer | `1`     | Which results page to print once the job completes. Cannot be combined with `--all` or `-o`.                                                                                                                                              |
| `--all`               | boolean | `false` | Print every row, merged across pages, however many there are.                                                                                                                                                                             |

**Example**

```bash
# A sample of one file, as a table in SELECT column order
celigo storage query 'SELECT order_id, total FROM "orders/sept.csv" LIMIT 20' --format table

# A folder of same-format files as one table, saved whole to disk
celigo storage query 'SELECT * FROM "orders/2026/"' -o orders-2026.csv

# Reader options for a file the auto-detection gets wrong
celigo storage query "SELECT * FROM read_csv_auto('orders/sept.csv', header = true, all_varchar = true) LIMIT 20"

# Submit now, pick the rows up later
celigo storage query -f ./monthly-rollup.sql --no-wait
```

**Corresponds to**: [`POST /v1/storage/query`](https://developer.celigo.com/api/api-reference/data-stores/storage-query) with `{"sql": "..."}`, then [`GET /v1/storage/query/{jobId}/status`](https://developer.celigo.com/api/api-reference/data-stores/storage-query) until the job completes, then [`GET /v1/storage/query/{jobId}/results?page=<n>`](https://developer.celigo.com/api/api-reference/data-stores/storage-query) for each page it prints or saves. The submit is a read-only `POST` on the CLI's allowlist, so `query` works in `read` mode.

***

## `celigo storage query-status`

Get a storage query job's lifecycle state: `queued`, `running`, `completed` — with `rowCount`, `pageCount`, `columns`, `truncated`, and `executionMs` — or `failed`, with `error.code` and `error.message`. Use it after `query --no-wait`, or after a `query` that timed out. Job records expire; an expired id answers `404`. Added in celigo-cli 2026.9.6.

**Signature**

```bash
celigo storage query-status <jobId>
```

**Arguments**

| Argument  | Type   | Required | Description                              |
| --------- | ------ | -------- | ---------------------------------------- |
| `<jobId>` | string | Yes      | Job ID from the `query` submit envelope. |

**Flags**

Uses [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md) only.

**Example**

```bash
celigo storage query-status 5f83a9b2c7d3e8f1a2b3c4d5

# Just the state, for a shell loop
celigo storage query-status 5f83a9b2c7d3e8f1a2b3c4d5 --jq '.status'
```

**Corresponds to**: [`GET /v1/storage/query/{jobId}/status`](https://developer.celigo.com/api/api-reference/data-stores/storage-query)

***

## `celigo storage query-results`

Read a completed storage query job's rows without resubmitting the query — the rows stay on the server for the job's retention period. This is the follow-up to a `query` that printed only the envelope, timed out, or ran with `--no-wait`. Delivery follows the same rules as `query`: page 1 (`{page, pageCount, rowCount, hasMore, rows}`) when the result set is within 1,000 rows, otherwise the job envelope and a stderr hint; `-o <path>` saves every row to a CSV or JSON file, `--all` prints every row, `--page <n>` prints one page. A job still `queued` or `running` exits `1` with a message pointing at `query-status` — its rows exist only once it completes — and a `failed` job exits `1` with its error. Added in celigo-cli 2026.9.6.

Since celigo-cli 2026.10.1, `--page` and the `-o` destination are checked before the job is polled: an existing file is refused unless `--force`, as are a directory and a path whose directory does not exist, and the rows are staged in a temporary file beside the target and renamed into place.

**Signature**

```bash
celigo storage query-results <jobId> [-o <path>] [--force] [--page <n>] [--all]
```

**Arguments**

| Argument  | Type   | Required | Description                                                |
| --------- | ------ | -------- | ---------------------------------------------------------- |
| `<jobId>` | string | Yes      | Job ID from the `query` submit envelope or `query-status`. |

**Flags**

| Flag                  | Type    | Default | Description                                                                                                                                                                                                                               |
| --------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-o, --output <path>` | string  | —       | Save every row to this file — CSV for a `.csv` path, otherwise a JSON array — and print the envelope with `path` and `format`. A leading `~` is expanded. Cannot be combined with `--page`. An existing file is refused unless `--force`. |
| `--force`             | boolean | `false` | Replace the `-o` file if it already exists. Added in celigo-cli 2026.10.1.                                                                                                                                                                |
| `--page <n>`          | integer | `1`     | Page to return, `1` to the job's `pageCount`. Cannot be combined with `--all` or `-o`.                                                                                                                                                    |
| `--all`               | boolean | `false` | Print every row, merged across pages, however many there are.                                                                                                                                                                             |

**Example**

```bash
# Page 1 (or the envelope, past 1,000 rows)
celigo storage query-results 5f83a9b2c7d3e8f1a2b3c4d5

# The whole result set as CSV
celigo storage query-results 5f83a9b2c7d3e8f1a2b3c4d5 -o ./orders-2026.csv

# One page of a large result
celigo storage query-results 5f83a9b2c7d3e8f1a2b3c4d5 --page 3
```

**Corresponds to**: [`GET /v1/storage/query/{jobId}/status`](https://developer.celigo.com/api/api-reference/data-stores/storage-query) to confirm the job completed, then [`GET /v1/storage/query/{jobId}/results?page=<n>`](https://developer.celigo.com/api/api-reference/data-stores/storage-query) for each page it prints or saves.

***

## `celigo storage replace`

Swap a file's contents for the contents of a local file. The item keeps its ID, name, parent folder, and every inbound reference. Exports, imports, and MCP server resources that point at this file keep working and read the new bytes on their next run. Use `replace` for a recurring drop of the same logical file. Use `upload` when you want a new item.

> ⚠️ **`replace` overwrites the stored contents.** The previous bytes are gone — no earlier version is kept. Download the current contents first if you might need them.

Requires `operate` mode. Since celigo-cli 2026.10.1, `replace` keeps the file's stored media type when the local file's extension names none (it used to reset it to `application/octet-stream`). It follows `upload`'s rules for an empty file, a file whose size changes mid-transfer, and part URLs issued in batches. A failed multipart replace leaves no pending item to cancel — the error says `The stored file keeps its previous content until a replace completes; run the replace again.`

**Signature**

```bash
celigo storage replace <id> <localPath>
```

**Arguments**

| Argument      | Type   | Required | Description                                               |
| ------------- | ------ | -------- | --------------------------------------------------------- |
| `<id>`        | string | Yes      | Storage item ID of the file to replace.                   |
| `<localPath>` | string | Yes      | Local file whose contents become the item's new contents. |

**Flags**

Uses [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md) only.

**Example**

```bash
celigo storage replace 5f83a9b2c7d3e8f1a2b3c4d5 ./exports/orders-latest.csv
```

**Corresponds to**: [`PATCH /v1/storage/items/{_id}/replace`](https://developer.celigo.com/api/api-reference/data-stores/file-storage), followed by the same single or multipart transfer to the presigned URL(s) that `upload` uses. The stored name is untouched — the CLI does not send one, and the API ignores a name if it receives one.

***

## `celigo storage create-folder`

Create a folder, in the root or inside another folder. Requires `full` mode since celigo-cli 2026.10.1 — a new folder changes the storage tree's structure, like `merge`; it used to run in `operate` mode.

**Signature**

```bash
celigo storage create-folder <name> [flags]
```

**Arguments**

| Argument | Type   | Required | Description  |
| -------- | ------ | -------- | ------------ |
| `<name>` | string | Yes      | Folder name. |

**Flags**

| Flag            | Type   | Default | Description                                                                                                 |
| --------------- | ------ | ------- | ----------------------------------------------------------------------------------------------------------- |
| `--parent <id>` | string | —       | Parent folder. Omit it, or pass `root` (since celigo-cli 2026.10.1), to create the folder in the top level. |

**Example**

```bash
celigo storage create-folder "Inbound orders"
celigo storage create-folder 2026-07 --parent 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: [`POST /v1/storage/items`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) with `type: "folder"`, the name, and `_parentId` when `--parent` is given.

***

## `celigo storage set`

Rename a file or folder, or change its description. These are the only two editable fields on a storage item.

`set` behaves differently here than in other command groups. It sends one partial `PUT`, and the storage endpoint merges only the fields you name. There is no `GET`-then-`PUT` round trip, so fields you omit are never cleared.

Since celigo-cli 2026.10.1:

* Any other field is refused before the request: `Cannot set mimeType on a storage item: only name and description are editable.`
* A value is kept as the text you typed: `name=2026` names the item `2026` (it used to be refused as a number), and `description=42` sends the text `"42"`.
* `description=null` clears the description. `name` cannot be cleared: `A storage item's name must be a non-empty string and cannot be cleared.`
* `operate` mode refuses `set`, because a storage item has no operational field; it needs `full` mode.

**Signature**

```bash
celigo storage set <id> <key=value> [key=value ...]
```

**Arguments**

| Argument      | Type   | Required | Description                                                                                                 |
| ------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------- |
| `<id>`        | string | Yes      | Storage item ID (file or folder).                                                                           |
| `<key=value>` | string | Yes (≥1) | Field assignments. Only `name` and `description` are accepted; anything else is refused before the request. |

**Flags**

Uses [global flags](https://developer.celigo.com/cli/getting-started/global-flags.md) only.

**Example**

```bash
celigo storage set 5f83a9b2c7d3e8f1a2b3c4d5 name=orders-2026-07.csv
celigo storage set 5f83a9b2c7d3e8f1a2b3c4d5 \
  name=orders-2026-07.csv description="July order export"
```

**Corresponds to**: [`PUT /v1/storage/items/{_id}`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) with a partial body containing only the fields you assigned.

***

## `celigo storage move`

Move one or more items — up to 100 — into a different folder. Pass the literal `root` to move items to the top level. Folder moves cascade asynchronously. Requires `full` mode since celigo-cli 2026.10.1 — a move changes the storage tree's structure; it used to run in `operate` mode.

A single id goes through the per-item move endpoint, exactly as before celigo-cli 2026.8.7. Several ids — or `--name` — route to the bulk endpoint, which validates the destination once up front and then moves each item best-effort: a mixed batch returns per-id success/error results. `--name` renames the item as it lands (exactly one id), resolving a destination name collision without a second call.

Since celigo-cli 2026.10.1, a bulk move whose results hold a refused item exits `1` and counts the refused items on stderr — `2 of 5 items could not be moved (see results above); 3 moved.` A refusal such as `STORAGE_ITEM_NOT_FOUND` or `STORAGE_MOVE_SAME_PARENT_DISALLOWED` arrives inside a `200` answer, and the command used to exit `0`.

**Signature**

```bash
celigo storage move <ids...> --to <parentId> [--name <name>]
```

**Arguments**

| Argument   | Type              | Required | Description                                                 |
| ---------- | ----------------- | -------- | ----------------------------------------------------------- |
| `<ids...>` | string (variadic) | Yes      | One or more storage item IDs (files or folders, up to 100). |

**Flags**

| Flag              | Type   | Default | Description                                                                   |
| ----------------- | ------ | ------- | ----------------------------------------------------------------------------- |
| `--to <parentId>` | string | —       | **Required.** Destination folder ID, or the literal `root` for the top level. |
| `--name <name>`   | string | —       | New name applied in the same write as the move. Single id only.               |

**Example**

```bash
# One item, per-item endpoint
celigo storage move 5f83a9b2c7d3e8f1a2b3c4d5 --to 60a1b2c3d4e5f6a7b8c9d0e1

# Several items in one command (best-effort batch)
celigo storage move 5f83a9b2c7d3e8f1a2b3c4d5 5f83a9b2c7d3e8f1a2b3c4d6 --to root

# Move and rename in one write, dodging a name collision in the destination
celigo storage move 5f83a9b2c7d3e8f1a2b3c4d5 --to 60a1b2c3d4e5f6a7b8c9d0e1 --name orders-archive.csv
```

**Corresponds to**: [`PATCH /v1/storage/items/{_id}/move`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) for a single id with no `--name` (destination as `_parentId`; `--to root` is sent as `null`), or [`POST /v1/storage/items/move`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) for several ids or `--name`.

***

## `celigo storage copy`

Copy a file into another folder, optionally under a new name. Files only — folders cannot be copied. Requires `full` mode since celigo-cli 2026.10.1 — a copy changes the storage tree's structure; it used to run in `operate` mode.

**Signature**

```bash
celigo storage copy <id> --to <parentId> [--name <name>]
```

**Arguments**

| Argument | Type   | Required | Description                          |
| -------- | ------ | -------- | ------------------------------------ |
| `<id>`   | string | Yes      | Storage item ID of the file to copy. |

**Flags**

| Flag              | Type   | Default                 | Description                                                                    |
| ----------------- | ------ | ----------------------- | ------------------------------------------------------------------------------ |
| `--to <parentId>` | string | —                       | **Required.** Destination folder ID, or the literal `root` for the top level.  |
| `--name <name>`   | string | `Clone - <source name>` | Name for the copy. Without it, the API names the copy `Clone - <source name>`. |

**Example**

```bash
celigo storage copy 5f83a9b2c7d3e8f1a2b3c4d5 \
  --to 60a1b2c3d4e5f6a7b8c9d0e1 --name orders-archive.csv
```

**Corresponds to**: [`POST /v1/storage/items/{_id}/copy`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) with the destination as `_parentId` (`--to root` is sent as `null`) and the optional `name`.

***

## `celigo storage merge`

Move one folder's contents into another folder, then remove the source folder. Folders only. To relocate a single file, use `move`.

The API returns `202 Accepted` and transfers the items in the background. The destination fills in over the seconds that follow, not instantly. Merging a soft-deleted folder restores its contents into the destination. That is one way to recover a deleted folder's files into a folder you choose.

> ⚠️ **`merge` removes the source folder.** Once the background job finishes, the source folder no longer exists — its contents live under the destination. Confirm the destination ID before running it.

**Signature**

```bash
celigo storage merge <id> --to <destinationId>
```

**Arguments**

| Argument | Type   | Required | Description                         |
| -------- | ------ | -------- | ----------------------------------- |
| `<id>`   | string | Yes      | Source folder ID. Must be a folder. |

**Flags**

| Flag                   | Type   | Default | Description                                                      |
| ---------------------- | ------ | ------- | ---------------------------------------------------------------- |
| `--to <destinationId>` | string | —       | **Required.** Destination folder ID. Must be an existing folder. |

**Example**

```bash
celigo storage merge 5f83a9b2c7d3e8f1a2b3c4d5 --to 60a1b2c3d4e5f6a7b8c9d0e1
```

**Corresponds to**: [`POST /v1/storage/items/{_id}/merge`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) with the destination as `_destinationId`.

***

## `celigo storage delete`

Soft-delete a file or folder. The item moves to the Recycle Bin instead of being destroyed. Deleting a folder cascades to everything inside it. The command prompts for confirmation unless you pass `-y`.

> ⚠️ **Deleting a folder deletes its whole subtree.** Every descendant file and folder is soft-deleted with it, and the cascade runs in the background. Exports, imports, and MCP server resources that reference a deleted file begin failing. Check what points at the item before you delete it.

**Signature**

```bash
celigo storage delete <id> [flags]
```

**Arguments**

| Argument | Type   | Required | Description                       |
| -------- | ------ | -------- | --------------------------------- |
| `<id>`   | string | Yes      | Storage item ID (file or folder). |

**Flags**

| Flag        | Type    | Default | Description                   |
| ----------- | ------- | ------- | ----------------------------- |
| `-y, --yes` | boolean | `false` | Skip the confirmation prompt. |

**Example**

```bash
celigo storage delete 5f83a9b2c7d3e8f1a2b3c4d5 -y
```

**Corresponds to**: [`DELETE /v1/storage/items/{_id}`](https://developer.celigo.com/api/api-reference/data-stores/file-storage). To restore the item, use [recycle-bin](https://developer.celigo.com/cli/commands/recycle-bin.md).

***

## `celigo storage cancel-upload`

Abort an in-progress multipart upload, discarding any uploaded parts. Use it to clean up an item stuck in `uploading` after an interrupted upload — since celigo-cli 2026.10.1 a multipart `upload` prints the item's id on stderr as soon as it starts. A `replace` leaves no pending item to cancel.

**Signature**

```bash
celigo storage cancel-upload <id>
```

**Arguments**

| Argument | Type   | Required | Description                          |
| -------- | ------ | -------- | ------------------------------------ |
| `<id>`   | string | Yes      | Storage item ID of the stuck upload. |

**Example**

```bash
celigo storage cancel-upload 5f83a9b2c7d3e8f1a2b3c4d5
```

**Corresponds to**: [`POST /v1/storage/files/{_id}/cancel`](https://developer.celigo.com/api/api-reference/data-stores/file-storage)

***

## `celigo storage activity`

List the environment's Celigo Storage activity log, newest entry first. The log holds one entry per action on a file or folder (`create`, `upload`, `update`, `download`, `move`, `copy`, `merge`, `delete`, `restore`, `purge`, `preview`), per storage query, and per file server login. Each entry says who did it (`byUserName`, `_byUserId`), through which channel (`source`), and what changed (`details`). Works in `read` mode. Added in celigo-cli 2026.11.2.

`--item` gives one item's whole history, including the entries recorded after the item went to the recycle bin or was purged. The other filters narrow the log by integration, item type, actor, channel, action, and time. Every filter but the two time bounds takes several values after the flag, or the flag repeated.

The command returns one page: `--limit` entries, `100` by default and at most `1000`. When more entries exist, stderr says so:

```
Note: more entries exist beyond --limit 100; raise it, narrow the filters, or export them with 'storage export-activity'.
```

**Signature**

```bash
celigo storage activity [--item <ids...>] [--integration <ids...>] [--type <types...>] [--by <ids...>] \
  [--source <sources...>] [--action <actions...>] [--time-gte <time>] [--time-lte <time>] [--order <dir>] [--limit <n>]
```

**Arguments**

None.

**Flags**

| Flag                     | Type                           | Default | Description                                                                                                                                                    |
| ------------------------ | ------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--item <ids...>`        | string (repeatable)            | —       | Only the history of these files or folders. At most 50 ids. Sent as one `_resourceId` query parameter per value.                                               |
| `--integration <ids...>` | string (repeatable)            | —       | Only entries for items in these integrations' system folder trees. At most 50 ids. Sent as `_integrationId`.                                                   |
| `--type <types...>`      | string (repeatable)            | —       | Only entries for these item types: `file`, `folder`. Query and login entries belong to no item, so any `--type` leaves them out.                               |
| `--by <ids...>`          | string (repeatable)            | —       | Only entries by these actors: user ids, file server account ids, or `system`. At most 50 values. Sent as `_byUserId`.                                          |
| `--source <sources...>`  | string (repeatable)            | —       | Only entries made through these channels: `ui`, `api`, `cli`, `mcp`, `ora`, `connector`, `script`, `stack`, `sso`, `fileserver`, `system`, `knowledge-fabric`. |
| `--action <actions...>`  | string (repeatable)            | —       | Only these actions: `create`, `upload`, `update`, `download`, `move`, `copy`, `merge`, `delete`, `restore`, `purge`, `query`, `login`, `preview`.              |
| `--time-gte <time>`      | ISO 8601 or epoch milliseconds | —       | Only entries at or after this time. Sent as `time_gte`.                                                                                                        |
| `--time-lte <time>`      | ISO 8601 or epoch milliseconds | —       | Only entries at or before this time. It must not be earlier than `--time-gte`. Sent as `time_lte`.                                                             |
| `--order <dir>`          | string                         | `desc`  | Sort by time: `desc` lists the newest entry first, `asc` the oldest. Sent as `sort_order`.                                                                     |
| `--limit <n>`            | integer                        | `100`   | Entries to return, 1–1000, as one page. Sent as `pageSize`.                                                                                                    |

The flags are checked before any request. The CLI refuses a value outside a flag's list, more than 50 distinct values on one flag, a blank value, a `--limit` over `1000`, and a time that is neither ISO 8601 nor epoch milliseconds.

Default table columns: `time`, `action`, `type`, `resourceName`, `_resourceId`, `byUserName`, `source`.

**Example**

```bash
# The 100 most recent entries
celigo storage activity --format table

# One file's whole history, oldest entry first
celigo storage activity --item 5f83a9b2c7d3e8f1a2b3c4d5 --order asc

# Deletes and purges made through the CLI or the API since October 1
celigo storage activity --action delete purge --source cli api \
  --time-gte 2026-10-01T00:00:00Z --format table

# File server logins in the last 24 hours
celigo storage activity --action login --time-gte "$(( $(date +%s) * 1000 - 86400000 ))"
```

**Corresponds to**: [`GET /v1/storage/activity`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) — with the filters above as query parameters, one parameter per value.

***

## `celigo storage export-activity`

Write the activity entries that the filters match to a CSV. The command prints `{downloadUrl, expiresIn, rowCount, hasMore}`: a pre-signed link to download the file before it expires (`expiresIn` seconds), and how many entries the file holds. It takes the filters of [`activity`](#celigo-storage-activity) and `--order`, and has no `--limit`. Works in `read` mode. Added in celigo-cli 2026.11.2.

`hasMore: true` says that more entries matched than the export wrote. Stderr says so too:

```
Note: more entries matched than the export wrote (hasMore). Narrow --time-gte/--time-lte and export again for the rest.
```

**Signature**

```bash
celigo storage export-activity [--item <ids...>] [--integration <ids...>] [--type <types...>] [--by <ids...>] \
  [--source <sources...>] [--action <actions...>] [--time-gte <time>] [--time-lte <time>] [--order <dir>]
```

**Arguments**

None.

**Flags**

| Flag                     | Type                           | Default | Description                                                                                      |
| ------------------------ | ------------------------------ | ------- | ------------------------------------------------------------------------------------------------ |
| `--item <ids...>`        | string (repeatable)            | —       | Only the history of these files or folders. At most 50 ids.                                      |
| `--integration <ids...>` | string (repeatable)            | —       | Only entries for items in these integrations' system folder trees. At most 50 ids.               |
| `--type <types...>`      | string (repeatable)            | —       | Only entries for these item types: `file`, `folder`.                                             |
| `--by <ids...>`          | string (repeatable)            | —       | Only entries by these actors: user ids, file server account ids, or `system`. At most 50 values. |
| `--source <sources...>`  | string (repeatable)            | —       | Only entries made through these channels. Takes the values `activity` lists.                     |
| `--action <actions...>`  | string (repeatable)            | —       | Only these actions. Takes the values `activity` lists.                                           |
| `--time-gte <time>`      | ISO 8601 or epoch milliseconds | —       | Only entries at or after this time.                                                              |
| `--time-lte <time>`      | ISO 8601 or epoch milliseconds | —       | Only entries at or before this time. It must not be earlier than `--time-gte`.                   |
| `--order <dir>`          | string                         | `desc`  | Sort by time: `desc` writes the newest entry first, `asc` the oldest.                            |

The flags are checked before any request, as for `activity`.

**Example**

```bash
# One integration's activity for October
celigo storage export-activity --integration 5f83a9b2c7d3e8f1a2b3c4d5 \
  --time-gte 2026-10-01T00:00:00Z --time-lte 2026-10-31T23:59:59Z

# Fetch the CSV before the link expires
curl -sL "$(celigo storage export-activity --action delete purge --jq .downloadUrl)" -o storage-activity.csv
```

**Corresponds to**: [`POST /v1/storage/activity/signedURL`](https://developer.celigo.com/api/api-reference/data-stores/file-storage) with the filters in the body — a pure read; the endpoint is on the CLI's read-only-POST allowlist, so it works in `read` mode.

***

## Gotchas

* **Celigo Storage requires a separate account entitlement.** Without it, writes fail with `STORAGE_NOT_ENTITLED`. Reads behave differently: `storage list` returns an empty list rather than an error. An empty root is therefore not proof that the tree is empty. Check your subscription if every listing comes back empty.
* **`query` needs the Storage Query entitlement (`filesql`).** It is a license entitlement of its own, distinct from the Celigo Storage entitlement above. Submits are also rate-limited per account, so do not resubmit a query to re-read its rows — `query-status` and `query-results <jobId>` pick a finished job up from the server for as long as its record is retained.
* **`query` prints at most 1,000 rows inline.** A results page is not a size limit — tens of thousands of rows can come back as one page — so past 1,000 rows the bare command prints only the job envelope (`rowCount`, `columns`, `truncated`, …) and a stderr hint, to keep a `SELECT *` out of your terminal or an agent's context. Save the whole result set with `-o <path>` (CSV for a `.csv` path, otherwise a JSON array), print it anyway with `--all`, pick one page with `--page`, or add `LIMIT` for a sample. `-o`, `--all`, and `--page` are never guarded.
* **`copy` handles files only; `merge` handles folders only.** `move` is the one verb that accepts both. Folders cannot be copied. To duplicate a folder, create the destination and copy its files in one at a time. Use `merge` only when you are willing to lose the source folder.
* **`--to root` reaches the top level.** `move` and `copy` accept a folder ID or the literal string `root`. The CLI sends `root` as a null parent. `merge` has no equivalent — its destination must be an existing folder. Since celigo-cli 2026.10.1, `--parent root` means the top level on `list`, `upload`, and `create-folder` too.
* **`merge` runs asynchronously.** The command returns as soon as the API accepts the job. A `list` of the destination immediately afterward can look incomplete. Re-list after a few seconds before concluding the merge failed. Folder `move` and `delete` cascade in the background the same way.
* **A multi-id `move` is best-effort.** The bulk endpoint validates the destination once up front, then moves each item independently — a mixed batch returns per-id success/error results instead of failing whole. Check the per-id results before assuming everything landed; since celigo-cli 2026.10.1 the command exits `1` when any item was refused.
* **`storage get` reads files only.** A folder id is rejected as not-found despite the endpoint's item vocabulary; folder metadata comes from `list`/`search`.
* **`set` accepts only `name` and `description`.** Every other field on a storage item is server-owned; since celigo-cli 2026.10.1 the CLI refuses an attempt to change one before the request. `mimeType` is derived from the name at upload time and is not settable. To correct a wrong MIME type, `replace` the file using a name with the correct extension.
* **`delete` is reversible; `recycle-bin purge` is not.** Deleted items stay in the Recycle Bin for the retention window. `celigo recycle-bin restore <id>` brings a file or folder back, and a restored folder brings its contents with it. `celigo recycle-bin purge <id>` removes the item permanently. Both take the ID alone — the Recycle Bin resolves the resource type itself.
* **Storage names reject several characters.** `[` and `]` are invalid in file and folder names. So are the other characters that are illegal in S3 keys, SFTP paths, and Windows filenames. An invalid name fails with an error instead of being sanitized. Strip these characters from generated names before uploading.
* **Uploads larger than 5 MiB switch to multipart automatically.** At or below 5 MiB the CLI sends one presigned `PUT`. Above it, the file is split into 5 MiB parts and finalized in one completion call. Very large files use a larger part size to keep the part count within the transfer limit. Either way the bytes stream from disk, so memory use stays flat for multi-gigabyte files. Since celigo-cli 2026.10.1, an interrupted multipart upload cancels its pending item, and a file that changes size while it is read is refused rather than stored truncated — see [`upload`](#celigo-storage-upload).
* **The listing index is eventually consistent.** A newly uploaded file can take a moment to appear in `list`. `search` uses a separate index and can lag by minutes on a busy account. `download <id>` works immediately. Use the ID that `upload` returns rather than waiting for the file to appear in a listing.
* **`download` never replaces a local file without `--force`.** Since celigo-cli 2026.10.1 an existing destination is refused — before any request when you name the path, before the first byte when the name comes from the server — and so is a path whose directory does not exist; a directory you pass receives the file under its stored name. `query -o` and `query-results -o` follow the same rule and refuse a directory too. Pass `--force` to replace a file deliberately.
* **Blank option values are refused.** Since celigo-cli 2026.10.1, an empty `--parent`, `--to`, `--name`, or `--fields` (an unset shell variable) is refused before any request; an empty `--parent` used to mean the top level. Since celigo-cli 2026.11.2, so is an empty `--mime`, `--sort`, `--order`, `--modified-gte`, or `--modified-lte` on `list` and `search`, and an empty `--file` on `query`.
* **Storage listings are never field-projected.** `list` and `search` always return complete item documents. The [field projection](https://developer.celigo.com/cli/getting-started/global-flags.md) that trims other `list` commands does not apply here.
* **Write verbs require the right permission mode.** `create-folder`, `move`, `copy`, `merge`, and `delete` change the storage tree's structure and require `full` mode — since celigo-cli 2026.10.1 for `create-folder`, `move`, and `copy`, which used to run in `operate` mode. `set` needs `full` mode too: a storage item has no operational field. `upload`, `replace`, and `cancel-upload` change a file's bytes and run in `operate` mode; since celigo-cli 2026.10.1 `read` mode refuses them before any request. Every read-only verb works in `read` mode — including `get`, `query`, and `export-activity`, whose `POST`s are on the read-only-POST allowlist, and `query-status`, `query-results`, and `activity`, which are plain `GET`s. See [Profiles & regions](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).

## Related

* [recycle-bin](https://developer.celigo.com/cli/commands/recycle-bin.md) — restore or permanently purge items that `storage delete` removed.
* [exports](https://developer.celigo.com/cli/commands/exports.md) — a file export can read from a Celigo Storage folder instead of an external file provider.
* [imports](https://developer.celigo.com/cli/commands/imports.md) — a file import can write its output into a Celigo Storage folder.
* [mcp-servers](https://developer.celigo.com/cli/commands/mcp-servers.md) — serve stored files to MCP clients as resources, referenced by file ID. Folder IDs are rejected.
* [file-server](https://developer.celigo.com/cli/commands/file-server.md) — the Celigo-hosted SFTP server whose partner accounts are rooted in storage folders; `activity` records each file server login.
* [knowledge-bases](https://developer.celigo.com/cli/commands/knowledge-bases.md) — `knowledge-bases link-file` links a stored PDF to a knowledge base and queues it for indexing.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.celigo.com/cli/commands/storage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
