Smurf
Smurf is a single CLI that wraps Terraform, Docker, and Helm โ giving your team one consistent interface for infra provisioning, container builds, and Kubernetes deployments without switching between tools.
Repository: clouddrove/smurf
Stack: Go ยท Terraform ยท Docker ยท Helm
Featuresโ
- Unified interface โ one binary covers
terraform,docker, andhelmworkflows - Multi-cloud registry push โ build once, push to AWS ECR, GCP GCR, Azure ACR, and Docker Hub in a single command
- Composite commands โ
smurf deploychains build โ push โ Helm deploy end-to-end - Credential fallback โ reads auth from
smurf.yamlwhen env vars aren't set - GitHub Actions integration โ drop-in action for CI/CD pipelines
Installationโ
Homebrewโ
brew tap clouddrove/smurf
brew install smurf
Go installโ
go install github.com/clouddrove/smurf@latest
Download binaryโ
Download the latest release from the releases page and place it on your $PATH.
GitHub Actionsโ
- uses: clouddrove/[email protected]
with:
args: deploy --image myapp --tag ${{ github.sha }}
Commandsโ
Smurf exposes three sub-CLIs plus top-level composite commands.
Top-levelโ
| Command | Description |
|---|---|
smurf deploy | Full pipeline: build image โ push to registry โ deploy via Helm |
smurf provision | Run Terraform init โ plan โ apply in sequence |
sdkr โ Docker operationsโ
| Command | Description |
|---|---|
sdkr build | Build a Docker image |
sdkr tag | Tag an image for a target registry |
sdkr scan | Scan image for vulnerabilities |
sdkr push | Push to ECR, GCR, ACR, or Docker Hub |
sdkr publish | Tag + push in one step |
selm โ Helm operationsโ
| Command | Description |
|---|---|
selm install | Install a Helm chart |
selm upgrade | Upgrade a release |
selm lint | Lint a chart |
selm template | Render chart templates locally |
selm uninstall | Remove a release |
stf โ Terraform operationsโ
| Command | Description |
|---|---|
stf init | Initialize working directory |
stf validate | Validate configuration |
stf plan | Generate execution plan |
stf apply | Apply changes |
stf destroy | Destroy infrastructure |
Configurationโ
Create a smurf.yaml at the root of your project. Any value here is used as a fallback when the equivalent flag or env var is absent.
# smurf.yaml
docker:
registry: 123456789012.dkr.ecr.us-east-1.amazonaws.com
username: AWS
# password: read from env AWS_ECR_PASSWORD
helm:
namespace: production
timeout: 300
terraform:
workspace: production
vars:
region: us-east-1
env: prod
End-to-end exampleโ
Build, push to ECR, and deploy to Kubernetes in one command:
smurf deploy \
--image myapp \
--tag v1.2.0 \
--registry 123456789012.dkr.ecr.us-east-1.amazonaws.com \
--chart ./helm/myapp \
--namespace production
This is equivalent to:
sdkr build --image myapp --tag v1.2.0
sdkr push --image myapp --tag v1.2.0 --registry 123456789012.dkr.ecr.us-east-1.amazonaws.com
selm upgrade myapp ./helm/myapp --namespace production --set image.tag=v1.2.0
GitHub Actions exampleโ
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Deploy with Smurf
uses: clouddrove/[email protected]
with:
args: deploy --image myapp --tag ${{ github.sha }} --registry ${{ secrets.ECR_REGISTRY }} --chart ./helm/myapp --namespace production
Multi-registry pushโ
Push the same image to multiple registries in one pass:
sdkr publish \
--image myapp:v1.2.0 \
--registries ecr,gcr,acr \
--ecr-registry 123456789012.dkr.ecr.us-east-1.amazonaws.com \
--gcr-registry gcr.io/my-project \
--acr-registry mycompany.azurecr.io
Use casesโ
- Standardizing deploy commands across teams so every engineer uses the same flags
- CI/CD pipelines that push to multiple cloud registries on every release
- Eliminating shell scripts that string together
terraform,docker, andhelmcalls - Enforcing consistent Helm upgrade patterns across environments