CLI reference

Installation

1 min read

The CLI is published to npm as designdrop. Node 20+ required.

Pick an install style

# Global (recommended for daily use)
npm install -g designdrop
pnpm add -g designdrop
yarn global add designdrop
 
# Project-local (recommended for repos that pin the version)
pnpm add -D designdrop
npm install -D designdrop
 
# One-shot via npx
npx designdrop --help

Global gives you the designdrop binary in your shell. Local pins the version in package.json so collaborators and CI run the exact same CLI as you do. npx is fine for one-off use but downloads the package every time.

Verify

designdrop --version
designdrop --help

--version prints the installed version. --help lists every subcommand: add, list, search, validate, generate, login, logout.

Tab completion

The CLI ships shell completion scripts for bash, zsh, and fish. Pipe them into your shell config:

# bash / zsh
designdrop completion bash > ~/.designdrop-completion.bash
echo 'source ~/.designdrop-completion.bash' >> ~/.bashrc
 
# fish
designdrop completion fish > ~/.config/fish/completions/designdrop.fish

Once installed, designdrop add then Tab completes to the available brand slugs; designdrop --category completes the category names.

Auth (optional)

Read-only commands (list, search, add, validate) work without an account. Anything that touches your private workspace (generate, pull, push) requires designdrop login to open a browser, complete the OAuth flow, and store the token in your OS keychain via keytar.

designdrop login   # opens browser
designdrop logout  # clears the keychain entry