GitHub - lask-task-runner/lask: A task runner with a small typed language: tasks run in pinned containers and are checked before anything executes.

GitHub

3 min read Original article ↗

test release license docs

Lask (lambda + task) is a task runner with a small language behind it, giving automation what shell scripts and CI YAML never had: portability, reproducibility, and verification before anything runs.

Lask is for anyone who finds Makefiles and Taskfiles not quite enough, and Dagger too much. The first are screwdrivers from the kitchen drawer; the second, a factory floor of your own to operate — its own engine, its own SDK, a general-purpose language and its entire ecosystem. Lask is the garage in between: install Docker and Lask, and you have everything you need.

The excerpt below comes from example/01-projects/02-webapp-on-aws, which builds and deploys a full AWS stack from a machine with none of its tools installed.

An excerpt of the example's main.lask: Python, Node, Terraform and AWS commands declared on pinned images from an imported tools module, access declarations that name what tasks may reach, a module-wide within that keeps every command off the host, a one-line unit-test task, a test task kept free of secrets, and a deploy task that within limits to the two AWS keys

See the full main.lask →

Why Lask

  • One small file: a project is a main.lask in a small language with familiar syntax, and Lask and a container engine are all it needs.
  • Checked before it runs: lask check verifies the whole file, from names and types to where each command runs, before anything runs, and your editor shows the same errors as you type.
  • The same everywhere: every command runs in the environment the file names, a container image pinned by digest unless it says otherwise, on a laptop and in CI alike.
  • Tasks are functions: tasks take typed arguments, call each other, and handle errors and concurrency in the language, and each one is a command with its own --help.
  • Reusable: tasks, and the environments they run in, are imported from other projects and pinned in a lock file.
  • Safe by default: nothing runs on the host unless the file says so, secrets stay out of the log, and what a task may reach can be declared and checked.

Lask is a task runner, not a build system or a CI platform: it replaces what your CI jobs run, not the CI itself. Why Lask covers all of this, with a comparison to make, Taskfile and Dagger.

Install

$ brew tap lask-task-runner/tap
$ brew trust lask-task-runner/tap
$ brew install lask

Lask also needs a container engine: Docker, Podman or nerdctl (containerd). Installation covers Linux, macOS, Windows through WSL 2, building from source, shell completion and the VS Code extension; then Getting started takes you to a first task in about five minutes.

Documentation

The documentation is at https://lask-task-runner.github.io/, with a copy for each release:

The language specification and the compatibility policy live in this repository, and the site shows them too. To work on Lask itself, see doc/development.md.

Status

Lask is pre-1.0: features are experimental until 1.0, and breaking changes are still possible. See doc/compatibility.md for what stable will mean once released. Until then, feedback shapes what becomes stable.

Feedback

Questions, ideas and feedback of any kind are welcome in GitHub Discussions. Found a bug? Please open an issue.