Skip to main content

Reference

dagger

The Dagger CLI provides a command-line interface to Dagger.

Options

      --debug             Show more information for debugging
--progress string progress output format (auto, plain, tty) (default "auto")
-s, --silent disable terminal UI and progress output

SEE ALSO

dagger login

Log in to Dagger Cloud

dagger login [flags]

Options inherited from parent commands

      --debug             Show more information for debugging
--progress string progress output format (auto, plain, tty) (default "auto")
-s, --silent disable terminal UI and progress output

SEE ALSO

  • dagger - The Dagger CLI provides a command-line interface to Dagger.

dagger logout

Log out from Dagger Cloud

dagger logout [flags]

Options inherited from parent commands

      --debug             Show more information for debugging
--progress string progress output format (auto, plain, tty) (default "auto")
-s, --silent disable terminal UI and progress output

SEE ALSO

  • dagger - The Dagger CLI provides a command-line interface to Dagger.

dagger query

Send API queries to a dagger engine

Synopsis

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 [flags] [OPERATION]

Examples

dagger query <<EOF
{
container {
from(address:"hello-world") {
withExec(args:["/hello"]) {
stdout
}
}
}
}
EOF

Options

      --doc string        Read query from file (defaults to reading from stdin)
--focus Only show output for focused commands (default true)
-m, --mod string Path to dagger.json config file for the module or a directory containing that file. Either local path (e.g. "/path/to/some/dir") or a github repo (e.g. "github.com/dagger/dagger/path/to/some/subdir")
--var strings List of query variables, in key=value format
--var-json string Query variables in JSON format (overrides --var)

Options inherited from parent commands

      --debug             Show more information for debugging
--progress string progress output format (auto, plain, tty) (default "auto")
-s, --silent disable terminal UI and progress output

SEE ALSO

  • dagger - The Dagger CLI provides a command-line interface to Dagger.

dagger run

Run a command in a Dagger session

Synopsis

Executes the specified command in a Dagger Session and displays live progress in a TUI.

DAGGER_SESSION_PORT and DAGGER_SESSION_TOKEN will be convieniently 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 [flags] COMMAND

Examples

dagger run go run main.go
dagger run node index.mjs
dagger run python main.py

Options

      --cleanup-timeout duration   max duration to wait between SIGTERM and SIGKILL on interrupt (default 10s)
--focus Only show output for focused commands.

Options inherited from parent commands

      --debug             Show more information for debugging
--progress string progress output format (auto, plain, tty) (default "auto")
-s, --silent disable terminal UI and progress output

SEE ALSO

  • dagger - The Dagger CLI provides a command-line interface to Dagger.

dagger version

Print dagger version

dagger version [flags]

Options inherited from parent commands

      --debug             Show more information for debugging
--progress string progress output format (auto, plain, tty) (default "auto")
-s, --silent disable terminal UI and progress output

SEE ALSO

  • dagger - The Dagger CLI provides a command-line interface to Dagger.