Skip to main content

Dagger CLI

Technical Preview

What is the Dagger CLI?

The Dagger CLI is an optional tool to interact with the Dagger Engine in different ways. This includes:

  • Developing and running CI/CD pipelines from the command-line.
  • Proxying requests to the Dagger GraphQL API.
  • Executing custom commands in a Dagger session for building your custom API client or deeper introspection.

How does it work?

  1. Using the Dagger CLI, your program (typically a shell script) opens a new session to a Dagger Engine: either by connecting to an existing engine, or by provisioning one on-the-fly.
  2. Using the Dagger CLI, your program prepares API requests describing pipelines to run, then sends them to the engine. The wire protocol used to communicate with the engine is private and not yet documented, but this will change in the future. For now, the Dagger CLI is the only documented interface available to your program.
  3. When the engine receives an API request, it computes a Directed Acyclic Graph (DAG) of low-level operations required to compute the result, and starts processing operations concurrently.
  4. When all operations in the pipeline have been resolved, the engine sends the pipeline result back to your program.
  5. Your program may use the pipeline's result as input to new pipelines.

Get started

To learn more, install the Dagger CLI and start using it.