Skip to content

Languages ​

Functions of the tools module at v0.3.2. Each returns what a command runs in; import it with import * as tools from "tools".

python ​

Python, configured by its parameters.

lask
python(
  --image: Environment = #python:3.12.14-alpine3.24,
  --index_url: String | Null = <secret>,
  --extra_index_url: String | Null = <secret>,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #python:3.12.14-alpine3.24 unless --image names another. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

Output reaches the command log as it happens (PYTHONUNBUFFERED), and no __pycache__ is written into the project, which the container would leave owned by root (PYTHONDONTWRITEBYTECODE). pip does not check for a newer version of itself. --extra_env can change any of these.

Parameters

  • --image The image to run; another release is passed as image = #python:<tag>.
  • --index_url!! PIP_INDEX_URL; masked in the command log, since a private index URL often carries a credential.
  • --extra_index_url!! PIP_EXTRA_INDEX_URL; masked in the command log.
  • --cache_dir Host directory mounted at /cache, where pip keeps its cache (PIP_CACHE_DIR).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "python" } on ... or $[...].

Image python:3.12.14-alpine3.24

Command words pip, pip3, python, python3: import command { "pip", "pip3", "python", "python3" } from "tools"

bash
lask eval python --cache_dir /tmp/pip-cache

lib/python.lask

node ​

Node.js, configured by its parameters.

lask
node(
  --image: Environment = #node:24.21.0-alpine3.24,
  --node_env: String | Null = null,
  --node_options: String | Null = null,
  --registry: String | Null = null,
  --npm_token: String | Null = <secret>,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #node:24.21.0-alpine3.24 (an LTS release) unless --image names another. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

npm does not check for a newer version of itself, which would otherwise print a notice into the command log. --extra_env can change that.

Parameters

  • --image The image to run; another release is passed as image = #node:<tag>.
  • --node_env NODE_ENV.
  • --node_options NODE_OPTIONS.
  • --registry npm_config_registry: the registry npm installs from.
  • --npm_token!! NPM_TOKEN, for an .npmrc that reads ${NPM_TOKEN}; masked in the command log.
  • --cache_dir Host directory mounted at /cache, where npm keeps its cache (npm_config_cache).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "npm" } on ... or $[...].

Image node:24.21.0-alpine3.24

Command words corepack, node, npm, npx: import command { "corepack", "node", "npm", "npx" } from "tools"

bash
lask eval node --node_env production

lib/node.lask

go ​

Go, configured by its parameters.

lask
go(
  --image: Environment = #golang:1.27.1-trixie,
  --goproxy: String | Null = null,
  --goprivate: String | Null = null,
  --goflags: String | Null = null,
  --cgo_enabled: String | Null = null,
  --goos: String | Null = null,
  --goarch: String | Null = null,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #golang:1.27.1-trixie unless --image names another: Debian rather than Alpine, so cgo and go test -race find a C toolchain. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

GOTOOLCHAIN=local keeps Go to the release its image holds: a go.mod that asks for a newer one fails instead of downloading it into a container that is thrown away. Git trusts the mounted project (safe.directory), so go build can stamp its revision. A private module over https takes with = [git_setup(token = ...)].

Parameters

  • --image The image to run; another release is passed as image = #golang:<tag>.
  • --goproxy GOPROXY.
  • --goprivate GOPRIVATE.
  • --goflags GOFLAGS.
  • --cgo_enabled CGO_ENABLED, "0" or "1".
  • --goos GOOS, to cross-compile.
  • --goarch GOARCH, to cross-compile.
  • --cache_dir Host directory mounted at /cache: the module cache (GOMODCACHE) and the build cache (GOCACHE).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "go" } on ... or $[...].

Image golang:1.27.1-trixie

Command words go, gofmt: import command { "go", "gofmt" } from "tools"

bash
lask eval go --goos linux --goarch amd64

lib/go.lask

java ​

The Eclipse Temurin JDK, configured by its parameters.

lask
java(
  --image: Environment = #eclipse-temurin:25.0.4.1_1-jdk-noble,
  --java_tool_options: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #eclipse-temurin:25.0.4.1_1-jdk-noble (Java 25, an LTS release) unless --image names another. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

Parameters

  • --image The image to run; another release is passed as image = #eclipse-temurin:<tag>.
  • --java_tool_options JAVA_TOOL_OPTIONS, which every JVM in the container reads.
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "java" } on ... or $[...].

Image eclipse-temurin:25.0.4.1_1-jdk-noble

Command words jar, java, javac: import command { "jar", "java", "javac" } from "tools"

bash
lask eval java --java_tool_options -Xmx2g

lib/java.lask

maven ​

Maven, on Temurin 25, configured by its parameters.

lask
maven(
  --image: Environment = #maven:3.9.16-eclipse-temurin-25-noble,
  --java_tool_options: String | Null = null,
  --maven_opts: String | Null = null,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #maven:3.9.16-eclipse-temurin-25-noble unless --image names another. Maven runs in batch mode without transfer progress (MAVEN_ARGS), so the command log holds the build rather than a download meter.

Parameters

  • --image The image to run; another release is passed as image = #maven:<tag>.
  • --java_tool_options JAVA_TOOL_OPTIONS.
  • --maven_opts MAVEN_OPTS.
  • --cache_dir Host directory mounted at /cache; the local repository is /cache/m2 (-Dmaven.repo.local, added to MAVEN_OPTS).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "mvn" } on ... or $[...].

Image maven:3.9.16-eclipse-temurin-25-noble

Command words mvn: import command { "mvn" } from "tools"

bash
lask eval maven --cache_dir /tmp/cache

lib/java.lask

gradle ​

Gradle, on Temurin 25, configured by its parameters.

lask
gradle(
  --image: Environment = #gradle:9.8.0-jdk25-noble,
  --java_tool_options: String | Null = null,
  --gradle_opts: String | Null = null,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #gradle:9.8.0-jdk25-noble unless --image names another. A project's own wrapper, ./gradlew, runs here too, though as a path it is no command word: give the environment with $[...].

Parameters

  • --image The image to run; another release is passed as image = #gradle:<tag>.
  • --java_tool_options JAVA_TOOL_OPTIONS.
  • --gradle_opts GRADLE_OPTS.
  • --cache_dir Host directory mounted at /cache; the Gradle user home is /cache/gradle (GRADLE_USER_HOME).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "gradle" } on ... or $[...].

Image gradle:9.8.0-jdk25-noble

Command words gradle: import command { "gradle" } from "tools"

bash
lask eval gradle --cache_dir /tmp/cache

lib/java.lask

rust ​

Rust, configured by its parameters.

lask
rust(
  --image: Environment = #rust:1.98.1-slim-trixie,
  --rustflags: String | Null = null,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #rust:1.98.1-slim-trixie unless --image names another; it carries the C toolchain Cargo links with. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

Parameters

  • --image The image to run; another release is passed as image = #rust:<tag>.
  • --rustflags RUSTFLAGS.
  • --cache_dir Host directory mounted at /cache; Cargo's home is /cache/cargo (CARGO_HOME), which holds the registry and the git checkouts. The toolchain stays where the image has it.
  • --with Setups of other tools this environment should also carry; git_setup for a private git dependency.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "cargo" } on ... or $[...].

Image rust:1.98.1-slim-trixie

Command words cargo, rustc, rustup: import command { "cargo", "rustc", "rustup" } from "tools"

bash
lask eval rust --cache_dir /tmp/cache

lib/rust.lask

cc ​

GCC, with Make, configured by its parameters.

lask
cc(
  --image: Environment = #gcc:16.2.0,
  --cc: String | Null = null,
  --cxx: String | Null = null,
  --cflags: String | Null = null,
  --cxxflags: String | Null = null,
  --ldflags: String | Null = null,
  --makeflags: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #gcc:16.2.0 unless --image names another. It has no CMake. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

Parameters

  • --image The image to run; another release is passed as image = #gcc:<tag>.
  • --cc CC.
  • --cxx CXX.
  • --cflags CFLAGS.
  • --cxxflags CXXFLAGS.
  • --ldflags LDFLAGS.
  • --makeflags MAKEFLAGS, e.g. "-j8".
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "make" } on ... or $[...].

Image gcc:16.2.0

Command words c++, cc, g++, gcc, make: import command { "c++", "cc", "g++", "gcc", "make" } from "tools"

bash
lask eval cc --cflags "-O2 -Wall"

lib/cc.lask

ruby ​

Ruby, configured by its parameters.

lask
ruby(
  --image: Environment = #ruby:4.0.7-alpine3.24,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #ruby:4.0.7-alpine3.24 unless --image names another. Alpine has no C toolchain, so a gem with a native extension and no prebuilt musl gem needs a Debian tag, e.g. 4.0.7-slim-trixie. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

Bundler does not warn that it runs as root (BUNDLE_SILENCE_ROOT_WARNING=1): every container here does.

Parameters

  • --image The image to run; another release is passed as image = #ruby:<tag>.
  • --cache_dir Host directory mounted at /cache; Bundler installs gems into /cache/bundle (BUNDLE_PATH), so they outlive the container.
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable, e.g. a BUNDLE_<HOST>__<DOMAIN> credential; below --with and the named parameters.

Returns Runnable: The environment, for command { "bundle" } on ... or $[...].

Image ruby:4.0.7-alpine3.24

Command words bundle, gem, rake, ruby: import command { "bundle", "gem", "rake", "ruby" } from "tools"

bash
lask eval ruby --cache_dir /tmp/cache

lib/ruby.lask

dotnet ​

The .NET SDK, configured by its parameters.

lask
dotnet(
  --image: Environment = #mcr.microsoft.com/dotnet/sdk:10.0.401-alpine3.24,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #mcr.microsoft.com/dotnet/sdk:10.0.401-alpine3.24 (.NET 10, an LTS release) unless --image names another. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

The CLI sends no telemetry and prints no banner (DOTNET_CLI_TELEMETRY_OPTOUT=1, DOTNET_NOLOGO=1).

Parameters

  • --image The image to run; another release is passed as image = #mcr.microsoft.com/dotnet/sdk:<tag>.
  • --cache_dir Host directory mounted at /cache; NuGet keeps packages in /cache/nuget (NUGET_PACKAGES).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "dotnet" } on ... or $[...].

Image mcr.microsoft.com/dotnet/sdk:10.0.401-alpine3.24

Command words dotnet: import command { "dotnet" } from "tools"

bash
lask eval dotnet --cache_dir /tmp/cache

lib/dotnet.lask

deno ​

Deno, configured by its parameters.

lask
deno(
  --image: Environment = #denoland/deno:alpine-2.9.7,
  --auth_tokens: String | Null = <secret>,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #denoland/deno:alpine-2.9.7 unless --image names another. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

Deno checks for no update and never prompts for a permission (DENO_NO_UPDATE_CHECK=1, DENO_NO_PROMPT=1): a permission not granted on the command line fails.

Parameters

  • --image The image to run; another release is passed as image = #denoland/deno:<tag>.
  • --auth_tokens!! DENO_AUTH_TOKENS, for private modules; masked in the command log.
  • --cache_dir Host directory mounted at /cache; Deno's cache is /cache/deno (DENO_DIR).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "deno" } on ... or $[...].

Image denoland/deno:alpine-2.9.7

Command words deno: import command { "deno" } from "tools"

bash
lask eval deno --cache_dir /tmp/cache

lib/deno.lask

bun ​

Bun, configured by its parameters.

lask
bun(
  --image: Environment = #oven/bun:1.4.2-alpine,
  --npm_token: String | Null = <secret>,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #oven/bun:1.4.2-alpine unless --image names another. Bun sends no telemetry (DO_NOT_TRACK=1).

Parameters

  • --image The image to run; another release is passed as image = #oven/bun:<tag>.
  • --npm_token!! NPM_TOKEN, for a bunfig.toml or .npmrc that reads it; masked in the command log.
  • --cache_dir Host directory mounted at /cache; Bun's install cache is /cache/bun (BUN_INSTALL_CACHE_DIR).
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "bun" } on ... or $[...].

Image oven/bun:1.4.2-alpine

Command words bun, bunx: import command { "bun", "bunx" } from "tools"

bash
lask eval bun --cache_dir /tmp/cache

lib/deno.lask

haskell ​

GHC, with Cabal and Stack, configured by its parameters.

lask
haskell(
  --image: Environment = #haskell:9.12.4-slim-bookworm,
  --cache_dir: String | Null = null,
  --with: Array<Record<env: Map<String>, volumes: Array<String>>> = [],
  --extra_env: Map<String> = {}
): Runnable

The image is #haskell:9.12.4-slim-bookworm unless --image names another. lask sync pulls and pins whichever image is used (lask spec 10.3); a run never pulls.

Stack in this image is not told to use the GHC beside it: give stack --system-ghc for a resolver on this GHC, or let Stack install the one its resolver names, which --cache_dir then keeps.

Parameters

  • --image The image to run; another release is passed as image = #haskell:<tag>.
  • --cache_dir Host directory mounted at /cache; Cabal's directory is /cache/cabal (CABAL_DIR) and Stack's root /cache/stack (STACK_ROOT), so the package store and downloaded compilers outlive the container.
  • --with Setups of other tools this environment should also carry.
  • --extra_env Any other variable; below --with and the named parameters.

Returns Runnable: The environment, for command { "cabal" } on ... or $[...].

Image haskell:9.12.4-slim-bookworm

Command words cabal, ghc, ghci, runghc, stack: import command { "cabal", "ghc", "ghci", "runghc", "stack" } from "tools"

bash
lask eval haskell --cache_dir /tmp/cache

lib/haskell.lask

Released under the MIT License.