Have you ever spent hoursâor even daysâdebugging a failed build or deployment, only to realize the issue was a slight difference in local environments?
Maybe your colleague had Go 1.21 installed instead of Go 1.22. Maybe they were on Windows while you were on a Mac. Or maybe their AWS CLI version was slightly outdated.
We've all been there. It's the classic "It works on my machine" problem.
To solve this, I built Lask, a task runner that eliminates environment discrepancies by embedding the execution environment directly into the syntax. Here is why I built it and how it works.
đ The limitations of current solutions
When trying to standardize tasks, teams usually lean on two approaches:
- Shell Scripts & Makefiles: Writing scripts automates the steps, but it doesn't standardize the execution environment. You are still at the mercy of whatever is installed on the host OS.
- CI/CD Pipelines: Running tasks in GitHub Actions or CI provides a perfectly clean, reproducible environment. However, it sacrifices the fast feedback loop of local development. Developers often struggle to test the exact same CI pipeline locally.
I wanted a tool that combines the reproducibility of CI/CD with the speed and convenience of local execution.
⨠Enter: Lask
Lask is an open-source task runner designed around three core principles: Reproducibility, Portability, and Ease of Execution.
Instead of relying on whatever tools are installed on your host machine, Lask lets you define the execution environment inline, right next to your command.
Here is what a publish task looks like in Lask:
// main.lask
publish(--var: String = "1.0.0") = do {
// Run inside a Go 1.22 container
$[#golang:1.22] GOOS=linux GOARCH=arm64 go build -o bootstrap ./cmd/lambda
// Run inside a Zip container
$[#zip:latest] zip function.zip bootstrap
// Run inside an AWS CLI container
$[#aws-cli:2.36] aws lambda update-function-code \
--function-name my-function \
--zip-file fileb://function.zip
}
By simply typing lask run publish in your terminal, Lask uses containers under the hood to execute each step in its exact required environment.
Why this changes the game:
- đ True Reproducibility: Because the environment (#golang:1.22, #aws-cli:2.36) is hardcoded into the task, anyone running the script gets the exact same result. No more accidental mismatches.
- đ Portability: Whether you are on Linux, macOS, Windows, or inside a CI runner, the behavior is identical. You effectively bring the CI environment down to your local machine.
- ⥠Zero Setup: Lask is delivered as a single binary. It also features static typing for safety and a built-in REPL for int eractive experimentation!
$ lask repl
lask> $[#rancher/cowsay] cowsay "Hello, Lask!"
đ¤ I'd love your feedback!
Lask is completely open-source and actively being developed. If you are tired of debugging local environment issues, I would be thrilled if you gave it a try or checked out the code.
â GitHub: lask-task-runner/lask
What tools do you currently use to keep dev environments in sync across your team? Let me know in the comments below! đ
Top comments (0)