Introduction

A high-performance, local toolchain for managing monorepos.

Lattice is one CLI that runs tasks across the workspaces of a monorepo and pins the tool versions those tasks run with. It reads the workspaces, the dependencies between them and their tasks from the manifests the repo already has, so a lattice.json often holds only a few lines. Either half works without the other: a repo can run and cache tasks with no pinned versions, or pin versions for tasks it runs some other way.

Start here

  • Installation gets the lattice binary onto your machine.
  • Getting started runs lattice init in a small monorepo, then builds it twice so the second run comes back from cache.
  • Upgrading covers moving a repo to a new version, including a 1.x config to 2.0 with lattice migrate.

Do one thing in your own repo

Understand how it decides

  • Workspaces covers where the list of workspaces, their names and their dependencies come from.
  • Task graph covers how one task name becomes a node per workspace, dependsOn, and what runs in parallel.
  • Caching covers what makes a task hit or miss.
  • Driver detection covers which tool runs a workspace’s tasks and which tasks it can run.
  • Engines and provisioning covers the three things a version pin can mean.
  • Selecting what runs covers --filter, running from a subdirectory, and passing arguments.
  • Persistent tasks covers tasks that run until you stop them.
  • Output and logging covers the live display and the plain stream.

Look something up

  • Configuration is the field reference for lattice.json.
  • CLI reference is every command, flag, and exit code.
  • Toolchains is the driver table, the tasks each tool can run, and the well-known engine list.
  • Environment variables is what Lattice reads from the environment and what it sets for a task.
  • Errors is every error message and what causes it.
  • Cache internals is the exact key composition and on-disk layout.
  • Architecture is the crate layout, for contributors.
  • Glossary defines every term these pages use.
  • Changelog is what changed in each release.