Projects & Environments
Soup organizes secrets into projects and environments.
Projects
Section titled “Projects”A project represents an application or service that needs configuration. Examples:
my-api- Your backend APIweb-frontend- Your React/Vue/Svelte appworker- Background job processorshared- Secrets used across multiple services
Creating Projects
Section titled “Creating Projects”# Create a projectsoup project create my-api
# With a descriptionsoup project create my-api --description "Main REST API"
# List all projectssoup project listProject Organization
Section titled “Project Organization”Keep projects focused. If secrets are only used by one service, put them in that service’s project. For shared secrets, create a dedicated shared project.
Environments
Section titled “Environments”Environments within a project represent different deployment contexts. Common patterns:
Simple (dev/prod)
Section titled “Simple (dev/prod)”base├── development└── productionStandard (with staging)
Section titled “Standard (with staging)”base├── development├── staging└── productionComplex (with preview/PR environments)
Section titled “Complex (with preview/PR environments)”base├── development├── staging│ └── preview-*└── productionCreating Environments
Section titled “Creating Environments”# Create base environment (no parent)soup env create my-api base
# Create children that inherit from basesoup env create my-api development --parent basesoup env create my-api staging --parent basesoup env create my-api production --parent base
# List environmentssoup env list my-apiEnvironment Naming
Section titled “Environment Naming”Use consistent, lowercase names:
- ✅
base,development,staging,production - ❌
Base,DEV,Staging,PROD
Working with Secrets
Section titled “Working with Secrets”Setting Secrets
Section titled “Setting Secrets”# Set in base (available to all children)soup set my-api base DATABASE_NAME myapi
# Set in specific environmentsoup set my-api production DATABASE_HOST prod-db.internalGetting Secrets
Section titled “Getting Secrets”# Get a single secretsoup get my-api production DATABASE_HOST
# Get with inheritance shownsoup get my-api production DATABASE_NAME# Output shows it's inherited from baseListing Secrets
Section titled “Listing Secrets”# List all secrets in an environment (with inheritance)soup list my-api production
# List only secrets set directly in this environmentsoup list my-api production --localDeleting Secrets
Section titled “Deleting Secrets”# Delete a secretsoup delete my-api production DATABASE_HOST
# Delete from base (affects all children)soup delete my-api base OLD_CONFIGBest Practices
Section titled “Best Practices”1. Use Base for Shared Config
Section titled “1. Use Base for Shared Config”Put config that’s the same across environments in base:
soup set my-api base APP_NAME "My API"soup set my-api base LOG_FORMAT jsonsoup set my-api base MAX_CONNECTIONS 1002. Override Only What’s Different
Section titled “2. Override Only What’s Different”Production might need different values:
soup set my-api production LOG_LEVEL warn # base has 'info'soup set my-api production MAX_CONNECTIONS 5003. Use References for Derived Values
Section titled “3. Use References for Derived Values”Don’t duplicate:
# Instead of setting DATABASE_URL in every environmentsoup set my-api base DB_HOST localhostsoup set my-api base DB_NAME myapisoup set my-api base DATABASE_URL 'postgres://${DB_HOST}:5432/${DB_NAME}'
# Then just override the componentsoup set my-api production DB_HOST prod-db.internal4. Document with Descriptions
Section titled “4. Document with Descriptions”(Coming soon) Add descriptions to help team members understand secrets:
soup set my-api base API_KEY "..." --description "Stripe API key for payments"