CLI Reference

CLI Commands

Install the CLI for secret management and build-time injection. Use the SDK for runtime loading with init().

Installation

npm install keydrop
npm install -g keydrop-cli

Works with npm, yarn, and pnpm.

login

Authenticate with KeyDrop using your browser. This stores a session token locally.

Usage

keydrop login

Examples

$keydrop login

push

Encrypt and upload your .env file. Creates a new project or updates an existing one.

Usage

keydrop push [options]

Examples

$keydrop push
$keydrop push --env .env.production
$keydrop push --name my-app

Options

--env <path>Path to .env file (default: .env)
--name <name>Project name for easier identification
--forceOverwrite existing project without confirmation

run

Execute a command with secrets injected as environment variables. No code changes required.

Usage

keydrop run -- <command>

Examples

$keydrop run -- npm start
$keydrop run -- next dev
$keydrop run -- yarn build

Options

--key <key>Project key (uses cached key by default)
--env <path>Local .env to merge with remote secrets

pull

Download and decrypt secrets to a local .env file.

Usage

keydrop pull [options]

Examples

$keydrop pull
$keydrop pull --output .env.local

Options

--key <key>Project key to pull from
--output <path>Output file path (default: .env)
--overwriteOverwrite existing file without confirmation

logout

Sign out and clear your local session.

Usage

keydrop logout

Examples

$keydrop logout
← Deploy AnywhereSDK Reference →