# CLI commands

Source: https://dropshelf.ai/docs/reference/cli

Every dropshelf command and subcommand, with its flags, and the exit codes scripts can rely on.

This page lists every command of the `dropshelf` CLI, its flags and its exit codes. To install it and
see the commands at work, read [the dropshelf CLI](/docs/agents/cli).

`dropshelf -h` lists the commands, and `dropshelf <command> -h` shows one command's flags.

## Flags every command takes

| Flag | Default | Description |
| --- | --- | --- |
| `-d <value>` |  | The drop, by its slug, instead of the folder's link. |
| `--instance <value>` |  | The instance's URL. |
| `--json` |  | Print JSON. |

## assets

A drop's uploaded assets.

```text
dropshelf assets [get <id> [-o PATH] | pull -o DIR | rm <id>... --yes]
```

No flags of its own.

### assets get

```text
dropshelf assets get
```

| Flag | Default | Description |
| --- | --- | --- |
| `-o <value>` |  | Where to write it; &lt;id&gt;-&lt;name&gt; in this folder when omitted, - for stdout. |

### assets pull

```text
dropshelf assets pull
```

| Flag | Default | Description |
| --- | --- | --- |
| `-o <value>` |  | The folder to write into, outside the site's folder so a push does not publish it. |

### assets rm

```text
dropshelf assets rm
```

| Flag | Default | Description |
| --- | --- | --- |
| `--yes` |  | Really delete them. |

## cat

A file of a version.

```text
dropshelf cat <path> [--version N]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--version <value>` |  | The version; the live one when omitted. |

## checkout

A kept version's files into an empty folder.

```text
dropshelf checkout <version> [dir]
```

No flags of its own.

## comments

A drop's feedback.

```text
dropshelf comments [--all] | comments add <text> [--change-request] [--on SELECTOR] | comments reply <n> <text> [--resolve] | comments resolve <n,...> [--reopen]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--all` |  | Every comment, conversation and resolved ones included, not only the open change requests. |

### comments add

```text
dropshelf comments add
```

| Flag | Default | Description |
| --- | --- | --- |
| `--change-request` |  | Ask for a fix: a change request stays open until someone resolves it. |
| `--on <value>` |  | Pin the comment to an element of the live page, named by a CSS selector such as '#title'. |
| `--page <value>` |  | With --on, the page the element is on; / when omitted. |
| `--tag <value>` |  | With --on, the element's tag name, for one the page's script draws, which the CLI cannot see. |
| `--text <value>` |  | With --on, how the element's text starts as a visitor sees it: the pin then shows only on an element whose text starts so, and follows it if the selector breaks. |

### comments reply

```text
dropshelf comments reply
```

| Flag | Default | Description |
| --- | --- | --- |
| `--resolve` |  | Also resolve it, when it is a change request. |

### comments resolve

```text
dropshelf comments resolve
```

| Flag | Default | Description |
| --- | --- | --- |
| `--reopen` |  | Reopen them instead. |

## completion

A shell completion script.

```text
dropshelf completion bash|zsh|fish|powershell
```

No flags of its own.

## connections

Your connections to MCP servers.

```text
dropshelf connections [connect|disconnect] ...
```

No flags of its own.

### connections connect

```text
dropshelf connections connect
```

| Flag | Default | Description |
| --- | --- | --- |
| `--token` |  | Connect with a token read from stdin, for a server that takes one. |

### connections disconnect

```text
dropshelf connections disconnect
```

No flags of its own.

## db

A drop's documents.

```text
dropshelf db [find|get|put|export|import|rm|wipe|share] ...
```

No flags of its own.

### db find

```text
dropshelf db find <coll> [--where 'f==v']... [--order-by F] [--desc] [--limit N | --all]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--all` |  | Every matching document, page after page. |
| `--desc` |  | Newest or largest first. |
| `--limit <value>` | `50` | How many documents; past 200, read page after page. |
| `--order-by <value>` |  | A top-level field, rev, createdAt or updatedAt. |
| `--where <value>` |  | Field==value, or != &gt; &gt;= &lt; &lt;= (repeatable, at most 8). |

### db get

```text
dropshelf db get <coll> <id>
```

No flags of its own.

### db put

```text
dropshelf db put <coll> <id> [--rev N]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--rev <value>` |  | Write only if the document's rev is still this. |

### db export

```text
dropshelf db export <coll>
```

| Flag | Default | Description |
| --- | --- | --- |
| `--all` |  | Every collection, one file each. |
| `-o <value>` |  | With --all, the folder to write into. |

### db import

```text
dropshelf db import <coll> FILE [--force] [--yes]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--force` |  | Overwrite documents that changed since they were read. |
| `--yes` |  | Apply without asking. |

### db rm

```text
dropshelf db rm <coll> <id>... | --from FILE [--force] --yes
```

| Flag | Default | Description |
| --- | --- | --- |
| `--force` |  | Delete documents whose rev changed. |
| `--from <value>` |  | A JSON Lines file whose lines name the documents (id and rev) to delete. |
| `--yes` |  | Really delete them. |

### db wipe

```text
dropshelf db wipe <coll> --yes
```

| Flag | Default | Description |
| --- | --- | --- |
| `--yes` |  | Really delete every document. |

### db share

```text
dropshelf db share <coll> [--off]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--off` |  | Stop sharing it: only a document's creator and the drop's editors may change it. |

## diff

This folder against its base.

```text
dropshelf diff [path]
```

No flags of its own.

## fetch

Request a path on the drop's own address, signed in as you.

```text
dropshelf fetch [path] [-X METHOD] [--data TEXT | --file PATH] [--version N] [-i]
```

| Flag | Default | Description |
| --- | --- | --- |
| `-H <value>` |  | A request header, as Name: value; may be repeated. |
| `-X <value>` |  | The method; GET when omitted, POST with --data or --file. |
| `--data <value>` |  | The request body, sent as application/json; - reads it from stdin. |
| `--file <value>` |  | A file to send as the body, as an upload to /_dropshelf/assets takes it. |
| `-i` |  | Print the answer's status line and headers before its body. |
| `-o <value>` |  | Write the answer's body to this file instead of the terminal. |
| `--type <value>` |  | The body's content type, when it is not JSON or not what the file's name says. |
| `--version <value>` |  | Request a version's preview address instead of the live drop. |

## get

One drop.

```text
dropshelf get [slug]
```

No flags of its own.

## guide

A type's guide, or the platform guide for pages that use identity, data or uploads.

```text
dropshelf guide [type | platform]
```

No flags of its own.

## link

Link this folder to a drop.

```text
dropshelf link <slug>
```

| Flag | Default | Description |
| --- | --- | --- |
| `--force` |  | Replace this folder's link, and with it its base. |

## list

Your drops.

```text
dropshelf list [--all] for every drop you may see
```

| Flag | Default | Description |
| --- | --- | --- |
| `--all` |  | Every drop you may see, not only yours. |

## login

Sign in to an instance.

```text
dropshelf login [instance] [--token]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--skills <value>` | `ask` | The dropshelf-cli skill for agents that lack it: ask, yes or no. One of `ask`, `yes`, `no`. |
| `--token` |  | Read a personal access token from stdin instead of signing in in a browser. |

## logout

Sign out of the instance.

```text
dropshelf logout
```

No flags of its own.

## ls

A version's files.

```text
dropshelf ls [--version N]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--version <value>` |  | The version; the live one when omitted. |

## open

Open the drop, or a version's preview, in the browser.

```text
dropshelf open [--version N]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--version <value>` |  | A version's preview instead of the drop's address. |

## publish

Make a version live.

```text
dropshelf publish [version] [--force] [--resolve N,... | N=TEXT]...; no version is this folder's last push
```

| Flag | Default | Description |
| --- | --- | --- |
| `--force` |  | Publish even though something was published since, replacing it. |
| `--resolve <value>` |  | The change requests this version fixes, as 4 or 4,5,6, answered with the version's note, or 4=TEXT to give one its own answer; may be repeated. |

## pull

Bring what was published into the folder.

```text
dropshelf pull [dir] [--theirs PATH]... [--mine PATH]...
```

| Flag | Default | Description |
| --- | --- | --- |
| `--mine <value>` |  | Keep the folder's file at this path (repeatable). |
| `--theirs <value>` |  | Take the live file at this path (repeatable). |

## push

Save the folder as a version.

```text
dropshelf push [dir] [--note TEXT] [--publish | --draft] [--resolve N,... | N=TEXT]... [--dry-run]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--draft` |  | On a first push, make a draft instead of going live. |
| `--dry-run` |  | List what would be sent and what is left out, and send nothing. |
| `--name <value>` |  | A new drop's name. |
| `--note <value>` |  | One line on what this version changes. |
| `--publish` |  | Go live when made, if nothing was published since the folder's base. |
| `--resolve <value>` |  | The change requests this version fixes, as 4 or 4,5,6, answered with the version's note, or 4=TEXT to give one its own answer; may be repeated. |
| `--retention <value>` |  | A new drop's retention: 1d to 365d, or forever. |
| `--slug <value>` |  | A new drop's address. |
| `--type <value>` |  | A new drop's type, such as site. |
| `--visibility <value>` |  | A new drop's visibility: public, restricted or private. One of `public`, `restricted`, `private`. |

## rename

Change the drop's address.

```text
dropshelf rename <new-slug>
```

No flags of its own.

## rm

Delete a drop.

```text
dropshelf rm <slug> --yes
```

| Flag | Default | Description |
| --- | --- | --- |
| `--yes` |  | Really delete it. |

## set

Change the drop.

```text
dropshelf set [--name N] [--description D] [--retention R]; who can open it is share
```

| Flag | Default | Description |
| --- | --- | --- |
| `--description <value>` |  | The drop's description. |
| `--name <value>` |  | The drop's name. |
| `--retention <value>` |  | 1d to 365d, or forever. |
| `--visibility <value>` |  | Moved: dropshelf share --visibility sets who can open the drop. One of `public`, `restricted`, `private`. |

## share

Who can open the drop.

```text
dropshelf share [addresses...] [--can view|edit] [--remove addresses] [--visibility V]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--can <value>` |  | View or edit, for the addresses given: edit on a public drop, view otherwise. One of `view`, `edit`. |
| `--remove <value>` |  | Stop sharing with these addresses (repeatable, or comma-separated). |
| `--visibility <value>` |  | Who can open it: private, restricted or public. One of `public`, `restricted`, `private`. |

## skills

The dropshelf-cli skill for your agents.

```text
dropshelf skills [status | install | upgrade | show [reference] | remove] [--agent ids] [--yes]
```

No flags of its own.

### skills status

```text
dropshelf skills status
```

No flags of its own.

### skills install

```text
dropshelf skills install
```

| Flag | Default | Description |
| --- | --- | --- |
| `--agent <value>` |  | Only these agents, comma-separated: claude-code, codex, cursor, opencode. One of `claude-code`, `codex`, `cursor`, `opencode`. |
| `--force` |  | Also replace a copy that was edited, that a newer CLI wrote, or that is not this CLI's. |
| `--yes` |  | Do it without asking. |

### skills upgrade

```text
dropshelf skills upgrade
```

No flags of its own.

### skills show

```text
dropshelf skills show
```

No flags of its own.

### skills remove

```text
dropshelf skills remove
```

| Flag | Default | Description |
| --- | --- | --- |
| `--agent <value>` |  | Only these agents, comma-separated: claude-code, codex, cursor, opencode. One of `claude-code`, `codex`, `cursor`, `opencode`. |
| `--yes` |  | Do it without asking. |

## sources

The company data a drop may read.

```text
dropshelf sources [show|run] ...
```

No flags of its own.

### sources show

```text
dropshelf sources show
```

No flags of its own.

### sources run

```text
dropshelf sources run
```

| Flag | Default | Description |
| --- | --- | --- |
| `--args <value>` |  | For an MCP server: the tool's arguments as a JSON object. |
| `--param <value>` |  | For --sql: a :name placeholder's value, as name=value; repeat for each. |
| `--sql <value>` |  | For a database: one SELECT in the source's dialect. |

## status

What this folder changed, and what was published since.

```text
dropshelf status
```

No flags of its own.

## types

The instance's drop types.

```text
dropshelf types
```

No flags of its own.

## unlink

Remove this folder's link.

```text
dropshelf unlink
```

No flags of its own.

## upgrade

Install the newest release of the instance's line.

```text
dropshelf upgrade [--to vX.Y.Z | --latest] [--check] [--yes]
```

| Flag | Default | Description |
| --- | --- | --- |
| `--check` |  | Only say whether another version would be installed; exits 1 when one would. |
| `--latest` |  | The newest release instead of the newest in the instance's line. |
| `--to <value>` |  | A released version to install instead of the instance's. |
| `--yes` |  | Install an older version without asking. |

## version

The CLI's version and the instance's.

```text
dropshelf version (--version prints the CLI's alone)
```

No flags of its own.

## versions

The drop's versions, newest first.

```text
dropshelf versions
```

No flags of its own.

## whoami

The member and instance you are signed in as.

```text
dropshelf whoami
```

No flags of its own.

## Exit codes

With `--json`, a failing command prints one document on stdout, `{"error": {"code": ..., "exit": ..., "message": ...}}`, whose `code` is the name below.

| Exit | Name | Meaning |
| --- | --- | --- |
| 0 |  | Done. |
| 1 | `failure` | Anything else that went wrong. |
| 2 | `usage` | The command line is wrong, such as a missing argument or a delete without --yes. |
| 3 | `sign_in` | Not signed in, or the instance refused the sign-in. |
| 4 | `conflict` | Someone published first: pull, then push again. |
| 5 | `limit` | A size or storage limit stopped it. |
| 6 | `feature_off` | The instance has that feature turned off. |
