Skip to content

CLI

The dropkit CLI scaffolds uploads into any JS/TS framework, or uploads files one-off from a terminal. It also has a zero-signup demo.

Package: @dropkit/cli.

Zero-signup demo

Terminal window
npx @dropkit/cli@latest upload ./photo.png

No account, no key, nothing to configure. The file goes to the public demo project. Files expire in 1 hour, 10 MB cap per file. Great for a quick share or a 10-second sanity check before committing.

Scaffold into a project

Terminal window
npx @dropkit/cli@latest init

Detects the framework (Next, SvelteKit, Astro, Remix, Nuxt), writes DROPKIT_KEY to .env.local, installs @dropkit/sdk, and scaffolds an upload route.

Flags:

flageffect
--yesNon-interactive, default everything
--framework <name>Override detection
--name <project>Label for the saved config
--key <key>Use an existing key instead of prompting
--forceOverwrite an existing scaffold file
--dry-runPrint the plan without writing anything
--jsonMachine-readable output

Commands

Terminal window
dropkit init # set up a project in the current directory
dropkit upload <path> # upload a local file or folder
dropkit upload <url> # ingest a remote https URL (real key only)
dropkit login # save a project key for future use
dropkit logout
dropkit whoami # current auth state

dropkit upload https://example.com/photo.jpg mirrors a remote URL into your project without round-tripping the bytes locally. Useful for grabbing image-gen output, screenshot URLs, or any short-lived link. Requires a real key (saved or via DROPKIT_KEY / --key); the demo fallback only applies to local file paths.

Everything else (file browsing, key management, custom domains, webhooks, billing) lives in the dashboard.

Install globally

Terminal window
npm i -g @dropkit/cli
dropkit init

Once installed, the dropkit binary is on your PATH. The binary name is always dropkit, regardless of the scoped package name.

Env

vareffect
DROPKIT_KEYKey to use. Overrides saved config.
DROPKIT_ENDPOINTAPI endpoint. Defaults to https://api.dropkit.app.

Exit codes

codemeaning
0success
10auth required, run dropkit login
20network error
30validation error
40user aborted
50conflict, re-run with --force

JSON output

Every command accepts --json. Machine output lands on stdout, diagnostics go to stderr. Example:

Terminal window
dropkit upload ./photo.png --json | jq -r '.uploads[0].url'

In scripts

#!/bin/sh
URL=$(DROPKIT_KEY=$PROD_KEY dropkit upload --json ./dist/build.zip | jq -r '.uploads[0].url')
echo "Build: $URL" | slack-notify