docs/versioned_docs/version-0.18.19/reference/cli/index.mdx
A tool to run composable workflows in containers
dagger [options] [subcommand | file...]
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
-c, --command string Execute a dagger shell command
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
--model string LLM model to use (e.g., 'claude-sonnet-4-0', 'gpt-4.1')
-E, --no-exit Leave the TUI running after completion
-M, --no-mod Don't automatically load a module (mutually exclusive with --mod)
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Call one or more functions, interconnected into a pipeline
dagger call [options]
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
-j, --json Present result as JSON
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
-M, --no-mod Don't automatically load a module (mutually exclusive with --mod)
-o, --output string Save the result to a local file or directory
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Get or set module configuration
Get or set the configuration of a Dagger module. By default, print the configuration of the specified module.
dagger config [options]
dagger config -m /path/to/some/dir
dagger config -m github.com/dagger/hello-dagger
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
--json output in JSON format
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Call a core function
dagger core [options]
-j, --json Present result as JSON
-o, --output string Save the result to a local file or directory
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Prepare a local module for development
Ensure that a module's SDK is installed, configured, and all its files re-generated.
It has different uses in different contexts:
This command is idempotent: you can run it at any time, any number of times. It will:
dagger develop [options]
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
--compat string[="skip"] Engine API version to target (default "latest")
--license string License identifier to generate. See https://spdx.org/licenses/ (default "Apache-2.0")
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
-r, --recursive Develop recursively into local dependencies
--sdk string Install the given Dagger SDK. Can be builtin (go, python, typescript) or a module address
--source string Source directory used by the installed SDK. Defaults to module root
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
List available functions
List available functions in a module.
This is similar to dagger call --help, but only focused on showing the
available functions.
dagger functions [options] [function]...
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Initialize a new module
Initialize a new module at the given path.
This creates a dagger.json file at the specified directory, making it the root of the new module.
If --sdk is specified, the given SDK is installed in the module. You can do this later with "dagger develop". If --blueprint is specified, the given blueprint is installed in the module.
dagger init [options] [path]
# Reference a remote module as blueprint
dagger init --blueprint=github.com/example/blueprint
# Reference a local module as blueprint
dagger init --blueprint=../my/blueprints/simple-webapp
# Implement a standalone module in Go
dagger init --sdk=go
--blueprint string Reference another module as blueprint
--include strings Paths to include when loading the module. Only needed when extra paths are required to build the module. They are expected to be relative to the directory containing the module's dagger.json file (the module source root).
--license string License identifier to generate. See https://spdx.org/licenses/ (default "Apache-2.0")
--name string Name of the new module (defaults to parent directory name)
--sdk string Optionally install a Dagger SDK
--source string Source directory used by the installed SDK. Defaults to module root
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Install a dependency
Install another module as a dependency to the current module. The target module must be local.
dagger install [options] <module>
dagger install github.com/shykes/daggerverse/[email protected]
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
--compat string Engine API version to target (default "latest")
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
-n, --name string Name to use for the dependency in the module. Defaults to the name of the module being installed.
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Log in to Dagger Cloud
dagger login [options] [org]
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Log out from Dagger Cloud
dagger logout
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Send API queries to a dagger engine
Send API queries to a dagger engine.
When no document file is provided, reads query from standard input.
Can optionally provide the GraphQL operation name if there are multiple queries in the document.
dagger query [options] [operation]
dagger query <<EOF
{
container {
from(address:"hello-world") {
withExec(args:["/hello"]) {
stdout
}
}
}
}
EOF
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
--doc string Read query from file (defaults to reading from stdin)
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
-M, --no-mod Don't automatically load a module (mutually exclusive with --mod)
--var strings List of query variables, in key=value format
--var-json string Query variables in JSON format (overrides --var)
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Run a command in a Dagger session
Executes the specified command in a Dagger Session and displays live progress in a TUI.
DAGGER_SESSION_PORT and DAGGER_SESSION_TOKEN will be conveniently
injected automatically.
For example:
jq -n '{query:"{container{id}}"}' | \
dagger run sh -c 'curl -s \
-u $DAGGER_SESSION_TOKEN: \
-H "content-type:application/json" \
-d @- \
http://127.0.0.1:$DAGGER_SESSION_PORT/query'
dagger run [options] <command>...
dagger run go run main.go
dagger run node index.mjs
dagger run python main.py
--cleanup-timeout duration max duration to wait between SIGTERM and SIGKILL on interrupt (default 10s)
--focus Only show output for focused commands.
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Uninstall a dependency
Uninstall module as a dependency from the current module. The target module must be local.
dagger uninstall [options] <module>
dagger uninstall hello
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
--compat string Engine API version to target (default "latest")
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Update a module's dependencies
Update the dependencies of a local module.
To update only specific dependencies, specify their short names or a complete address.
If no dependency is specified, all dependencies are updated, as well as the module's blueprint, if it exists.
dagger update [options] [<DEPENDENCY>...]
"dagger update" or "dagger update hello" "dagger update github.com/shykes/daggerverse/[email protected]"
--allow-llm strings List of URLs of remote modules allowed to access LLM APIs, or 'all' to bypass restrictions for the entire session
--compat string Engine API version to target (default "latest")
-m, --mod string Module reference to load, either a local path or a remote git repo (defaults to current directory)
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser
Print dagger version
dagger version
--check Check for updates
-d, --debug Show debug logs and full verbosity
-i, --interactive Spawn a terminal on container exec failure
--interactive-command string Change the default command for interactive mode (default "/bin/sh")
-E, --no-exit Leave the TUI running after completion
--progress string Progress output format (auto, plain, tty, dots) (default "auto")
-q, --quiet count Reduce verbosity (show progress, but clean up at the end)
-s, --silent Do not show progress at all
-v, --verbose count Increase verbosity (use -vv or -vvv for more)
-w, --web Open trace URL in a web browser