Skip to content

Install from source

Editable checkout

Use this path to change the Python sources in runtime/, ctl/, or lab/. Back to Getting started for the first-run commands.

1 — Install

Install Python ≥ 3.11, uv (brew install uv), task (brew install go-task), and optionally direnv.

git clone https://github.com/ioc-project/mas-lab.git && cd mas-lab
direnv allow          # recommended; uses the committed .envrc -> ./.venv
uv sync               # workspace packages install editable
task install-dev      # editable packages plus test and sample dependencies

Without direnv, run uv venv .venv once, then uv sync. uv run <cmd> runs a command in that environment. task install-all adds every optional library.

command -v mas-lab mas-ctl mas-runtime
mas-lab --help
task verify-unit

2 — Set the key

cp docs/tutorials/00-environment-setup/.env.example .env
# Edit .env and set OPENAI_API_KEY=<your-key>

mas-ctl and mas-lab benchmark run load .env from the current directory. Never commit keys.

3 — Set the user config

mas-lab init          # writes ~/.config/mas/config.yaml
mas-lab config        # show effective paths

The user config holds infra_refs (manifests to register, such as standard:openai) and default_infra (used when you pass no --infra-ref). mas-lab init --local writes config.yaml in the project root instead.

4 — Common tasks

Task Purpose
task verify Pre-commit gate
task verify-lint Lockfile, literals, Ruff on changed Python
task ci-fast Lint then unit
task ci Optional sequential run of every verify task
task docs-serve Local MkDocs site at http://127.0.0.1:8000

After git pull, run task install only if dependencies changed.

Next: the first run on Getting started, or Tutorial 0 for project-local config and data paths.