Skip to main content

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, and helm workflows
  • Multi-cloud registry push โ€” build once, push to AWS ECR, GCP GCR, Azure ACR, and Docker Hub in a single command
  • Composite commands โ€” smurf deploy chains build โ†’ push โ†’ Helm deploy end-to-end
  • Credential fallback โ€” reads auth from smurf.yaml when 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โ€‹

CommandDescription
smurf deployFull pipeline: build image โ†’ push to registry โ†’ deploy via Helm
smurf provisionRun Terraform init โ†’ plan โ†’ apply in sequence

sdkr โ€” Docker operationsโ€‹

CommandDescription
sdkr buildBuild a Docker image
sdkr tagTag an image for a target registry
sdkr scanScan image for vulnerabilities
sdkr pushPush to ECR, GCR, ACR, or Docker Hub
sdkr publishTag + push in one step

selm โ€” Helm operationsโ€‹

CommandDescription
selm installInstall a Helm chart
selm upgradeUpgrade a release
selm lintLint a chart
selm templateRender chart templates locally
selm uninstallRemove a release

stf โ€” Terraform operationsโ€‹

CommandDescription
stf initInitialize working directory
stf validateValidate configuration
stf planGenerate execution plan
stf applyApply changes
stf destroyDestroy 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, and helm calls
  • Enforcing consistent Helm upgrade patterns across environments