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

# orca storage

> Inspect the tenant storage bucket and list, browse, download, upload, and delete objects.

> **Last updated: 2026-09-06**

`orca storage` works with the tenant's [storage bucket](/concepts/storage), the same objects the dashboard shows on its Files page. Keys are slash-separated paths. A key that ends with `/` denotes a prefix, never an object: `put` refuses one, and `rm` deletes everything under it. An omitted `[prefix]` means the bucket root.

Every subcommand accepts the [global flags](/cli/reference/overview#global-flags). `rm` prompts for confirmation in a terminal; in a script `--yes` is required or the command refuses (exit code 2).

## orca storage info

```bash theme={"dark"}
orca storage info
```

Shows bucket usage: the bucket name, bytes used, object count, capacity with the percentage used when a capacity is set, and a per-prefix breakdown when the server provides one. If storage is not configured for the tenant the terminal and plain views print a hint on stderr and exit 0; `--json` prints the info record with `configured: false`.

```bash theme={"dark"}
orca storage info --json | jq '.usedBytes'
```

Plain (piped) output is four tab-separated rows: `bucket`, `usedBytes`, `objectCount`, `capacityBytes`.

## orca storage ls

```bash theme={"dark"}
orca storage ls [prefix] [--limit <n>]
```

Lists objects under a prefix in one request. The terminal view projects the flat listing one level deep: immediate children appear as `dir` or `file` rows, and each directory row aggregates the size, newest modification time, and object count of everything beneath it. Plain and `--json` output keep the flat object list.

| Flag          | Type    | Default                | Description                  |
| ------------- | ------- | ---------------------- | ---------------------------- |
| `--limit <n>` | integer | server default (`100`) | Objects to return, 1 to 1000 |

There is no offset; narrow the prefix to see more.

```bash theme={"dark"}
orca storage ls reports/ --limit 500 --json | jq -r '.entries[].key'
```

Plain (piped) output is one tab-separated row per object: `key`, `size`, `lastModified`. The `--json` output is the listing record: `prefix`, `bucket`, `entries` (each with `key`, `size`, `lastModified`, `etag`), and `count`.

## orca storage browse

```bash theme={"dark"}
orca storage browse [prefix] [--limit <n>]
```

Opens an interactive file browser in the terminal. Where `ls` prints one directory level and returns, `browse` stays open and navigates the bucket like a filesystem: type to filter the current directory, arrow keys move, Enter opens a directory or shows a file's details, left or backspace goes to the parent, and esc (or `q` with an empty filter) exits. Each directory is fetched on entry, `--limit` objects at a time; when a directory holds more than that the footer marks the view as partial.

`browse` requires an interactive terminal (stdin and stdout both TTYs). In a pipe it exits with code 2 and points you at `orca storage ls`. It produces no stdout output and ignores `--json`.

| Flag          | Type    | Default | Description                              |
| ------------- | ------- | ------- | ---------------------------------------- |
| `--limit <n>` | integer | `1000`  | Objects fetched per directory, 1 to 1000 |

```bash theme={"dark"}
orca storage browse reports/
```

## orca storage get

```bash theme={"dark"}
orca storage get <key> [-o <file>]
```

Downloads one object. With `--output` the exact bytes are written to the file, stdout stays empty, and a `Saved` line goes to stderr. Without it the bytes go to stdout when stdout is a pipe or redirect. In a terminal, text objects are printed as is, but a binary object (base64 on the wire, containing a NUL byte, or carrying a non-text Content-Type) is refused with exit code 2 rather than dumped on screen.

| Flag                  | Type   | Default | Description                                        |
| --------------------- | ------ | ------- | -------------------------------------------------- |
| `-o, --output <file>` | string | none    | Write the object bytes to a file instead of stdout |

`--output` takes precedence over `--json`. With `--json` and no `--output`, the object record is printed: `key`, `contentType`, `size`, `etag`, `encoding` (`text` or `base64`), and `content` in that encoding.

```bash theme={"dark"}
orca storage get reports/summary.md -o summary.md
orca storage get images/logo.png > logo.png
```

## orca storage put

```bash theme={"dark"}
orca storage put <key> <file> [--content-type <type>]
```

Uploads a local file to `<key>`, overwriting any existing object. A key ending in `/` or an unreadable file exits with code 2.

| Flag                    | Type   | Default                         | Description           |
| ----------------------- | ------ | ------------------------------- | --------------------- |
| `--content-type <type>` | string | guessed from the file extension | Content-Type to store |

The guess covers common text, image, and archive extensions and falls back to `application/octet-stream`. The server stores whatever Content-Type is sent.

```bash theme={"dark"}
orca storage put reports/summary.md ./summary.md --json
```

The `--json` output is the stored object's record: `key`, `contentType`, `size`, `etag`.

## orca storage rm

```bash theme={"dark"}
orca storage rm <key> [--yes]
```

Deletes one object, or every object under a prefix when `<key>` ends with `/`. A prefix delete removes up to 1000 objects per call, the same window `ls` reads; run it again for larger prefixes.

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

```bash theme={"dark"}
orca storage rm reports/ --yes --json
```

```json theme={"dark"}
{ "key": "reports/", "deleted": 3 }
```

`deleted` is the number of objects removed.

<Note>
  Verified against orca-cli `cli-v0.5.0`.
</Note>
