Skip to main content

How Dagger Works

Before you design a module, learn the world it lives in.

Dagger has a simple shape:

  1. A workspace is the project using Dagger.
  2. A module adds capabilities to that workspace.
  3. A function is the typed action a module exposes.
  4. The engine runs the work as a graph.
  5. The cache makes repeated work fast.
  6. A check turns a function into project validation.

That is the core model. Everything else in the Module Developer Guide builds on it.

Learn It in This Order​

Read these pages in order:

Do not rush this. Most bad module APIs come from skipping one of these ideas.

What This Unlocks​

Once this model clicks, module design gets much easier.

  • You know what belongs in workspace config.
  • You know what belongs in a module API.
  • You know why functions return typed objects.
  • You know why checks are different from tests.
  • You know how cache rewards precise inputs.
  • You know why Dagger works the same locally, in CI, and in Cloud.

Start with Workspaces.