Reference
CLI reference
Every command and flag of the slingdrop CLI.
Install#
Needs Node 20 or later. Run it once with npx, or install it globally.
npx slingdrop deck.pdf # no install, no account: a public link for 24 hours
npm i -g slingdrop
slingdrop --versionSigning in#
Without an account you can send public or passcode drops that last up to 24 hours (one per day from the CLI on a network). Sign in to keep files, send private and Vault drops, and use every other command.
| Command | What it does |
|---|---|
slingdrop login | Shows a code and opens your browser to approve it. Creates an API key named CLI on <computer> and saves it. |
slingdrop logout | Deletes the saved key from this machine. Revoke it in Settings → Developer to switch it off everywhere. |
slingdrop whoami | Prints the signed-in email and plan. |
The key is saved in ~/.config/slingdrop/config.json (or $XDG_CONFIG_HOME/slingdrop), readable only by you.
Environment variables#
| Variable | Use |
|---|---|
SLINGDROP_API_KEY | An API key to use instead of the saved one. Handy in CI. |
SLINGDROP_URL | Another Slingdrop host (default https://slingdrop.my). --url overrides it for login. |
XDG_CONFIG_HOME | Where the config folder lives. |
Sending files#
slingdrop <files or folders…> [options]
cat build.log | slingdrop --name build.logFolders are sent with their structure (skipping .git, node_modules and .DS_Store). With no files and piped input, it sends stdin as one file. When it's done the link is printed, copied to your clipboard and shown as a QR code.
| Option | Meaning |
|---|---|
-t, --title <text> | Title for the drop. |
-p, --passcode <code> | Protect with a passcode (4–12 characters). |
--feedback | Ask for comments and approval. Without it, the drop just shares files. |
-e, --expires <when> | 1h, 24h, 7d, 30d, 90d, forever or burn. Default: kept until you delete it when signed in, 7 days with --feedback, 24 hours signed out. |
--private <emails> | Only these people can open it (comma-separated). Needs sign-in. |
--vault | End-to-end encrypt on this machine. The key is only in the printed link. |
--edit | Let recipients edit docs and notes. |
--approval | Ask recipients to approve (implies --feedback). |
--no-download | View only. |
--no-qr | Don't print the QR code. |
-n, --name <name> | File name for piped input (default stdin.txt). |
-j, --json | Print { id, url, expiresAt } as JSON and nothing else. |
-h, --help | Show help. |
-v, --version | Print the version. |
slingdrop ./dist --expires 30d
slingdrop screenshot.png --passcode 4821
slingdrop contract.pdf --vault
slingdrop review.mp4 --private ana@studio.com,sam@client.com --approval
URL=$(slingdrop report.pdf --json | jq -r .url)Drops sent from the CLI are marked with source cli, so you can filter them in the library or file them with a filing rule.
Managing drops#
| Command | What it does |
|---|---|
slingdrop ls | Your active drops: id, title, link and views. --json for the full list. |
slingdrop open <id|url> | Opens a drop in your browser. |
slingdrop revoke <id> | Turns off a drop's link. |
slingdrop rm <id> [--forever] | Moves a drop to Trash (restorable for 30 days), or deletes it now with --forever. |
slingdrop request <title> | Creates a file request link and copies it. |
File hosting#
Stable CDN links for your app's assets. Needs sign-in. See File hosting for how spaces, caching and resizing work.
| Command | What it does |
|---|---|
slingdrop host <files or folders…> | Uploads (4 at a time) and prints each public URL. A single file's URL is copied. |
slingdrop host ls [--prefix p] | Lists hosted files and their URLs. |
slingdrop host rm <path…> | Deletes hosted files. |
slingdrop host spaces | Lists your spaces with file counts and size. |
slingdrop host usage | Storage, bandwidth and image resizes this month, and your largest allowed file. |
| Option | Meaning |
|---|---|
--space <name> | The space to use. Created if the name is free; defaults to your own space. Works with every host command. |
--prefix <path> | Upload under this path (v2/), or list only this path. |
--immutable | Cache for a year. Use with content-hashed file names. |
--template <name> | Access template for these files, e.g. "Signed links". See Access rules. |
-j, --json | Upload: print a { path: url } manifest. Other commands: print JSON. |
export SLINGDROP_API_KEY=sd_…
slingdrop host ./public/assets --space acme --prefix v42/ --immutable --json > assets.jsonThe CLI exits with status 1 if anything failed (for example one file in a host upload), so CI jobs fail loudly.