docs/versioned_docs/version-0.16.3/reference/cli.mdx
A tool to run CI/CD pipelines in containers, anywhere
dagger [flags]
-c, --code string Command to be executed
-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 Path to the module directory. Either local path or a remote git repo
-E, --no-exit Leave the TUI running after completion
-n, --no-mod Don't load module during shell startup (mutually exclusive with --mod)
--progress string Progress output format (auto, plain, tty) (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]
-j, --json Present result as JSON
-m, --mod string Path to the module directory. Either local path or a remote git repo
-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) (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
--json output in JSON format
-m, --mod string Path to the module directory. Either local path or a remote git repo
-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) (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) (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]
--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 Path to the module directory. Either local path or a remote git repo
--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) (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]...
-m, --mod string Path to the module directory. Either local path or a remote git repo
-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) (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".
dagger init [options] [path]
dagger init --sdk=python
--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) (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]
--compat string Engine API version to target (default "latest")
-m, --mod string Path to the module directory. Either local path or a remote git repo
-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) (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) (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) (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
--doc string Read query from file (defaults to reading from stdin)
-m, --mod string Path to the module directory. Either local path or a remote git repo
--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) (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) (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
--compat string Engine API version to target (default "latest")
-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) (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 dependency
Update a dependency to the latest version (or the version specified). The target module must be local.
dagger update [options] <module>
"dagger update github.com/shykes/daggerverse/[email protected]" or "dagger update hello"
--compat string Engine API version to target (default "latest")
-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) (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) (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