Skip to content

CLI Installation ​

The snapenv binary is a single static executable. No runtime required.

Supported platforms ​

PlatformArchitecture
macOSamd64, arm64 (Apple Silicon)
Linuxamd64, arm64

Install ​

bash
curl -fsSL https://get.snapenv.io/install.sh | sh

The install script detects your platform and architecture, downloads the correct binary to ~/.local/bin/snapenv, and makes it executable.

Manual download ​

bash
# Linux amd64
curl -fsSL https://get.snapenv.io/cli/latest/snapenv-linux-amd64 \
  -o /usr/local/bin/snapenv && chmod +x /usr/local/bin/snapenv

# Linux arm64
curl -fsSL https://get.snapenv.io/cli/latest/snapenv-linux-arm64 \
  -o /usr/local/bin/snapenv && chmod +x /usr/local/bin/snapenv

Configuration ​

Config is stored at ~/.config/snapenv/config.json (chmod 600) and written by snapenv login.

json
{
  "apiUrl": "https://api.snapenv.io",
  "token": "snp_live_...",
  "project": "4fac4b02-...",
  "env": "staging"
}

Environment variable overrides ​

Environment variables always override the config file. Flags override environment variables.

VariableDescription
SNAPENV_TOKENAccess token
SNAPENV_PROJECTProject UUID
SNAPENV_ENVEnvironment name
SNAPENV_OUTPUTOutput file path (pull)
SNAPENV_API_URLAPI base URL

Self-update ​

bash
snapenv upgrade           # install latest version
snapenv upgrade --check   # check without installing

Commands ​

CommandDescription
snapenv loginSave credentials to config
snapenv pullPull variables to a file or stdout
snapenv runRun a command with variables injected — no .env file, scrubbed output
snapenv pushPush a local .env file to SnapEnv
snapenv diffCompare local file to remote
snapenv projectsList all projects in the workspace
snapenv upgradeSelf-update the binary
snapenv versionPrint version

login ​

bash
snapenv login --token snp_live_...
snapenv login --token snp_live_... --api-url https://api.yourcompany.com

Writes credentials to ~/.config/snapenv/config.json.

Built with SnapEnv