Skip to content
Slingdrop

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.

terminal
npx slingdrop deck.pdf        # no install, no account: a public link for 24 hours
npm i -g slingdrop
slingdrop --version

Signing 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.

CommandWhat it does
slingdrop loginShows a code and opens your browser to approve it. Creates an API key named CLI on <computer> and saves it.
slingdrop logoutDeletes the saved key from this machine. Revoke it in Settings → Developer to switch it off everywhere.
slingdrop whoamiPrints 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#

VariableUse
SLINGDROP_API_KEYAn API key to use instead of the saved one. Handy in CI.
SLINGDROP_URLAnother Slingdrop host (default https://slingdrop.my). --url overrides it for login.
XDG_CONFIG_HOMEWhere the config folder lives.

Sending files#

terminal
slingdrop <files or folders…> [options]
cat build.log | slingdrop --name build.log

Folders 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.

OptionMeaning
-t, --title <text>Title for the drop.
-p, --passcode <code>Protect with a passcode (4–12 characters).
--feedbackAsk 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.
--vaultEnd-to-end encrypt on this machine. The key is only in the printed link.
--editLet recipients edit docs and notes.
--approvalAsk recipients to approve (implies --feedback).
--no-downloadView only.
--no-qrDon't print the QR code.
-n, --name <name>File name for piped input (default stdin.txt).
-j, --jsonPrint { id, url, expiresAt } as JSON and nothing else.
-h, --helpShow help.
-v, --versionPrint the version.
Examples
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#

CommandWhat it does
slingdrop lsYour 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.

CommandWhat 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 spacesLists your spaces with file counts and size.
slingdrop host usageStorage, bandwidth and image resizes this month, and your largest allowed file.
OptionMeaning
--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.
--immutableCache for a year. Use with content-hashed file names.
--template <name>Access template for these files, e.g. "Signed links". See Access rules.
-j, --jsonUpload: print a { path: url } manifest. Other commands: print JSON.
Deploy assets from CI
export SLINGDROP_API_KEY=sd_…
slingdrop host ./public/assets --space acme --prefix v42/ --immutable --json > assets.json

The CLI exits with status 1 if anything failed (for example one file in a host upload), so CI jobs fail loudly.