Yeet pulls secrets from Azure Key Vault and generates .env and docker.env files for local development and Docker environments.
- π Pulls secrets from Azure Key Vault using Azure CLI authentication
- π Generates both
.envanddocker.envfiles - π Run commands directly with secrets as environment variables (no files needed!)
- π Supports simple and complex mappings with docker-specific overrides
- β‘ Concurrent secret fetching for speed
- π Validates configuration and checks secret existence
- π Compare configuration with Kubernetes deployment files
β οΈ Warns about unmapped environment variables- π― Perfect for Makefiles and CI/CD pipelines
-
Azure CLI (required) - Used for authentication and Key Vault access
- Install: Azure CLI Installation Guide
- Version: 2.0.0 or higher recommended
- Must be authenticated (
az login) with access to your Key Vault
Quick Install:
# Ubuntu/Debian curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # macOS brew update && brew install azure-cli # Windows (PowerShell as Administrator) winget install -e --id Microsoft.AzureCLI
- Go 1.24+ (only for building from source)
- Install: Go Installation Guide
- Note: Uses Go 1.24 for the latest features and performance improvements
- Azure subscription with an existing Key Vault
- Appropriate RBAC permissions:
Key Vault Secrets Userrole (minimum) for reading secretsKey Vault Readerrole for listing secrets
Download the latest release for your platform from the releases page.
# Linux example (replace VERSION and ARCH as needed)
curl -L https://github.com/JayDubyaEey/yeet/releases/download/vVERSION/yeet_VERSION_linux_x86_64.tar.gz | tar xz
sudo mv yeet /usr/local/bin/
# macOS example (Intel)
curl -L https://github.com/JayDubyaEey/yeet/releases/download/vVERSION/yeet_VERSION_darwin_x86_64.tar.gz | tar xz
sudo mv yeet /usr/local/bin/
# macOS example (Apple Silicon)
curl -L https://github.com/JayDubyaEey/yeet/releases/download/vVERSION/yeet_VERSION_darwin_arm64.tar.gz | tar xz
sudo mv yeet /usr/local/bin/Download the Windows zip file from the releases page and extract yeet.exe to a directory in your PATH.
go install github.com/JayDubyaEey/yeet/cmd@latestgit clone https://github.com/JayDubyaEey/yeet
cd yeet
go build -o yeet ./cmd/main.go
sudo mv yeet /usr/local/bin/Before using yeet, ensure all dependencies are properly installed:
# Check if Azure CLI is installed
az --version
# Check if you're logged into Azure
az account show
# If not logged in, authenticate with Azure
az login
# List your Key Vaults to verify access
az keyvault list -o tableCreate an env.config.json file in your project directory. Yeet supports both simple and advanced configuration formats:
The enhanced format allows you to specify different values for local development vs Docker environments, and distinguish between Key Vault secrets and literal values:
{
"keyVaultName": "my-keyvault-name",
"mappings": {
"DATABASE_URL": {
"local": {
"type": "keyvault",
"value": "postgres-connection-string"
},
"docker": {
"type": "keyvault",
"value": "postgres-docker-connection-string"
}
},
"REDIS_URL": {
"local": {
"type": "keyvault",
"value": "redis-connection-string"
},
"docker": {
"type": "literal",
"value": "redis://redis:6379"
}
},
"JWT_SECRET": {
"local": {
"type": "literal",
"value": "local-dev-secret-123"
},
"docker": {
"type": "keyvault",
"value": "jwt-secret-production"
}
},
"PORT": {
"type": "literal",
"value": "8080"
},
"SIMPLE_VAR": "simple-keyvault-secret"
}
}local: Values used for local development (.envfile andyeet run --env local)docker: Values used for Docker environments (docker.envfile andyeet run --env docker)
keyvault: Fetch value from Azure Key Vault using the specified secret nameliteral: Use the specified value directly (no Key Vault lookup)
type+value: Applied to both environments when no environment-specific config exists- Simple string: Shorthand for
{"type": "keyvault", "value": "secret-name"}
yeet login
# With specific tenant/subscription
yeet login --tenant YOUR_TENANT --subscription YOUR_SUBSCRIPTION# Run with local environment (default)
yeet run make dev
yeet run npm start
# Run with docker environment
yeet run --env docker docker-compose up
yeet run -e docker -- docker-compose up
# Use a different vault
yeet run --vault production-vault make deploy
# Load .env file for local overrides
yeet run --load-env make dev
yeet run -l --env-file custom.env npm test# Fetch secrets and generate .env and docker.env
yeet fetch
# Use a different config file
yeet fetch --config path/to/config.json
# Override vault name
yeet fetch --vault different-vault-name# Check if all secrets exist in Key Vault
yeet validate# List all mappings and their status
yeet list
# Show only missing secrets
yeet list --missing-only
# Show only existing secrets
yeet list --exists-only
# Output as JSON for scripting
yeet list --raw# Compare config with Kubernetes deployment file
yeet compare
# Specify custom deployment file path
yeet compare --deployment-path path/to/deployment.yml
# Use different environment for comparison
yeet compare --env dockerThe compare command analyzes your configuration against Kubernetes deployment files and shows:
- Variables in your config but missing from the deployment
- Variables in the deployment but missing from your config
- Environment variable mismatches and recommendations
This helps ensure your configuration stays in sync with your Kubernetes deployments.
# Compare with Kubernetes deployment files
yeet compare
# Refresh environment files (same as fetch)
yeet refresh
# Logout from Azure CLI
yeet logout
# Show version
yeet version
# Help
yeet --help
yeet fetch --helpYeet can compare your configuration with Kubernetes deployment files to ensure your environment variables are properly aligned:
# Compare with default deployment file (deploy/base/deployment.yml)
yeet compare
# Compare with custom deployment file
yeet compare --deployment-path k8s/production/deployment.yaml
# Compare using docker environment settings
yeet compare --env docker --deployment-path k8s/staging/deployment.yamlThe compare command analyzes both your env.config.json and Kubernetes deployment YAML files to identify:
- Missing in Deployment: Variables defined in your config but not present in the Kubernetes deployment
- Missing in Config: Environment variables in the deployment that aren't defined in your config
- Value Type Mismatches: Helps identify when you're using literal values vs secrets in different environments
$ yeet compare
β
Configuration loaded successfully
β
Deployment file loaded: deploy/base/deployment.yml
π Comparison Results:
β Variables in config but missing from deployment:
β’ REDIS_URL
β’ API_KEY
β οΈ Variables in deployment but missing from config:
β’ USER_SERVICE_BASE_URL
β’ POSTGRES_DATABASE
β
Matching variables (5):
β’ LOG_LEVEL
β’ JWT_SECRET
β’ POSTGRES_HOST
β’ POSTGRES_PORT
β’ POSTGRES_PASSWORD
π‘ Recommendations:
β’ Add missing variables to your Kubernetes deployment
β’ Consider adding USER_SERVICE_BASE_URL to your config if needed
β’ Review if POSTGRES_DATABASE should be configurableThe compare command supports:
- Deployments - Extracts env vars from container specifications
- StatefulSets - Analyzes environment variables in pod templates
- DaemonSets - Checks environment configuration across daemon pods
- Jobs/CronJobs - Validates job container environment variables
It handles both direct environment variable values and references to ConfigMaps/Secrets via valueFrom.
--config- Path to configuration file (default:env.config.json)--vault- Override Key Vault name from config--env- Environment to use (local/docker, default: local)--deployment-path- Path to Kubernetes deployment file (compare command)--no-color- Disable colored output-v, --verbose- Enable verbose logging
NO_COLOR- Set to any value to disable colored output
- Never commit
.envordocker.envfiles to version control - Add them to your
.gitignore - Secret values are never printed to the console
- Uses Azure CLI's built-in authentication (session persists ~1 week)
0- Success1- General error2- Validation error3- Authentication error4- Secret not found
If you get an error about Azure CLI not being found:
-
Verify Azure CLI is installed:
which az
-
If not found, install it using the platform-specific instructions in the Prerequisites section.
-
Ensure Azure CLI is in your PATH:
export PATH=$PATH:/usr/local/bin
If you get authentication errors:
-
Check your current Azure login status:
az account show
-
Re-authenticate if needed:
az login
-
Set the correct subscription:
az account set --subscription "Your Subscription Name"
-
Verify you have access to the Key Vault:
az keyvault show --name your-keyvault-name
-
Check your permissions:
az role assignment list --assignee $(az account show --query user.name -o tsv) --scope /subscriptions/YOUR_SUB_ID/resourceGroups/YOUR_RG/providers/Microsoft.KeyVault/vaults/YOUR_KV -
Ensure you have at least
Key Vault Secrets Userrole.
This project publishes releases to GitHub Packages:
Pre-built binaries are automatically built and attached to each GitHub Release. Additionally, binaries from recent builds are available as workflow artifacts with a 30-day retention period.
Supported platforms:
- Linux (amd64, arm64, 386)
- macOS (amd64, arm64)
- Windows (amd64)
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.