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.
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> = {}
): RunnableThe 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
--imageThe 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_dirHost directory mounted at /cache, where pip keeps its cache (PIP_CACHE_DIR).--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval python --cache_dir /tmp/pip-cachenode
Node.js, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #node:<tag>.--node_envNODE_ENV.--node_optionsNODE_OPTIONS.--registrynpm_config_registry: the registry npm installs from.--npm_token!!NPM_TOKEN, for an .npmrc that reads ${NPM_TOKEN}; masked in the command log.--cache_dirHost directory mounted at /cache, where npm keeps its cache (npm_config_cache).--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval node --node_env productiongo
Go, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #golang:<tag>.--goproxyGOPROXY.--goprivateGOPRIVATE.--goflagsGOFLAGS.--cgo_enabledCGO_ENABLED, "0" or "1".--goosGOOS, to cross-compile.--goarchGOARCH, to cross-compile.--cache_dirHost directory mounted at /cache: the module cache (GOMODCACHE) and the build cache (GOCACHE).--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval go --goos linux --goarch amd64java
The Eclipse Temurin JDK, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #eclipse-temurin:<tag>.--java_tool_optionsJAVA_TOOL_OPTIONS, which every JVM in the container reads.--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval java --java_tool_options -Xmx2gmaven
Maven, on Temurin 25, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #maven:<tag>.--java_tool_optionsJAVA_TOOL_OPTIONS.--maven_optsMAVEN_OPTS.--cache_dirHost directory mounted at /cache; the local repository is /cache/m2 (-Dmaven.repo.local, added to MAVEN_OPTS).--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval maven --cache_dir /tmp/cachegradle
Gradle, on Temurin 25, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #gradle:<tag>.--java_tool_optionsJAVA_TOOL_OPTIONS.--gradle_optsGRADLE_OPTS.--cache_dirHost directory mounted at /cache; the Gradle user home is /cache/gradle (GRADLE_USER_HOME).--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval gradle --cache_dir /tmp/cacherust
Rust, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #rust:<tag>.--rustflagsRUSTFLAGS.--cache_dirHost 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.--withSetups of other tools this environment should also carry; git_setup for a private git dependency.--extra_envAny 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"
lask eval rust --cache_dir /tmp/cachecc
GCC, with Make, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #gcc:<tag>.--ccCC.--cxxCXX.--cflagsCFLAGS.--cxxflagsCXXFLAGS.--ldflagsLDFLAGS.--makeflagsMAKEFLAGS, e.g. "-j8".--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval cc --cflags "-O2 -Wall"ruby
Ruby, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #ruby:<tag>.--cache_dirHost directory mounted at /cache; Bundler installs gems into /cache/bundle (BUNDLE_PATH), so they outlive the container.--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval ruby --cache_dir /tmp/cachedotnet
The .NET SDK, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #mcr.microsoft.com/dotnet/sdk:<tag>.--cache_dirHost directory mounted at /cache; NuGet keeps packages in /cache/nuget (NUGET_PACKAGES).--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval dotnet --cache_dir /tmp/cachedeno
Deno, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe 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_dirHost directory mounted at /cache; Deno's cache is /cache/deno (DENO_DIR).--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval deno --cache_dir /tmp/cachebun
Bun, configured by its parameters.
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> = {}
): RunnableThe image is #oven/bun:1.4.2-alpine unless --image names another. Bun sends no telemetry (DO_NOT_TRACK=1).
Parameters
--imageThe 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_dirHost directory mounted at /cache; Bun's install cache is /cache/bun (BUN_INSTALL_CACHE_DIR).--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval bun --cache_dir /tmp/cachehaskell
GHC, with Cabal and Stack, configured by its parameters.
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> = {}
): RunnableThe 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
--imageThe image to run; another release is passed as image = #haskell:<tag>.--cache_dirHost 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.--withSetups of other tools this environment should also carry.--extra_envAny 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"
lask eval haskell --cache_dir /tmp/cache