docs/current_docs/extending/how-dagger-works/modules.mdx
A module is a package of Dagger capabilities.
It can expose functions, objects, checks, services, generators, and dependencies. A workspace installs a module so people and automation can use those capabilities.
A module is not a script. It is an API.
There are two ways to look at a module:
Keep both views in your head. The author writes code. The user sees an API.
Users see:
That is the contract. Make it small, clear, and durable.
Authors control:
The SDK decides syntax. The platform model decides the shape of the API.
A good module does one thing clearly:
The user should feel guided, not tested.
Create a module when a workflow needs a stable interface:
If it is a one-off command, do not make a module yet.
Next: Functions.