Why Code Over YAML
| YAML CI | Dagger |
|---|---|
| Trial-and-error debugging | Debug locally first |
| No type checking | Full IDE support |
| Copy-paste reuse | Functions and modules |
| Vendor lock-in | Run anywhere |
| Different local vs CI | Identical everywhere |
Local = CI
# Same pipeline, same results
dagger call test --source=. # On your laptop
dagger call test --source=. # In GitHub Actions
# Containerized execution ensures identical behaviorMulti-Language SDKs
TypeScript:
@func()
async deploy(image: string): Promise<string> {
return await dag.container().from(image).withExec(["deploy.sh"]).stdout();
}Python:
@function
async def deploy(self, image: str) -> str:
return await dag.container().from_(image).with_exec(["deploy.sh"]).stdout()Go:
func (m *MyPipeline) Deploy(ctx context.Context, image string) (string, error) {
return dag.Container().From(image).WithExec([]string{"deploy.sh"}).Stdout(ctx)
}Caching
Built-in layer caching — unchanged steps skip instantly:
@func()
async build(source: Directory): Promise<Container> {
return dag.container()
.from("node:22")
.withDirectory("/app", source)
.withExec(["npm", "ci"]) // Cached if package-lock unchanged
.withExec(["npm", "run", "build"]);
}CI Integration
# .github/workflows/ci.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dagger/dagger-for-github@v6
with:
verb: call
args: build --source=.Key Stats
- 12,000+ GitHub stars
- TypeScript, Python, Go SDKs
- Containerized execution
- Local = CI (identical results)
- Built-in caching
FAQ
Q: What is Dagger? A: A CI/CD engine where you write pipelines as code (TypeScript/Python/Go) instead of YAML, with containerized execution ensuring identical results locally and in CI.
Q: Is Dagger free? A: Yes, open-source under Apache 2.0. Dagger Cloud (caching service) has a free tier.
Q: Can I use Dagger with GitHub Actions? A: Yes, Dagger runs inside any CI system. It replaces the pipeline logic, not the CI runner.