Tasks

Tasks define commands that run in a sandbox with exactly your declared dependencies. Every developer on your team runs the same task in the same environment.

A task is a one-shot command that runs in its own fresh sandbox and exits, driven by the mip CLI (Linux-only; inside a session, min run <name> runs the same tasks on any platform). That makes it different from an interactive dev session, which is a long-lived environment you attach to with min. Reach for a task to run builds, tests, linters, and deploys; reach for a session for interactive development.

Defining a task

Tasks are defined in your minimal.toml and run with mip run <name>:

[tasks.lint]
packages = ["python", "ruff"]
exec = "ruff check ."

[tasks.greet]
bash = "echo Hello from $(uname -s) && date"
$ mip run greet
Hello from Linux
Tue Mar 17 12:00:00 UTC 2026

Use exec for a single command, or bash for shell scripts.

Environment variables

Set environment variables directly, or inherit them from the host:

[tasks.deploy]
packages = ["railway"]
exec = "railway up"
env_vars.RAILS_ENV = "production"
env_vars.GITHUB_TOKEN = { inherit = true }

inherit = true copies the value from your host environment into the task’s sandbox, where every command the task runs can read it — including scripts the repository itself provides. Inherit sparingly, and prefer scoped, short-lived tokens over long-lived ambient credentials.

Mapping host files

Use patches to give a task access to specific files or directories on the host:

[tasks.deploy]
packages = ["railway"]
exec = "railway up"
patches.dir."~/.config/railway" = "read-only"

Map host files read-only unless the task genuinely needs to write them: a read-write mapping lets anything the task runs modify those host files in place.

See the tasks reference for the full schema.