Skip to main content

envshed run

Run a command with secrets injected as environment variables.

Usage

envshed run [-o <org>] [-p <project>] [-e <env>] -- <command...>

Options

FlagDescriptionDefault
-o, --org <slug>Organization slugFrom config
-p, --project <slug>Project slugFrom config
-e, --env <slug>Environment slugFrom config

Arguments

ArgumentDescription
command...The command to run (everything after --)

How it works

  1. Fetches secrets from the API
  2. Merges them into the current environment variables (secrets override existing vars)
  3. Spawns the command as a child process
  4. Exits with the same exit code as the child process

No .env file is written to disk — secrets exist only in the process environment.

Examples

# Run a Node.js app with secrets
envshed run -- npm start

# Run a one-off script
envshed run -- node scripts/migrate.js

# Run with a specific environment
envshed run -e production -- npm run seed

# Run any command
envshed run -- docker compose up