Skip to Content
Alzo

Profiles and settings

Profiles

One configuration, several shapes of the same graph. A profile chooses which nodes exist and can override settings:

export default defineConfig({
  name: 'acme',
  profiles: {
    dev: {
      default: true,
      description: 'Local development with HMR and file watching',
      nodes: () => graph('dev'),
    },
    ci: {
      description: 'Infrastructure adopted from the runner, no watching',
      env: { NODE_ENV: 'test' },
      settings: { maxParallel: 4 },
      nodes: () => graph('ci'),
    },
  },
});

nodes is a function so the graph is built lazily — a profile you are not running costs nothing, and its nodes are never constructed. alzo up --profile ci selects one, and exactly one profile may be default. alzo profiles lists them without constructing any graph. Profile names must contain 1–256 characters; an empty or oversized name is rejected when the configuration loads.

Profiles are for shapes of environment, not for per-session preferences. "Run without the frontend today" or "use a bigger seed" multiply combinatorially into dev-minimal, dev-with-seed, dev-minimal-with-seed, and that is a signal you want a parameter rather than a profile. Changing the graph by platform, environment or flag shows both.

Configuration-level settings

export default defineConfig({
  name: 'acme',
  engines: { alzo: '>=0.0.0-dev.0' },
  requires: [
    { command: 'docker', hint: 'Install Docker Desktop' },
    { command: 'pnpm', version: '>=9', hint: 'npm i -g pnpm' },
  ],
  logFormat: 'raw',   // the default is 'auto'; a function is also accepted
  settings: {
    maxParallel: 20,
    startupTimeout: '5m',
    prune: { maxAge: '24h', keepImages: 2, keepBuilds: 10 },
  },
  nodes: () => [api],
});

Requirements

engines.alzo and requires are checked after the configuration declares them and before its graph is constructed, ports are allocated or any workload runs. Alzo checks its own installed version directly, locates commands without invoking a shell, and runs <command> --version only when a version range is declared. Every missing, too-old, unreadable or invalid requirement is reported together rather than one per run — the difference between "install these three things" and three consecutive failed attempts. Node.js itself is checked even earlier, before the CLI loads.

Startup timeout

startupTimeout bounds how long Alzo waits for the whole graph to become available; it does not kill slow startup work. When it elapses, Alzo reports one failure naming every node still waiting and leaves the environment running, so it can finish or be inspected. Set it to 0 to wait without a deadline. A duration must resolve to a whole number of milliseconds.

A single probe attempt is bounded by ready.timeout, per node, and a node's own budget is initialDelay + period × failureThreshold — arithmetic rather than a field, because a second setting bounding the same thing could only disagree with it. For that arithmetic to hold, timeout may not exceed period and defaults to it, which is why there is no graph-wide probe timeout either. Dependencies and readiness covers probe timing.

Logs and disk

logFormat is a render-time concern only, so whatever you choose, the raw stream is what is retained and what the MCP server and --json receive. The default 'auto' parses JSON lines and renders them for a human; 'raw' passes every line through untouched, which is what you want when a service already formats its own output. An agent still gets structured JSON while you get something readable.

maxParallel bounds how many nodes may start, build or run at once; the default is 8, because twenty containers starting together starve the machine and turn a slow start into a flaky one. prune bounds the disk that images and build cache may take.

On this page