CLI Usage
The Soup CLI is the primary way to interact with your secrets.
Installation
Section titled “Installation”# macOSbrew install soup-secrets/tap/soup
# Linux/WSLcurl -fsSL https://soup.dev/install.sh | sh
# Or download directlycurl -L https://github.com/soup-secrets/soup-engine/releases/latest/download/soup-linux-amd64 -o soupchmod +x soupsudo mv soup /usr/local/bin/Authentication
Section titled “Authentication”Login to Cloud
Section titled “Login to Cloud”soup login# Opens browser for authenticationLogin to Self-Hosted
Section titled “Login to Self-Hosted”soup login http://your-server:8080# Enter your password when promptedCheck Login Status
Section titled “Check Login Status”soup whoami# Output: Logged in as user@example.comLogout
Section titled “Logout”soup logoutProject Commands
Section titled “Project Commands”Create Project
Section titled “Create Project”soup project create my-appsoup project create my-app --description "Main application"List Projects
Section titled “List Projects”soup project listDelete Project
Section titled “Delete Project”soup project delete my-app# Requires confirmationEnvironment Commands
Section titled “Environment Commands”Create Environment
Section titled “Create Environment”# Root environment (no parent)soup env create my-app base
# Child environmentsoup env create my-app production --parent baseList Environments
Section titled “List Environments”soup env list my-appDelete Environment
Section titled “Delete Environment”soup env delete my-app preview-123# Cannot delete if has child environmentsSecret Commands
Section titled “Secret Commands”Set a Secret
Section titled “Set a Secret”soup set <project> <env> <key> <value>
# Examplessoup set my-app base DATABASE_URL "postgres://localhost/mydb"soup set my-app production API_KEY "sk_live_..."
# From stdin (useful for multiline or sensitive values)echo "my-secret-value" | soup set my-app base API_KEY -
# From filesoup set my-app base PRIVATE_KEY --file ./private.pemGet a Secret
Section titled “Get a Secret”soup get <project> <env> <key>
# Examplessoup get my-app production DATABASE_URL
# Raw (without resolving references)soup get my-app base DATABASE_URL --raw
# Verbose (show inheritance info)soup get my-app production DATABASE_URL --verboseList Secrets
Section titled “List Secrets”soup list <project> <env>
# Show values (hidden by default)soup list my-app production --show-values
# Show where each value comes fromsoup list my-app production --show-source
# Only show secrets set in this environmentsoup list my-app production --localDelete a Secret
Section titled “Delete a Secret”soup delete <project> <env> <key>
soup delete my-app production OLD_CONFIGExport Commands
Section titled “Export Commands”Export to Shell
Section titled “Export to Shell”# Export as shell commandssoup export my-app production# Output:# export DATABASE_URL="postgres://..."# export API_KEY="sk_live_..."
# Use directlyeval $(soup export my-app production)Export Formats
Section titled “Export Formats”# Shell (default)soup export my-app production --format shell
# Dotenvsoup export my-app production --format dotenv > .env
# JSONsoup export my-app production --format json
# YAMLsoup export my-app production --format yamlFilter Exports
Section titled “Filter Exports”# Only secrets starting with DB_soup export my-app production --prefix DB_
# Only specific keyssoup export my-app production --keys DATABASE_URL,API_KEYRun Commands
Section titled “Run Commands”Execute a command with secrets injected:
soup run <project> <env> -- <command>
# Examplessoup run my-app production -- npm startsoup run my-app development -- python manage.py runserversoup run my-app staging -- ./my-binary --config /etc/app.confConfiguration
Section titled “Configuration”Config File
Section titled “Config File”Soup stores config in ~/.soup/config.json:
{ "server": "https://api.soup.dev", "token": "..."}Environment Variables
Section titled “Environment Variables”Override config with environment variables:
SOUP_SERVER=http://localhost:8080 soup list my-app baseSOUP_TOKEN=your-token soup get my-app base KEYProject-Level Config
Section titled “Project-Level Config”Create .soup.json in your project root:
{ "project": "my-app", "default_env": "development"}Now commands use these defaults:
# Instead of: soup get my-app development DATABASE_URLsoup get DATABASE_URLOutput Options
Section titled “Output Options”Quiet Mode
Section titled “Quiet Mode”soup set my-app base KEY value --quiet# No output on successJSON Output
Section titled “JSON Output”soup list my-app production --json# Output as JSON for scriptingCommon Workflows
Section titled “Common Workflows”Local Development
Section titled “Local Development”# Pull secrets for local deveval $(soup export my-app development)npm run devDeployment Script
Section titled “Deployment Script”#!/bin/bash# Pull production secretseval $(soup export my-app production)
# Deploydocker build -t my-app .docker run -e DATABASE_URL -e API_KEY my-appCI/CD Pipeline
Section titled “CI/CD Pipeline”- name: Install Soup run: curl -fsSL https://soup.dev/install.sh | sh
- name: Deploy env: SOUP_TOKEN: ${{ secrets.SOUP_TOKEN }} run: | eval $(soup export my-app production) ./deploy.sh