CLI

handoff pull

Download a Handoff environment into a local .env file.

Usage

handoff pull [--env <name>] [--out <path>] [--force]

What it does

Fetches the current version of the selected environment, decrypts the values, and writes them to disk. By default pull writes to .env.<env> (for example, .env.dev) so it never clobbers your primary .env file.

If the destination file already exists, pull stops and asks you to pass --force to overwrite.

Flags

FlagDefaultDescription
-e, --env <name>default env from .handoff/config.jsonEnvironment to pull from
-o, --out <path>.env.<env>Destination file
--forcefalseOverwrite the destination if it already exists

Examples

Pull the default environment:

handoff pull

Pull production into a specific file:

handoff pull --env production --out .env.production

Overwrite in a script:

handoff pull --env production --out .env --force