docs/static/api/reference/index.html
addressinitialize an address to load directories, containers, secrets or other object types.
| Name | Description |
|---|---|
value - String! |
cacheVolumeConstructs a cache volume for a given cache key.
| Name | Description |
|---|---|
key - String! | A string identifier to target this cache volume (e.g., "modules-cache"). |
query {
cacheVolume(key: "deps") {
id
}
}
changesetCreates an empty changeset
cloudDagger Cloud configuration and state
containerCreates a scratch container, with no image or metadata.
To pull an image, follow up with the "from" function.
| Name | Description |
|---|---|
platform - Platform | Platform to initialize the container with. Defaults to the native platform of the current engine |
query {
container {
from(address: "alpine") {
defaultArgs
entrypoint
platform
rootfs {
entries
}
}
}
}
currentEnvReturns the current environment
When called from a function invoked via an LLM tool call, this will be the LLM's current environment, including any modifications made through calling tools. Env values returned by functions become the new environment for subsequent calls, and Changeset values returned by functions are applied to the environment's workspace.
When called from a module function outside of an LLM, this returns an Env with the current module installed, and with the current module's source directory as its workspace.
currentFunctionCallThe FunctionCall context that the SDK caller is currently executing in.
If the caller is not currently executing in a function, this will return an error.
currentModuleThe module currently being served in the session, if any.
currentTypeDefsThe TypeDef representations of the objects currently being served in the session.
| Name | Description |
|---|---|
hideCore - Boolean |
Strip core API functions from the Query type, leaving only module-sourced functions (constructors, entrypoint proxies, etc.).
Core types (Container, Directory, etc.) are kept so return types and method chaining still work.
|
currentWorkspaceDetect and return the current workspace.
defaultPlatformThe default platform of the engine.
query {
defaultPlatform
}
directoryCreates an empty directory.
query {
directory {
withNewDirectory(path: "foo") {
withNewDirectory(path: "foo/bar/baz") {
withNewFile(path: "foo/bar/greeting", contents: "hello, world!\n") {
foo: entries(path: "foo")
bar: entries(path: "foo/bar")
greeting: file(path: "foo/bar/greeting") {
contents
}
}
}
}
}
}
engineThe Dagger engine container configuration and state
envInitializes a new environment
| Name | Description |
|---|---|
privileged - Boolean | Give the environment the same privileges as the caller: core API including host access, current module, and dependencies. Default = false |
writable - Boolean | Allow new outputs to be declared and saved in the environment. Default = false |
envFileInitialize an environment file
| Name | Description |
|---|---|
expand - Boolean | Replace "${VAR}" or "$VAR" with the value of other vars |
errorCreate a new error.
| Name | Description |
|---|---|
message - String! | A brief description of the error. |
fileCreates a file with the specified contents.
| Name | Description |
|---|---|
name - String! | Name of the new file. Example: "foo.txt" |
contents - String! | Contents of the new file. Example: "Hello world!" |
permissions - Int | Permissions of the new file. Example: 0600. Default = 420 |
query {
file(id: "eyJsbGIiOnsiZGVmIjpbIklqWVNOQWovLy8vLy8vLy8vLzhCRVAvLy8vLy8vLy8vL3dFcUhBb0VMMlp2YnhDa0F4b0dTR1ZzYkc4aEtQLy8vLy8vLy8vLy93RlNBRm9BIiwiQ2trS1IzTm9ZVEkxTmpwak1EQTVPV1U1TURrNFpEVmlObUkyWVdWaFpXWXpObVpsTnpsaU9UUTVOVEF4TnpoalptRmpPRGxsWVdKbE5XRmtZbUprTkdZeFptWXdNV0l3TkdWbSJdLCJtZXRhZGF0YSI6eyJzaGEyNTY6NWNjOGQ1M2VkZTRjYzUyODQ0OTIyYWFhZDlhYjIzMzc3MzY3NWMwMDJjOTM5NGZhYTk0OTg1OTZmNGFjMWRiNiI6eyJjYXBzIjp7ImNvbnN0cmFpbnRzIjp0cnVlLCJwbGF0Zm9ybSI6dHJ1ZX19LCJzaGEyNTY6YzAwOTllOTA5OGQ1YjZiNmFlYWVmMzZmZTc5Yjk0OTUwMTc4Y2ZhYzg5ZWFiZTVhZGJiZDRmMWZmMDFiMDRlZiI6eyJjYXBzIjp7ImZpbGUuYmFzZSI6dHJ1ZX19fSwiU291cmNlIjp7ImxvY2F0aW9ucyI6eyJzaGEyNTY6YzAwOTllOTA5OGQ1YjZiNmFlYWVmMzZmZTc5Yjk0OTUwMTc4Y2ZhYzg5ZWFiZTVhZGJiZDRmMWZmMDFiMDRlZiI6e319fX0sImZpbGUiOiJmb28iLCJwbGF0Zm9ybSI6eyJhcmNoaXRlY3R1cmUiOiIiLCJvcyI6IiJ9fQ==") {
contents
export(path: "greeting")
}
}
functionCreates a function.
| Name | Description |
|---|---|
name - String! | Name of the function, in its original format from the implementation language. |
returnType - TypeDefID! | Return type of the function. |
generatedCodeCreate a code generation result, given a directory containing the generated code.
| Name | Description |
|---|---|
code - DirectoryID! |
gitQueries a Git repository.
| Name | Description |
|---|---|
url - String! |
URL of the git repository.
Can be formatted as https://{host}/{owner}/{repo}, git@{host}:{owner}/{repo}.
Suffix ".git" is optional.
|
| keepGitDir - Boolean | DEPRECATED: Set to true to keep .git directory. Default = true |
| sshKnownHosts - String | Set SSH known hosts. Default = "" |
| sshAuthSocket - SocketID | Set SSH auth socket |
| httpAuthUsername - String | Username used to populate the password during basic HTTP Authorization. Default = "" |
| httpAuthToken - SecretID | Secret used to populate the password during basic HTTP Authorization |
| httpAuthHeader - SecretID | Secret used to populate the Authorization HTTP header |
| experimentalServiceHost - ServiceID | A service which must be started before the repo is fetched. |
query {
git(url: "https://github.com/dagger/dagger", keepGitDir: true) {
branch(name: "main") {
tree {
file(path: ".git/refs/heads/main") {
contents
}
}
}
}
}
hostQueries the host environment.
query {
host {
read: directory(path: ".") {
file(path: ".markdownlint.yaml") {
contents
}
}
home: envVariable(name: "HOME") {
value
}
pwd: envVariable(name: "PWD") {
value
}
write: directory(path: ".") {
withNewFile(path: "greeting", contents: "Hello Dagger!") {
export(path: ".")
}
}
}
}
httpReturns a file containing an http remote url content.
| Name | Description |
|---|---|
url - String! | HTTP url to get the content from (e.g., "https://docs.dagger.io"). |
name - String | File name to use for the file. Defaults to the last part of the URL. |
permissions - Int | Permissions to set on the file. |
authHeader - SecretID | Secret used to populate the Authorization HTTP header |
experimentalServiceHost - ServiceID | A service which must be started before the URL is fetched. |
query {
http(url: "http://dagger.io") {
size
contents
}
}
idA unique identifier for this Query.
jsonInitialize a JSON value
llmInitialize a Large Language Model (LLM)
| Name | Description |
|---|---|
model - String | Model to use |
maxAPICalls - Int | Cap the number of API calls for this LLM |
loadAddressFromIDLoad a Address from its ID.
| Name | Description |
|---|---|
id - AddressID! |
loadBindingFromIDLoad a Binding from its ID.
| Name | Description |
|---|---|
id - BindingID! |
loadCacheVolumeFromIDLoad a CacheVolume from its ID.
| Name | Description |
|---|---|
id - CacheVolumeID! |
loadChangesetFromIDLoad a Changeset from its ID.
| Name | Description |
|---|---|
id - ChangesetID! |
loadCheckFromIDLoad a Check from its ID.
| Name | Description |
|---|---|
id - CheckID! |
loadCheckGroupFromIDLoad a CheckGroup from its ID.
| Name | Description |
|---|---|
id - CheckGroupID! |
loadCloudFromIDLoad a Cloud from its ID.
| Name | Description |
|---|---|
id - CloudID! |
loadContainerFromIDLoad a Container from its ID.
| Name | Description |
|---|---|
id - ContainerID! |
loadCurrentModuleFromIDLoad a CurrentModule from its ID.
| Name | Description |
|---|---|
id - CurrentModuleID! |
loadDiffStatFromIDLoad a DiffStat from its ID.
| Name | Description |
|---|---|
id - DiffStatID! |
loadDirectoryFromIDLoad a Directory from its ID.
| Name | Description |
|---|---|
id - DirectoryID! |
loadEngineCacheEntryFromIDLoad a EngineCacheEntry from its ID.
| Name | Description |
|---|---|
id - EngineCacheEntryID! |
loadEngineCacheEntrySetFromIDLoad a EngineCacheEntrySet from its ID.
| Name | Description |
|---|---|
id - EngineCacheEntrySetID! |
loadEngineCacheFromIDLoad a EngineCache from its ID.
| Name | Description |
|---|---|
id - EngineCacheID! |
loadEngineFromIDLoad a Engine from its ID.
| Name | Description |
|---|---|
id - EngineID! |
loadEnumTypeDefFromIDLoad a EnumTypeDef from its ID.
| Name | Description |
|---|---|
id - EnumTypeDefID! |
loadEnumValueTypeDefFromIDLoad a EnumValueTypeDef from its ID.
| Name | Description |
|---|---|
id - EnumValueTypeDefID! |
loadEnvFileFromIDLoad a EnvFile from its ID.
| Name | Description |
|---|---|
id - EnvFileID! |
loadEnvFromIDLoad a Env from its ID.
| Name | Description |
|---|---|
id - EnvID! |
loadEnvVariableFromIDLoad a EnvVariable from its ID.
| Name | Description |
|---|---|
id - EnvVariableID! |
loadErrorFromIDLoad a Error from its ID.
| Name | Description |
|---|---|
id - ErrorID! |
loadErrorValueFromIDLoad a ErrorValue from its ID.
| Name | Description |
|---|---|
id - ErrorValueID! |
loadFieldTypeDefFromIDLoad a FieldTypeDef from its ID.
| Name | Description |
|---|---|
id - FieldTypeDefID! |
loadFileFromIDLoad a File from its ID.
| Name | Description |
|---|---|
id - FileID! |
loadFunctionArgFromIDLoad a FunctionArg from its ID.
| Name | Description |
|---|---|
id - FunctionArgID! |
loadFunctionCallArgValueFromIDLoad a FunctionCallArgValue from its ID.
| Name | Description |
|---|---|
id - FunctionCallArgValueID! |
loadFunctionCallFromIDLoad a FunctionCall from its ID.
| Name | Description |
|---|---|
id - FunctionCallID! |
loadFunctionFromIDLoad a Function from its ID.
| Name | Description |
|---|---|
id - FunctionID! |
loadGeneratedCodeFromIDLoad a GeneratedCode from its ID.
| Name | Description |
|---|---|
id - GeneratedCodeID! |
loadGeneratorFromIDLoad a Generator from its ID.
| Name | Description |
|---|---|
id - GeneratorID! |
loadGeneratorGroupFromIDLoad a GeneratorGroup from its ID.
| Name | Description |
|---|---|
id - GeneratorGroupID! |
loadGitRefFromIDLoad a GitRef from its ID.
| Name | Description |
|---|---|
id - GitRefID! |
loadGitRepositoryFromIDLoad a GitRepository from its ID.
| Name | Description |
|---|---|
id - GitRepositoryID! |
loadHealthcheckConfigFromIDLoad a HealthcheckConfig from its ID.
| Name | Description |
|---|---|
id - HealthcheckConfigID! |
loadHostFromIDLoad a Host from its ID.
| Name | Description |
|---|---|
id - HostID! |
loadInputTypeDefFromIDLoad a InputTypeDef from its ID.
| Name | Description |
|---|---|
id - InputTypeDefID! |
loadInterfaceTypeDefFromIDLoad a InterfaceTypeDef from its ID.
| Name | Description |
|---|---|
id - InterfaceTypeDefID! |
loadJSONValueFromIDLoad a JSONValue from its ID.
| Name | Description |
|---|---|
id - JSONValueID! |
loadLLMFromIDLoad a LLM from its ID.
| Name | Description |
|---|---|
id - LLMID! |
loadLLMTokenUsageFromIDLoad a LLMTokenUsage from its ID.
| Name | Description |
|---|---|
id - LLMTokenUsageID! |
loadLabelFromIDLoad a Label from its ID.
| Name | Description |
|---|---|
id - LabelID! |
loadListTypeDefFromIDLoad a ListTypeDef from its ID.
| Name | Description |
|---|---|
id - ListTypeDefID! |
loadModuleConfigClientFromIDLoad a ModuleConfigClient from its ID.
| Name | Description |
|---|---|
id - ModuleConfigClientID! |
loadModuleFromIDLoad a Module from its ID.
| Name | Description |
|---|---|
id - ModuleID! |
loadModuleSourceFromIDLoad a ModuleSource from its ID.
| Name | Description |
|---|---|
id - ModuleSourceID! |
loadObjectTypeDefFromIDLoad a ObjectTypeDef from its ID.
| Name | Description |
|---|---|
id - ObjectTypeDefID! |
loadPortFromIDLoad a Port from its ID.
| Name | Description |
|---|---|
id - PortID! |
loadQueryFromIDLoad a Query from its ID.
| Name | Description |
|---|---|
id - QueryID! |
loadSDKConfigFromIDLoad a SDKConfig from its ID.
| Name | Description |
|---|---|
id - SDKConfigID! |
loadScalarTypeDefFromIDLoad a ScalarTypeDef from its ID.
| Name | Description |
|---|---|
id - ScalarTypeDefID! |
loadSearchResultFromIDLoad a SearchResult from its ID.
| Name | Description |
|---|---|
id - SearchResultID! |
loadSearchSubmatchFromIDLoad a SearchSubmatch from its ID.
| Name | Description |
|---|---|
id - SearchSubmatchID! |
loadSecretFromIDLoad a Secret from its ID.
| Name | Description |
|---|---|
id - SecretID! |
loadServiceFromIDLoad a Service from its ID.
| Name | Description |
|---|---|
id - ServiceID! |
loadSocketFromIDLoad a Socket from its ID.
| Name | Description |
|---|---|
id - SocketID! |
loadSourceMapFromIDLoad a SourceMap from its ID.
| Name | Description |
|---|---|
id - SourceMapID! |
loadStatFromIDLoad a Stat from its ID.
| Name | Description |
|---|---|
id - StatID! |
loadTerminalFromIDLoad a Terminal from its ID.
| Name | Description |
|---|---|
id - TerminalID! |
loadTypeDefFromIDLoad a TypeDef from its ID.
| Name | Description |
|---|---|
id - TypeDefID! |
loadUpFromIDLoad a Up from its ID.
| Name | Description |
|---|---|
id - UpID! |
loadUpGroupFromIDLoad a UpGroup from its ID.
| Name | Description |
|---|---|
id - UpGroupID! |
loadWorkspaceFromIDLoad a Workspace from its ID.
| Name | Description |
|---|---|
id - WorkspaceID! |
moduleCreate a new module.
moduleSourceCreate a new module source instance from a source ref string
| Name | Description |
|---|---|
refString - String! | The string ref representation of the module source |
refPin - String | The pinned version of the module source. Default = "" |
disableFindUp - Boolean | If true, do not attempt to find dagger.json in a parent directory of the provided path. Only relevant for local module sources. Default = false |
allowNotExists - Boolean | If true, do not error out if the provided ref string is a local path and does not exist yet. Useful when initializing new modules in directories that don't exist yet. Default = false |
requireKind - ModuleSourceKind | If set, error out if the ref string is not of the provided requireKind. |
secretCreates a new secret.
| Name | Description |
|---|---|
uri - String! | The URI of the secret store |
cacheKey - String |
If set, the given string will be used as the cache key for this secret. This means that any secrets with the same cache key will be considered equivalent in terms of cache lookups, even if they have different URIs or plaintext values.
For example, two secrets with the same cache key provided as secret env vars to other wise equivalent containers will result in the container withExecs hitting the cache for each other.
If not set, the cache key for the secret will be derived from its plaintext value as looked up when the secret is constructed.
|
query {
secret(id: "eyJob3N0X2VudiI6IkhPTUUifQ==") {
plaintext
}
}
setSecretSets a secret given a user defined name to its plaintext and returns the secret.
The plaintext value is limited to a size of 128000 bytes.
| Name | Description |
|---|---|
name - String! | The user defined name for this secret |
plaintext - String! | The plaintext of the secret |
sourceMapCreates source map metadata.
| Name | Description |
|---|---|
filename - String! | The filename from the module source. |
line - Int! | The line number within the filename. |
column - Int! | The column number within the line. |
typeDefCreate a new TypeDef.
versionGet the current Dagger Engine version.
A standardized address to load containers, directories, secrets, and other object types. Address format depends on the type, and is validated at type selection.
| Field Name | Description |
|---|---|
container - Container! | Load a container from the address. |
directory - Directory! | Load a directory from the address. |
exclude - [String!]include - [String!]gitignore - BooleannoCache - Boolean|
| file - File! | Load a file from the address. |
|
exclude - [String!]include - [String!]gitignore - BooleannoCache - Boolean|
| gitRef - GitRef! | Load a git ref (branch, tag or commit) from the address. |
| gitRepository - GitRepository! | Load a git repository from the address. |
| id - AddressID! | A unique identifier for this Address. |
| secret - Secret! | Load a secret from the address. |
| service - Service! | Load a service from the address. |
| socket - Socket! | Load a local socket from the address. |
| value - String! | The address value |
The AddressID scalar type represents an identifier for an object of type Address.
| Field Name | Description |
|---|---|
asAddress - Address! | Retrieve the binding value, as type Address |
asCacheVolume - CacheVolume! | Retrieve the binding value, as type CacheVolume |
asChangeset - Changeset! | Retrieve the binding value, as type Changeset |
asCheck - Check! | Retrieve the binding value, as type Check |
asCheckGroup - CheckGroup! | Retrieve the binding value, as type CheckGroup |
asCloud - Cloud! | Retrieve the binding value, as type Cloud |
asContainer - Container! | Retrieve the binding value, as type Container |
asDiffStat - DiffStat! | Retrieve the binding value, as type DiffStat |
asDirectory - Directory! | Retrieve the binding value, as type Directory |
asEnv - Env! | Retrieve the binding value, as type Env |
asEnvFile - EnvFile! | Retrieve the binding value, as type EnvFile |
asFile - File! | Retrieve the binding value, as type File |
asGenerator - Generator! | Retrieve the binding value, as type Generator |
asGeneratorGroup - GeneratorGroup! | Retrieve the binding value, as type GeneratorGroup |
asGitRef - GitRef! | Retrieve the binding value, as type GitRef |
asGitRepository - GitRepository! | Retrieve the binding value, as type GitRepository |
asJSONValue - JSONValue! | Retrieve the binding value, as type JSONValue |
asModule - Module! | Retrieve the binding value, as type Module |
asModuleConfigClient - ModuleConfigClient! | Retrieve the binding value, as type ModuleConfigClient |
asModuleSource - ModuleSource! | Retrieve the binding value, as type ModuleSource |
asSearchResult - SearchResult! | Retrieve the binding value, as type SearchResult |
asSearchSubmatch - SearchSubmatch! | Retrieve the binding value, as type SearchSubmatch |
asSecret - Secret! | Retrieve the binding value, as type Secret |
asService - Service! | Retrieve the binding value, as type Service |
asSocket - Socket! | Retrieve the binding value, as type Socket |
asStat - Stat | Retrieve the binding value, as type Stat |
asString - String | Returns the binding's string value |
asUp - Up! | Retrieve the binding value, as type Up |
asUpGroup - UpGroup! | Retrieve the binding value, as type UpGroup |
asWorkspace - Workspace! | Retrieve the binding value, as type Workspace |
digest - String! | Returns the digest of the binding value |
id - BindingID! | A unique identifier for this Binding. |
isNull - Boolean! | Returns true if the binding is null |
name - String! | Returns the binding name |
typeName - String! | Returns the binding type |
The BindingID scalar type represents an identifier for an object of type Binding.
The Boolean scalar type represents true or false.
Key value object that represents a build argument.
| Input Field | Description |
|---|---|
name - String! | The build argument name. |
value - String! | The build argument value. |
{
"name": "abc123",
"value": "abc123"
}
Sharing mode of the cache volume.
| Enum Value | Description |
|---|---|
SHARED
| Shares the cache volume amongst many build pipelines | |
PRIVATE
| Keeps a cache volume for a single build pipeline | |
LOCKED
| Shares the cache volume amongst many build pipelines, but will serialize the writes |
"SHARED"
A directory whose contents persist across runs.
| Field Name | Description |
|---|---|
id - CacheVolumeID! | A unique identifier for this CacheVolume. |
The CacheVolumeID scalar type represents an identifier for an object of type CacheVolume.
A comparison between two directories representing changes that can be applied.
| Field Name | Description |
|---|---|
addedPaths - [String!]! | Files and directories that were added in the newer directory. |
after - Directory! | The newer/upper snapshot. |
asPatch - File! | Return a Git-compatible patch of the changes |
before - Directory! | The older/lower snapshot to compare against. |
diffStats - [DiffStat!]! | Structured per-path diff statistics (kind and line counts) for this changeset. |
export - String! | Applies the diff represented by this changeset to a path on the host. |
path - String!Location of the copied directory (e.g., "logs/").
|
| id - ChangesetID! | A unique identifier for this Changeset. |
| isEmpty - Boolean! | Returns true if the changeset is empty (i.e. there are no changes). |
| layer - Directory! | Return a snapshot containing only the created and modified files |
| modifiedPaths - [String!]! | Files and directories that existed before and were updated in the newer directory. |
| removedPaths - [String!]! | Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included. |
| sync - ChangesetID! | Force evaluation in the engine. |
| withChangeset - Changeset! |
Add changes to an existing changeset
By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument
| |
changes - ChangesetID!Changes to merge into the actual changeset
onConflict - ChangesetMergeConflictWhat to do on a merge conflict
|
| withChangesets - Changeset! |
Add changes from multiple changesets using git octopus merge strategy
This is more efficient than chaining multiple withChangeset calls when merging many changesets.
Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).
| |
changes - [ChangesetID!]!List of changesets to merge into the actual changeset
onConflict - ChangesetsMergeConflictWhat to do on a merge conflict
|
The ChangesetID scalar type represents an identifier for an object of type Changeset.
Strategy to use when merging changesets with conflicting changes.
| Enum Value | Description |
|---|---|
FAIL_EARLY
| Fail before attempting merge if file-level conflicts are detected | |
FAIL
| Attempt the merge and fail if git merge fails due to conflicts | |
LEAVE_CONFLICT_MARKERS
| Let git create conflict markers in files. For modify/delete conflicts, keeps the modified version. Fails on binary conflicts. | |
PREFER_OURS
| The conflict is resolved by applying the version of the calling changeset | |
PREFER_THEIRS
| The conflict is resolved by applying the version of the other changeset |
"FAIL_EARLY"
Strategy to use when merging multiple changesets with git octopus merge.
| Enum Value | Description |
|---|---|
FAIL_EARLY
| Fail before attempting merge if file-level conflicts are detected between any changesets | |
FAIL
| Attempt the octopus merge and fail if git merge fails due to conflicts |
"FAIL_EARLY"
| Field Name | Description |
|---|---|
completed - Boolean! | Whether the check completed |
description - String! | The description of the check |
error - Error | If the check failed, this is the error |
id - CheckID! | A unique identifier for this Check. |
name - String! | Return the fully qualified name of the check |
originalModule - Module! | The original module in which the check has been defined |
passed - Boolean! | Whether the check passed |
path - [String!]! | The path of the check within its module |
resultEmoji - String! | An emoji representing the result of the check |
run - Check! | Execute the check |
| Field Name | Description |
|---|---|
id - CheckGroupID! | A unique identifier for this CheckGroup. |
list - [Check!]! | Return a list of individual checks and their details |
report - File! | Generate a markdown report |
run - CheckGroup! | Execute all selected checks |
failFast - BooleanIf true, stop running checks as soon as any check fails.
|
The CheckGroupID scalar type represents an identifier for an object of type CheckGroup.
The CheckID scalar type represents an identifier for an object of type Check.
Dagger Cloud configuration and state
| Field Name | Description |
|---|---|
id - CloudID! | A unique identifier for this Cloud. |
traceURL - String! | The trace URL for the current session |
The CloudID scalar type represents an identifier for an object of type Cloud.
An OCI-compatible container, also known as a Docker container.
| Field Name | Description |
|---|---|
asService - Service! |
Turn the container into a Service.
Be sure to set any exposed ports before this conversion.
| |
args - [String!]Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
If empty, the container's default command is used.
useEntrypoint - BooleanIf the container has an entrypoint, prepend it to the args.
experimentalPrivilegedNesting - BooleanProvides Dagger access to the executed command.
insecureRootCapabilities - BooleanExecute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
expand - BooleanReplace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
noInit - BooleanIf set, skip the automatic init process injected into containers by default.
This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
|
| asTarball - File! | Package the container state as an OCI image, and return it as a tar archive |
|
platformVariants - [ContainerID!]Identifiers for other platform specific containers.
Used for multi-platform images.
forcedCompression - ImageLayerCompressionForce each layer of the image to use the specified compression algorithm.
If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
mediaTypes - ImageMediaTypesUse the specified media types for the image's layers.
Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
| combinedOutput - String! |
The combined buffered standard output and standard error stream of the last executed command
Returns an error if no command was executed
|
| defaultArgs - [String!]! | Return the container's default arguments. |
| directory - Directory! |
Retrieve a directory from the container's root filesystem
Mounts are included.
| |
path - String!The path of the directory to retrieve (e.g., "./src").
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| dockerHealthcheck - HealthcheckConfig | Retrieves this container's configured docker healthcheck. |
| entrypoint - [String!]! | Return the container's OCI entrypoint. |
| envVariable - String | Retrieves the value of the specified environment variable. |
|
name - String!The name of the environment variable to retrieve (e.g., "PATH").
|
| envVariables - [EnvVariable!]! | Retrieves the list of environment variables passed to commands. |
| exists - Boolean! | check if a file or directory exists |
|
path - String!Path to check (e.g., "/file.txt").
expectedType - ExistsTypeIf specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
doNotFollowSymlinks - BooleanIf specified, do not follow symlinks.
The exit code of the last executed command
Returns an error if no command was executed
|
| experimentalWithAllGPUs - Container! |
EXPERIMENTAL API! Subject to change/removal at any time.
Configures all available GPUs on the host to be accessible to this container.
This currently works for Nvidia devices only.
|
| experimentalWithGPU - Container! |
EXPERIMENTAL API! Subject to change/removal at any time.
Configures the provided list of devices to be accessible to this container.
This currently works for Nvidia devices only.
| |
devices - [String!]!List of devices to be accessible to this container.
Writes the container as an OCI tarball to the destination file path on the host.
It can also export platform variants.
| |
path - String!Host's destination path (e.g., "./tarball").
Path can be relative to the engine's workdir or absolute.
platformVariants - [ContainerID!]Identifiers for other platform specific containers.
Used for multi-platform image.
forcedCompression - ImageLayerCompressionForce each layer of the exported image to use the specified compression algorithm.
If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
mediaTypes - ImageMediaTypesUse the specified media types for the exported image's layers.
Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| exportImage - Void! | Exports the container as an image to the host's container image store. |
|
name - String!Name of image to export to in the host's store
platformVariants - [ContainerID!]Identifiers for other platform specific containers.
Used for multi-platform image.
forcedCompression - ImageLayerCompressionForce each layer of the exported image to use the specified compression algorithm.
If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
mediaTypes - ImageMediaTypesUse the specified media types for the exported image's layers.
Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
|
| exposedPorts - [Port!]! |
Retrieves the list of exposed ports.
This includes ports already exposed by the image, even if not explicitly added with dagger.
Retrieves a file at the given path.
Mounts are included.
| |
path - String!The path of the file to retrieve (e.g., "./README.md").
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
| from - Container! | Download a container image, and apply it to the container state. All previous state will be lost. |
|
address - String!Address of the container image to download, in standard OCI ref format. Example:"registry.dagger.io/engine:latest"
|
| id - ContainerID! | A unique identifier for this Container. |
| imageRef - String! | The unique image reference which can only be retrieved immediately after the 'Container.From' call. |
| import - Container! | Reads the container from an OCI tarball. |
|
source - FileID!File to read the container from.
tag - StringIdentifies the tag to import from the archive, if the archive bundles multiple tags.
|
| label - String | Retrieves the value of the specified label. |
|
name - String!The name of the label (e.g., "org.opencontainers.artifact.created").
|
| labels - [Label!]! | Retrieves the list of labels passed to container. |
| mounts - [String!]! | Retrieves the list of paths where a directory is mounted. |
| platform - Platform! | The platform this container executes and publishes as. |
| publish - String! |
Package the container state as an OCI image, and publish it to a registry
Returns the fully qualified address of the published image, with digest
| |
address - String!The OCI address to publish to
Same format as "docker push". Example: "registry.example.com/user/repo:tag"
platformVariants - [ContainerID!]Identifiers for other platform specific containers.
Used for multi-platform image.
forcedCompression - ImageLayerCompressionForce each layer of the published image to use the specified compression algorithm.
If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
mediaTypes - ImageMediaTypesUse the specified media types for the published image's layers.
Defaults to "OCI", which is compatible with most recent registries, but "Docker" may be needed for older registries without OCI support.
|
| rootfs - Directory! | Return a snapshot of the container's root filesystem. The snapshot can be modified then written back using withRootfs. Use that method for filesystem modifications. |
| stat - Stat | Return file status |
|
path - String!Path to check (e.g., "/file.txt").
doNotFollowSymlinks - BooleanIf specified, do not follow symlinks.
The buffered standard error stream of the last executed command
Returns an error if no command was executed
The buffered standard output stream of the last executed command
Returns an error if no command was executed
|
| sync - ContainerID! |
Forces evaluation of the pipeline in the engine.
It doesn't run the default command if no exec has been set.
|
| terminal - Container! | Opens an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default). |
|
cmd - [String!]If set, override the container's default terminal command and invoke these command arguments instead.
experimentalPrivilegedNesting - BooleanProvides Dagger access to the executed command.
insecureRootCapabilities - BooleanExecute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
Starts a Service and creates a tunnel that forwards traffic from the caller's network to that service.
Be sure to set any exposed ports before calling this api.
| |
random - BooleanBind each tunnel port to a random port on the host.
ports - [PortForward!]List of frontend/backend port mappings to forward.
Frontend is the port accepting traffic on the host, backend is the service port.
args - [String!]Command to run instead of the container's default command (e.g., ["go", "run", "main.go"]).
If empty, the container's default command is used.
useEntrypoint - BooleanIf the container has an entrypoint, prepend it to the args.
experimentalPrivilegedNesting - BooleanProvides Dagger access to the executed command.
insecureRootCapabilities - BooleanExecute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
expand - BooleanReplace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
noInit - BooleanIf set, skip the automatic init process injected into containers by default.
This should only be used if the user requires that their exec process be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
|
| user - String! | Retrieves the user to be set for all commands. |
| withAnnotation - Container! | Retrieves this container plus the given OCI annotation. |
|
name - String!The name of the annotation.
value - String!The value of the annotation.
|
| withDefaultArgs - Container! | Configures default arguments for future commands. Like CMD in Dockerfile. |
|
args - [String!]!Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
|
| withDefaultTerminalCmd - Container! | Set the default command to invoke for the container's terminal API. |
|
args - [String!]!The args of the command.
experimentalPrivilegedNesting - BooleanProvides Dagger access to the executed command.
insecureRootCapabilities - BooleanExecute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
|
| withDirectory - Container! | Return a new container snapshot, with a directory added to its filesystem |
|
path - String!Location of the written directory (e.g., "/tmp/directory").
source - DirectoryID!Identifier of the directory to write
exclude - [String!]Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
include - [String!]Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
gitignore - BooleanApply .gitignore rules when writing the directory.
owner - StringA user:group to set for the directory and its contents.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withDockerHealthcheck - Container! | Retrieves this container with the specificed docker healtcheck command set. |
|
args - [String!]!Healthcheck command to execute. Example: ["go", "run", "main.go"].
shell - BooleanWhen true, command must be a single element, which is run using the container's shell
interval - StringInterval between running healthcheck. Example: "30s"
timeout - StringHealthcheck timeout. Example: "3s"
startPeriod - StringStartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example: "0s"
startInterval - StringStartInterval configures the duration between checks during the startup phase. Example: "5s"
retries - IntThe maximum number of consecutive failures before the container is marked as unhealthy. Example: "3"
|
| withEntrypoint - Container! | Set an OCI-style entrypoint. It will be included in the container's OCI configuration. Note, withExec ignores the entrypoint by default. |
|
args - [String!]!Arguments of the entrypoint. Example: ["go", "run"].
keepDefaultArgs - BooleanDon't reset the default arguments when setting the entrypoint. By default it is reset, since entrypoint and default args are often tightly coupled.
|
| withEnvFileVariables - Container! | Export environment variables from an env-file to the container. |
|
source - EnvFileID!Identifier of the envfile
|
| withEnvVariable - Container! | Set a new environment variable in the container. |
|
name - String!Name of the environment variable (e.g., "HOST").
value - String!Value of the environment variable. (e.g., "localhost").
expand - BooleanReplace "${VAR}" or "$VAR" in the value according to the current environment variables defined in the container (e.g. "/opt/bin:$PATH").
|
| withError - Container! | Raise an error. |
|
err - String!Message of the error to raise. If empty, the error will be ignored.
|
| withExec - Container! | Execute a command in the container, and return a new snapshot of the container state after execution. |
|
args - [String!]!Command to execute. Must be valid exec() arguments, not a shell command. Example: ["go", "run", "main.go"].
To run a shell command, execute the shell and pass the shell command as argument. Example: ["sh", "-c", "ls -l | grep foo"]
Defaults to the container's default arguments (see "defaultArgs" and "withDefaultArgs").
useEntrypoint - BooleanApply the OCI entrypoint, if present, by prepending it to the args. Ignored by default.
stdin - StringContent to write to the command's standard input. Example: "Hello world")
redirectStdin - StringRedirect the command's standard input from a file in the container. Example: "./stdin.txt"
redirectStdout - StringRedirect the command's standard output to a file in the container. Example: "./stdout.txt"
redirectStderr - StringRedirect the command's standard error to a file in the container. Example: "./stderr.txt"
expect - ReturnTypeExit codes this command is allowed to exit with without error
experimentalPrivilegedNesting - BooleanProvides Dagger access to the executed command.
insecureRootCapabilities - BooleanExecute the command with all root capabilities. Like --privileged in Docker
DANGER: this grants the command full access to the host system. Only use when 1) you trust the command being executed and 2) you specifically need this level of access.
expand - BooleanReplace "${VAR}" or "$VAR" in the args according to the current environment variables defined in the container (e.g. "/$VAR/foo").
noInit - BooleanSkip the automatic init process injected into containers by default.
Only use this if you specifically need the command to be pid 1 in the container. Otherwise it may result in unexpected behavior. If you're not sure, you don't need this.
|
| withExposedPort - Container! |
Expose a network port. Like EXPOSE in Dockerfile (but with healthcheck support)
Exposed ports serve two purposes:
For health checks and introspection, when running services
For setting the EXPOSE OCI field when publishing the container
| |
port - Int!Port number to expose. Example: 8080
protocol - NetworkProtocolNetwork protocol. Example: "tcp"
description - StringPort description. Example: "payment API endpoint"
experimentalSkipHealthcheck - BooleanSkip the health check when run as a service.
|
| withFile - Container! | Return a container snapshot with a file added |
|
path - String!Path of the new file. Example: "/path/to/new-file.txt"
source - FileID!File to add
permissions - IntPermissions of the new file. Example: 0600
owner - StringA user:group to set for the file.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
| withFiles - Container! | Retrieves this container plus the contents of the given files copied to the given path. |
|
path - String!Location where copied files should be placed (e.g., "/src").
sources - [FileID!]!Identifiers of the files to copy.
permissions - IntPermission given to the copied files (e.g., 0600).
owner - StringA user:group to set for the files.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
| withLabel - Container! | Retrieves this container plus the given label. |
|
name - String!The name of the label (e.g., "org.opencontainers.artifact.created").
value - String!The value of the label (e.g., "2023-01-01T00:00:00Z").
|
| withMountedCache - Container! | Retrieves this container plus a cache volume mounted at the given path. |
|
path - String!Location of the cache directory (e.g., "/root/.npm").
cache - CacheVolumeID!Identifier of the cache volume to mount.
source - DirectoryIDIdentifier of the directory to use as the cache volume's root.
sharing - CacheSharingModeSharing mode of the cache volume.
owner - StringA user:group to set for the mounted cache directory.
Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withMountedDirectory - Container! | Retrieves this container plus a directory mounted at the given path. |
|
path - String!Location of the mounted directory (e.g., "/mnt/directory").
source - DirectoryID!Identifier of the mounted directory.
owner - StringA user:group to set for the mounted directory and its contents.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withMountedFile - Container! | Retrieves this container plus a file mounted at the given path. |
|
path - String!Location of the mounted file (e.g., "/tmp/file.txt").
source - FileID!Identifier of the mounted file.
owner - StringA user or user:group to set for the mounted file.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
| withMountedSecret - Container! | Retrieves this container plus a secret mounted into a file at the given path. |
|
path - String!Location of the secret file (e.g., "/tmp/secret.txt").
source - SecretID!Identifier of the secret to mount.
owner - StringA user:group to set for the mounted secret.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
mode - IntPermission given to the mounted secret (e.g., 0600).
This option requires an owner to be set to be active.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withMountedTemp - Container! | Retrieves this container plus a temporary directory mounted at the given path. Any writes will be ephemeral to a single withExec call; they will not be persisted to subsequent withExecs. |
|
path - String!Location of the temporary directory (e.g., "/tmp/temp_dir").
size - IntSize of the temporary directory in bytes.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withNewFile - Container! | Return a new container snapshot, with a file added to its filesystem with text content |
|
path - String!Path of the new file. May be relative or absolute. Example: "README.md" or "/etc/profile"
contents - String!Contents of the new file. Example: "Hello world!"
permissions - IntPermissions of the new file. Example: 0600
owner - StringA user:group to set for the file.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
| withRegistryAuth - Container! | Attach credentials for future publishing to a registry. Use in combination with publish |
|
address - String!The image address that needs authentication. Same format as "docker push". Example: "registry.dagger.io/dagger:latest"
username - String!The username to authenticate with. Example: "alice"
secret - SecretID!The API key, password or token to authenticate to this registry
|
| withRootfs - Container! | Change the container's root filesystem. The previous root filesystem will be lost. |
|
directory - DirectoryID!The new root filesystem.
|
| withSecretVariable - Container! | Set a new environment variable, using a secret value |
|
name - String!Name of the secret variable (e.g., "API_SECRET").
secret - SecretID!Identifier of the secret value.
|
| withServiceBinding - Container! |
Establish a runtime dependency from a container to a network service.
The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.
The service will be reachable from the container via the provided hostname alias.
The service dependency will also convey to any files or directories produced by the container.
| |
alias - String!Hostname that will resolve to the target service (only accessible from within this container)
service - ServiceID!The target service
|
| withSymlink - Container! | Return a snapshot with a symlink |
|
target - String!Location of the file or directory to link to (e.g., "/existing/file").
linkName - String!Location where the symbolic link will be created (e.g., "/new-file-link").
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
| withUnixSocket - Container! | Retrieves this container plus a socket forwarded to the given Unix socket path. |
|
path - String!Location of the forwarded Unix socket (e.g., "/tmp/socket").
source - SocketID!Identifier of the socket to forward.
owner - StringA user:group to set for the mounted socket.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withUser - Container! | Retrieves this container with a different command user. |
|
name - String!The user to set (e.g., "root").
|
| withWorkdir - Container! | Change the container's working directory. Like WORKDIR in Dockerfile. |
|
path - String!The path to set as the working directory (e.g., "/app").
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withoutAnnotation - Container! | Retrieves this container minus the given OCI annotation. |
|
name - String!The name of the annotation.
|
| withoutDefaultArgs - Container! | Remove the container's default arguments. |
| withoutDirectory - Container! | Return a new container snapshot, with a directory removed from its filesystem |
|
path - String!Location of the directory to remove (e.g., ".github/").
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withoutDockerHealthcheck - Container! | Retrieves this container without a configured docker healtcheck command. |
| withoutEntrypoint - Container! | Reset the container's OCI entrypoint. |
|
keepDefaultArgs - BooleanDon't remove the default arguments when unsetting the entrypoint.
|
| withoutEnvVariable - Container! | Retrieves this container minus the given environment variable. |
|
name - String!The name of the environment variable (e.g., "HOST").
|
| withoutExposedPort - Container! | Unexpose a previously exposed port. |
|
port - Int!Port number to unexpose
protocol - NetworkProtocolPort protocol to unexpose
|
| withoutFile - Container! | Retrieves this container with the file at the given path removed. |
|
path - String!Location of the file to remove (e.g., "/file.txt").
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
| withoutFiles - Container! | Return a new container spanshot with specified files removed |
|
paths - [String!]!Paths of the files to remove. Example: ["foo.txt, "/root/.ssh/config"
expand - BooleanReplace "${VAR}" or "$VAR" in the value of paths according to the current environment variables defined in the container (e.g. "/$VAR/foo.txt").
|
| withoutLabel - Container! | Retrieves this container minus the given environment label. |
|
name - String!The name of the label to remove (e.g., "org.opencontainers.artifact.created").
|
| withoutMount - Container! | Retrieves this container after unmounting everything at the given path. |
|
path - String!Location of the cache directory (e.g., "/root/.npm").
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withoutRegistryAuth - Container! | Retrieves this container without the registry authentication of a given address. |
|
address - String!Registry's address to remove the authentication from.
Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
|
| withoutSecretVariable - Container! | Retrieves this container minus the given environment variable containing the secret. |
|
name - String!The name of the environment variable (e.g., "HOST").
|
| withoutUnixSocket - Container! | Retrieves this container with a previously added Unix socket removed. |
|
path - String!Location of the socket to remove (e.g., "/tmp/socket").
expand - BooleanReplace "${VAR}" or "$VAR" in the value of path according to the current environment variables defined in the container (e.g. "/$VAR/foo").
|
| withoutUser - Container! |
Retrieves this container with an unset command user.
Should default to root.
|
| withoutWorkdir - Container! |
Unset the container's working directory.
Should default to "/".
|
| workdir - String! | Retrieves the working directory for all commands. |
The ContainerID scalar type represents an identifier for an object of type Container.
Reflective module API provided to functions at runtime.
| Field Name | Description |
|---|---|
dependencies - [Module!]! | The dependencies of the module. |
generatedContextDirectory - Directory! | The generated files and directories made on top of the module source's context directory. |
generators - GeneratorGroup! | Return all generators defined by the module |
include - [String!]Only include generators matching the specified patterns
|
| id - CurrentModuleID! | A unique identifier for this CurrentModule. |
| name - String! | The name of the module being executed in |
| source - Directory! | The directory containing the module's source code loaded into the engine (plus any generated code that may have been created). |
| workdir - Directory! | Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution. |
|
path - String!Location of the directory to access (e.g., ".").
exclude - [String!]Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
include - [String!]Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
gitignore - BooleanApply .gitignore filter rules inside the directory
|
| workdirFile - File! | Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution. |
|
path - String!Location of the file to retrieve (e.g., "README.md").
|
The CurrentModuleID scalar type represents an identifier for an object of type CurrentModule.
| Field Name | Description |
|---|---|
addedLines - Int! | Number of added lines for this path. |
id - DiffStatID! | A unique identifier for this DiffStat. |
kind - DiffStatKind! | Type of change. |
oldPath - String | Previous path of the file, set only for renames. |
path - String! | Path of the changed file or directory. |
removedLines - Int! | Number of removed lines for this path. |
The DiffStatID scalar type represents an identifier for an object of type DiffStat.
The type of change for a diff stat entry.
| Enum Value | Description |
|---|---|
ADDED
| A file or directory was added. | |
MODIFIED
| A file was modified. | |
REMOVED
| A file or directory was removed. | |
RENAMED
| A file was renamed. |
"ADDED"
A directory.
| Field Name | Description |
|---|---|
asGit - GitRepository! | Converts this directory to a local git repository |
asModule - Module! | Load the directory as a Dagger module source |
sourceRootPath - StringAn optional subpath of the directory which contains the module's configuration file.
If not set, the module source code is loaded from the root of the directory.
|
| asModuleSource - ModuleSource! | Load the directory as a Dagger module source |
|
sourceRootPath - StringAn optional subpath of the directory which contains the module's configuration file.
If not set, the module source code is loaded from the root of the directory.
|
| changes - Changeset! |
Return the difference between this directory and another directory, typically an older snapshot.
The difference is encoded as a changeset, which also tracks removed files, and can be applied to other directories.
| |
from - DirectoryID!The base directory snapshot to compare against
|
| chown - Directory! | Change the owner of the directory contents recursively. |
|
path - String!Path of the directory to change ownership of (e.g., "/").
owner - String!A user:group to set for the mounted directory and its contents.
The user and group must be an ID (1000:1000), not a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
|
| diff - Directory! | Return the difference between this directory and an another directory. The difference is encoded as a directory. |
|
other - DirectoryID!The directory to compare against
|
| digest - String! | Return the directory's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine. |
| directory - Directory! | Retrieves a directory at the given path. |
|
path - String!Location of the directory to retrieve. Example: "/src"
|
| dockerBuild - Container! | Use Dockerfile compatibility to build a container from this directory. Only use this function for Dockerfile compatibility. Otherwise use the native Container type directly, it is feature-complete and supports all Dockerfile features. |
|
dockerfile - StringPath to the Dockerfile to use (e.g., "frontend.Dockerfile").
platform - PlatformThe platform to build.
buildArgs - [BuildArg!]Build arguments to use in the build.
target - StringTarget build stage to build.
secrets - [SecretID!]Secrets to pass to the build.
They will be mounted at /run/secrets/[secret-name].
noInit - BooleanIf set, skip the automatic init process injected into containers created by RUN statements.
This should only be used if the user requires that their exec processes be the pid 1 process in the container. Otherwise it may result in unexpected behavior.
ssh - SocketIDA socket to use for SSH authentication during the build
(e.g., for Dockerfile RUN --mount=type=ssh instructions).
Typically obtained via host.unixSocket() pointing to the SSH_AUTH_SOCK.
|
| entries - [String!]! | Returns a list of files and directories at the given path. |
|
path - StringLocation of the directory to look at (e.g., "/src").
|
| exists - Boolean! | check if a file or directory exists |
|
path - String!Path to check (e.g., "/file.txt").
expectedType - ExistsTypeIf specified, also validate the type of file (e.g. "REGULAR_TYPE", "DIRECTORY_TYPE", or "SYMLINK_TYPE").
doNotFollowSymlinks - BooleanIf specified, do not follow symlinks.
|
| export - String! | Writes the contents of the directory to a path on the host. |
|
path - String!Location of the copied directory (e.g., "logs/").
wipe - BooleanIf true, then the host directory will be wiped clean before exporting so that it exactly matches the directory being exported; this means it will delete any files on the host that aren't in the exported dir. If false (the default), the contents of the directory will be merged with any existing contents of the host directory, leaving any existing files on the host that aren't in the exported directory alone.
|
| file - File! | Retrieve a file at the given path. |
|
path - String!Location of the file to retrieve (e.g., "README.md").
|
| filter - Directory! | Return a snapshot with some paths included or excluded |
|
exclude - [String!]If set, paths matching one of these glob patterns is excluded from the new snapshot. Example: ["node_modules/", ".git*", ".env"]
include - [String!]If set, only paths matching one of these glob patterns is included in the new snapshot. Example: (e.g., ["app/", "package.*"]).
gitignore - BooleanIf set, apply .gitignore rules when filtering the directory.
|
| findUp - String | Search up the directory tree for a file or directory, and return its path. If no match, return null |
|
name - String!The name of the file or directory to search for
start - String!The path to start the search from
|
| glob - [String!]! | Returns a list of files and directories that matche the given pattern. |
|
pattern - String!Pattern to match (e.g., "*.md").
|
| id - DirectoryID! | A unique identifier for this Directory. |
| name - String! | Returns the name of the directory. |
| search - [SearchResult!]! |
Searches for content matching the given regular expression or literal string.
Uses Rust regex syntax; escape literal ., [,], {, }, | with backslashes.
| |
paths - [String!]Directory or file paths to search
globs - [String!]Glob patterns to match (e.g., "*.md")
pattern - String!The text to match.
literal - BooleanInterpret the pattern as a literal string instead of a regular expression.
multiline - BooleanEnable searching across multiple lines.
dotall - BooleanAllow the . pattern to match newlines in multiline mode.
insensitive - BooleanEnable case-insensitive matching.
skipIgnored - BooleanHonor .gitignore, .ignore, and .rgignore files.
skipHidden - BooleanSkip hidden files (files starting with .).
filesOnly - BooleanOnly return matching files, not lines and content
limit - IntLimit the number of results to return
|
| stat - Stat | Return file status |
|
path - String!Path to stat (e.g., "/file.txt").
doNotFollowSymlinks - BooleanIf specified, do not follow symlinks.
|
| sync - DirectoryID! | Force evaluation in the engine. |
| terminal - Directory! | Opens an interactive terminal in new container with this directory mounted inside. |
|
container - ContainerIDIf set, override the default container used for the terminal.
cmd - [String!]If set, override the container's default terminal command and invoke these command arguments instead.
experimentalPrivilegedNesting - BooleanProvides Dagger access to the executed command.
insecureRootCapabilities - BooleanExecute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
|
| withChanges - Directory! | Return a directory with changes from another directory applied to it. |
|
changes - ChangesetID!Changes to apply to the directory
|
| withDirectory - Directory! | Return a snapshot with a directory added |
|
path - String!Location of the written directory (e.g., "/src/").
source - DirectoryID!Identifier of the directory to copy.
exclude - [String!]Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
include - [String!]Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
gitignore - BooleanApply .gitignore filter rules inside the directory
owner - StringA user:group to set for the copied directory and its contents.
The user and group must be an ID (1000:1000), not a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
|
| withError - Directory! | Raise an error. |
|
err - String!Message of the error to raise. If empty, the error will be ignored.
|
| withFile - Directory! | Retrieves this directory plus the contents of the given file copied to the given path. |
|
path - String!Location of the copied file (e.g., "/file.txt").
source - FileID!Identifier of the file to copy.
permissions - IntPermission given to the copied file (e.g., 0600).
owner - StringA user:group to set for the copied directory and its contents.
The user and group must be an ID (1000:1000), not a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
|
| withFiles - Directory! | Retrieves this directory plus the contents of the given files copied to the given path. |
|
path - String!Location where copied files should be placed (e.g., "/src").
sources - [FileID!]!Identifiers of the files to copy.
permissions - IntPermission given to the copied files (e.g., 0600).
|
| withNewDirectory - Directory! | Retrieves this directory plus a new directory created at the given path. |
|
path - String!Location of the directory created (e.g., "/logs").
permissions - IntPermission granted to the created directory (e.g., 0777).
|
| withNewFile - Directory! | Return a snapshot with a new file added |
|
path - String!Path of the new file. Example: "foo/bar.txt"
contents - String!Contents of the new file. Example: "Hello world!"
permissions - IntPermissions of the new file. Example: 0600
|
| withPatch - Directory! | Retrieves this directory with the given Git-compatible patch applied. |
|
patch - String!Patch to apply (e.g., "diff --git a/file.txt b/file.txt\nindex 1234567..abcdef8 100644\n--- a/file.txt\n+++ b/file.txt\n@@ -1,1 +1,1 @@\n-Hello\n+World\n").
|
| withPatchFile - Directory! | Retrieves this directory with the given Git-compatible patch file applied. |
|
patch - FileID!File containing the patch to apply
|
| withSymlink - Directory! | Return a snapshot with a symlink |
|
target - String!Location of the file or directory to link to (e.g., "/existing/file").
linkName - String!Location where the symbolic link will be created (e.g., "/new-file-link").
|
| withTimestamps - Directory! | Retrieves this directory with all file/dir timestamps set to the given time. |
|
timestamp - Int!Timestamp to set dir/files in.
Formatted in seconds following Unix epoch (e.g., 1672531199).
|
| withoutDirectory - Directory! | Return a snapshot with a subdirectory removed |
|
path - String!Path of the subdirectory to remove. Example: ".github/workflows"
|
| withoutFile - Directory! | Return a snapshot with a file removed |
|
path - String!Path of the file to remove (e.g., "/file.txt").
|
| withoutFiles - Directory! | Return a snapshot with files removed |
|
paths - [String!]!Paths of the files to remove (e.g., ["/file.txt"]).
|
The DirectoryID scalar type represents an identifier for an object of type Directory.
The Dagger engine configuration and state
| Field Name | Description |
|---|---|
clients - [String!]! | The list of connected client IDs |
id - EngineID! | A unique identifier for this Engine. |
localCache - EngineCache! | The local (on-disk) cache for the Dagger engine |
name - String! | The name of the engine instance. |
A cache storage for the Dagger engine
| Field Name | Description |
|---|---|
entrySet - EngineCacheEntrySet! | The current set of entries in the cache |
key - String|
| id - EngineCacheID! | A unique identifier for this EngineCache. |
| maxUsedSpace - Int! | The maximum bytes to keep in the cache without pruning. |
| minFreeSpace - Int! | The target amount of free disk space the garbage collector will attempt to leave. |
| prune - Void | Prune the cache of releaseable entries |
|
useDefaultPolicy - BooleanUse the engine-wide default pruning policy if true, otherwise prune the whole cache of any releasable entries.
maxUsedSpace - StringOverride the maximum disk space to keep before pruning (e.g. "200GB" or "80%").
reservedSpace - StringOverride the minimum disk space to retain during pruning (e.g. "500GB" or "10%").
minFreeSpace - StringOverride the minimum free disk space target during pruning (e.g. "20GB" or "20%").
targetSpace - StringOverride the target disk space to keep after pruning (e.g. "200GB" or "50%").
|
| reservedSpace - Int! | The minimum amount of disk space this policy is guaranteed to retain. |
| targetSpace - Int! | The target number of bytes to keep when pruning. |
An individual cache entry in a cache entry set
| Field Name | Description |
|---|---|
activelyUsed - Boolean! | Whether the cache entry is actively being used. |
createdTimeUnixNano - Int! | The time the cache entry was created, in Unix nanoseconds. |
description - String! | The description of the cache entry. |
diskSpaceBytes - Int! | The disk space used by the cache entry. |
id - EngineCacheEntryID! | A unique identifier for this EngineCacheEntry. |
mostRecentUseTimeUnixNano - Int! | The most recent time the cache entry was used, in Unix nanoseconds. |
recordType - String! | The type of the cache record (e.g. regular, internal, frontend, source.local, source.git.checkout, exec.cachemount). |
The EngineCacheEntryID scalar type represents an identifier for an object of type EngineCacheEntry.
A set of cache entries returned by a query to a cache
| Field Name | Description |
|---|---|
diskSpaceBytes - Int! | The total disk space used by the cache entries in this set. |
entries - [EngineCacheEntry!]! | The list of individual cache entries in the set |
entryCount - Int! | The number of cache entries in this set. |
id - EngineCacheEntrySetID! | A unique identifier for this EngineCacheEntrySet. |
The EngineCacheEntrySetID scalar type represents an identifier for an object of type EngineCacheEntrySet.
The EngineCacheID scalar type represents an identifier for an object of type EngineCache.
The EngineID scalar type represents an identifier for an object of type Engine.
A definition of a custom enum defined in a Module.
| Field Name | Description |
|---|---|
description - String! | A doc string for the enum, if any. |
id - EnumTypeDefID! | A unique identifier for this EnumTypeDef. |
members - [EnumValueTypeDef!]! | The members of the enum. |
name - String! | The name of the enum. |
sourceMap - SourceMap | The location of this enum declaration. |
sourceModuleName - String! | If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise. |
values - [EnumValueTypeDef!]! | use members instead |
The EnumTypeDefID scalar type represents an identifier for an object of type EnumTypeDef.
A definition of a value in a custom enum defined in a Module.
| Field Name | Description |
|---|---|
deprecated - String | The reason this enum member is deprecated, if any. |
description - String! | A doc string for the enum member, if any. |
id - EnumValueTypeDefID! | A unique identifier for this EnumValueTypeDef. |
name - String! | The name of the enum member. |
sourceMap - SourceMap | The location of this enum member declaration. |
value - String! | The value of the enum member |
The EnumValueTypeDefID scalar type represents an identifier for an object of type EnumValueTypeDef.
| Field Name | Description |
|---|---|
check - Check! | Return the check with the given name from the installed modules. Must match exactly one check. |
name - String!The name of the check to retrieve
|
| checks - CheckGroup! | Return all checks defined by the installed modules |
|
include - [String!]Only include checks matching the specified patterns
|
| id - EnvID! | A unique identifier for this Env. |
| input - Binding! | Retrieves an input binding by name |
|
name - String!|
| inputs - [Binding!]! | Returns all input bindings provided to the environment |
| output - Binding! | Retrieves an output binding by name |
|
name - String!|
| outputs - [Binding!]! | Returns all declared output bindings for the environment |
| services - UpGroup! | Return all services defined by the installed modules |
|
include - [String!]Only include services matching the specified patterns
|
| withAddressInput - Env! | Create or update a binding of type Address in the environment |
|
name - String!The name of the binding
value - AddressID!The Address value to assign to the binding
description - String!The purpose of the input
|
| withAddressOutput - Env! | Declare a desired Address output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withCacheVolumeInput - Env! | Create or update a binding of type CacheVolume in the environment |
|
name - String!The name of the binding
value - CacheVolumeID!The CacheVolume value to assign to the binding
description - String!The purpose of the input
|
| withCacheVolumeOutput - Env! | Declare a desired CacheVolume output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withChangesetInput - Env! | Create or update a binding of type Changeset in the environment |
|
name - String!The name of the binding
value - ChangesetID!The Changeset value to assign to the binding
description - String!The purpose of the input
|
| withChangesetOutput - Env! | Declare a desired Changeset output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withCheckGroupInput - Env! | Create or update a binding of type CheckGroup in the environment |
|
name - String!The name of the binding
value - CheckGroupID!The CheckGroup value to assign to the binding
description - String!The purpose of the input
|
| withCheckGroupOutput - Env! | Declare a desired CheckGroup output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withCheckInput - Env! | Create or update a binding of type Check in the environment |
|
name - String!The name of the binding
value - CheckID!The Check value to assign to the binding
description - String!The purpose of the input
|
| withCheckOutput - Env! | Declare a desired Check output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withCloudInput - Env! | Create or update a binding of type Cloud in the environment |
|
name - String!The name of the binding
value - CloudID!The Cloud value to assign to the binding
description - String!The purpose of the input
|
| withCloudOutput - Env! | Declare a desired Cloud output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withContainerInput - Env! | Create or update a binding of type Container in the environment |
|
name - String!The name of the binding
value - ContainerID!The Container value to assign to the binding
description - String!The purpose of the input
|
| withContainerOutput - Env! | Declare a desired Container output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withCurrentModule - Env! |
Installs the current module into the environment, exposing its functions to the model
Contextual path arguments will be populated using the environment's workspace.
|
| withDiffStatInput - Env! | Create or update a binding of type DiffStat in the environment |
|
name - String!The name of the binding
value - DiffStatID!The DiffStat value to assign to the binding
description - String!The purpose of the input
|
| withDiffStatOutput - Env! | Declare a desired DiffStat output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withDirectoryInput - Env! | Create or update a binding of type Directory in the environment |
|
name - String!The name of the binding
value - DirectoryID!The Directory value to assign to the binding
description - String!The purpose of the input
|
| withDirectoryOutput - Env! | Declare a desired Directory output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withEnvFileInput - Env! | Create or update a binding of type EnvFile in the environment |
|
name - String!The name of the binding
value - EnvFileID!The EnvFile value to assign to the binding
description - String!The purpose of the input
|
| withEnvFileOutput - Env! | Declare a desired EnvFile output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withEnvInput - Env! | Create or update a binding of type Env in the environment |
|
name - String!The name of the binding
value - EnvID!The Env value to assign to the binding
description - String!The purpose of the input
|
| withEnvOutput - Env! | Declare a desired Env output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withFileInput - Env! | Create or update a binding of type File in the environment |
|
name - String!The name of the binding
value - FileID!The File value to assign to the binding
description - String!The purpose of the input
|
| withFileOutput - Env! | Declare a desired File output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withGeneratorGroupInput - Env! | Create or update a binding of type GeneratorGroup in the environment |
|
name - String!The name of the binding
value - GeneratorGroupID!The GeneratorGroup value to assign to the binding
description - String!The purpose of the input
|
| withGeneratorGroupOutput - Env! | Declare a desired GeneratorGroup output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withGeneratorInput - Env! | Create or update a binding of type Generator in the environment |
|
name - String!The name of the binding
value - GeneratorID!The Generator value to assign to the binding
description - String!The purpose of the input
|
| withGeneratorOutput - Env! | Declare a desired Generator output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withGitRefInput - Env! | Create or update a binding of type GitRef in the environment |
|
name - String!The name of the binding
value - GitRefID!The GitRef value to assign to the binding
description - String!The purpose of the input
|
| withGitRefOutput - Env! | Declare a desired GitRef output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withGitRepositoryInput - Env! | Create or update a binding of type GitRepository in the environment |
|
name - String!The name of the binding
value - GitRepositoryID!The GitRepository value to assign to the binding
description - String!The purpose of the input
|
| withGitRepositoryOutput - Env! | Declare a desired GitRepository output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withJSONValueInput - Env! | Create or update a binding of type JSONValue in the environment |
|
name - String!The name of the binding
value - JSONValueID!The JSONValue value to assign to the binding
description - String!The purpose of the input
|
| withJSONValueOutput - Env! | Declare a desired JSONValue output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withMainModule - Env! |
Sets the main module for this environment (the project being worked on)
Contextual path arguments will be populated using the environment's workspace.
| |
module - ModuleID!|
| withModule - Env! |
Installs a module into the environment, exposing its functions to the model
Contextual path arguments will be populated using the environment's workspace.
Use withMainModule instead | |
module - ModuleID!|
| withModuleConfigClientInput - Env! | Create or update a binding of type ModuleConfigClient in the environment |
|
name - String!The name of the binding
value - ModuleConfigClientID!The ModuleConfigClient value to assign to the binding
description - String!The purpose of the input
|
| withModuleConfigClientOutput - Env! | Declare a desired ModuleConfigClient output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withModuleInput - Env! | Create or update a binding of type Module in the environment |
|
name - String!The name of the binding
value - ModuleID!The Module value to assign to the binding
description - String!The purpose of the input
|
| withModuleOutput - Env! | Declare a desired Module output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withModuleSourceInput - Env! | Create or update a binding of type ModuleSource in the environment |
|
name - String!The name of the binding
value - ModuleSourceID!The ModuleSource value to assign to the binding
description - String!The purpose of the input
|
| withModuleSourceOutput - Env! | Declare a desired ModuleSource output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withSearchResultInput - Env! | Create or update a binding of type SearchResult in the environment |
|
name - String!The name of the binding
value - SearchResultID!The SearchResult value to assign to the binding
description - String!The purpose of the input
|
| withSearchResultOutput - Env! | Declare a desired SearchResult output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withSearchSubmatchInput - Env! | Create or update a binding of type SearchSubmatch in the environment |
|
name - String!The name of the binding
value - SearchSubmatchID!The SearchSubmatch value to assign to the binding
description - String!The purpose of the input
|
| withSearchSubmatchOutput - Env! | Declare a desired SearchSubmatch output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withSecretInput - Env! | Create or update a binding of type Secret in the environment |
|
name - String!The name of the binding
value - SecretID!The Secret value to assign to the binding
description - String!The purpose of the input
|
| withSecretOutput - Env! | Declare a desired Secret output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withServiceInput - Env! | Create or update a binding of type Service in the environment |
|
name - String!The name of the binding
value - ServiceID!The Service value to assign to the binding
description - String!The purpose of the input
|
| withServiceOutput - Env! | Declare a desired Service output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withSocketInput - Env! | Create or update a binding of type Socket in the environment |
|
name - String!The name of the binding
value - SocketID!The Socket value to assign to the binding
description - String!The purpose of the input
|
| withSocketOutput - Env! | Declare a desired Socket output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withStatInput - Env! | Create or update a binding of type Stat in the environment |
|
name - String!The name of the binding
value - StatID!The Stat value to assign to the binding
description - String!The purpose of the input
|
| withStatOutput - Env! | Declare a desired Stat output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withStringInput - Env! | Provides a string input binding to the environment |
|
name - String!The name of the binding
value - String!The string value to assign to the binding
description - String!The description of the input
|
| withStringOutput - Env! | Declares a desired string output binding |
|
name - String!The name of the binding
description - String!The description of the output
|
| withUpGroupInput - Env! | Create or update a binding of type UpGroup in the environment |
|
name - String!The name of the binding
value - UpGroupID!The UpGroup value to assign to the binding
description - String!The purpose of the input
|
| withUpGroupOutput - Env! | Declare a desired UpGroup output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withUpInput - Env! | Create or update a binding of type Up in the environment |
|
name - String!The name of the binding
value - UpID!The Up value to assign to the binding
description - String!The purpose of the input
|
| withUpOutput - Env! | Declare a desired Up output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withWorkspace - Env! | Returns a new environment with the provided workspace |
|
workspace - DirectoryID!The directory to set as the host filesystem
|
| withWorkspaceInput - Env! | Create or update a binding of type Workspace in the environment |
|
name - String!The name of the binding
value - WorkspaceID!The Workspace value to assign to the binding
description - String!The purpose of the input
|
| withWorkspaceOutput - Env! | Declare a desired Workspace output to be assigned in the environment |
|
name - String!The name of the binding
description - String!A description of the desired value of the binding
|
| withoutOutputs - Env! | Returns a new environment without any outputs |
| workspace - Directory! | |
A collection of environment variables.
| Field Name | Description |
|---|---|
asFile - File! | Return as a file |
exists - Boolean! | Check if a variable exists |
name - String!Variable name
|
| get - String! | Lookup a variable (last occurrence wins) and return its value, or an empty string |
|
name - String!Variable name
raw - BooleanReturn the value exactly as written to the file. No quote removal or variable expansion
|
| id - EnvFileID! | A unique identifier for this EnvFile. |
| namespace - EnvFile! | Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix "MY_APP_" and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello |
|
prefix - String!The prefix to filter by
|
| variables - [EnvVariable!]! | Return all variables |
|
raw - BooleanReturn values exactly as written to the file. No quote removal or variable expansion
|
| withVariable - EnvFile! | Add a variable |
|
name - String!Variable name
value - String!Variable value
|
| withoutVariable - EnvFile! | Remove all occurrences of the named variable |
|
name - String!Variable name
|
The EnvFileID scalar type represents an identifier for an object of type EnvFile.
The EnvID scalar type represents an identifier for an object of type Env.
An environment variable name and value.
| Field Name | Description |
|---|---|
id - EnvVariableID! | A unique identifier for this EnvVariable. |
name - String! | The environment variable name. |
value - String! | The environment variable value. |
The EnvVariableID scalar type represents an identifier for an object of type EnvVariable.
| Field Name | Description |
|---|---|
id - ErrorID! | A unique identifier for this Error. |
message - String! | A description of the error. |
values - [ErrorValue!]! | The extensions of the error. |
withValue - Error! | Add a value to the error. |
name - String!The name of the value.
value - JSON!The value to store on the error.
|
The ErrorID scalar type represents an identifier for an object of type Error.
| Field Name | Description |
|---|---|
id - ErrorValueID! | A unique identifier for this ErrorValue. |
name - String! | The name of the value. |
value - JSON! | The value. |
The ErrorValueID scalar type represents an identifier for an object of type ErrorValue.
File type.
| Enum Value | Description |
|---|---|
REGULAR_TYPE
| Tests path is a regular file | |
DIRECTORY_TYPE
| Tests path is a directory | |
SYMLINK_TYPE
| Tests path is a symlink |
"REGULAR_TYPE"
A definition of a field on a custom object defined in a Module.
A field on an object has a static value, as opposed to a function on an object whose value is computed by invoking code (and can accept arguments).
| Field Name | Description |
|---|---|
deprecated - String | The reason this enum member is deprecated, if any. |
description - String! | A doc string for the field, if any. |
id - FieldTypeDefID! | A unique identifier for this FieldTypeDef. |
name - String! | The name of the field in lowerCamelCase format. |
sourceMap - SourceMap | The location of this field declaration. |
typeDef - TypeDef! | The type of the field. |
The FieldTypeDefID scalar type represents an identifier for an object of type FieldTypeDef.
A file.
| Field Name | Description |
|---|---|
asEnvFile - EnvFile! | Parse as an env file |
expand - BooleanReplace "${VAR}" or "$VAR" with the value of other vars
|
| asJSON - JSONValue! | Parse the file contents as JSON. |
| chown - File! | Change the owner of the file recursively. |
|
owner - String!A user:group to set for the file.
The user and group must be an ID (1000:1000), not a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
|
| contents - String! | Retrieves the contents of the file. |
|
offsetLines - IntStart reading after this line
limitLines - IntMaximum number of lines to read
|
| digest - String! | Return the file's digest. The format of the digest is not guaranteed to be stable between releases of Dagger. It is guaranteed to be stable between invocations of the same Dagger engine. |
|
excludeMetadata - BooleanIf true, exclude metadata from the digest.
|
| export - String! | Writes the file to a file path on the host. |
|
path - String!Location of the written directory (e.g., "output.txt").
allowParentDirPath - BooleanIf allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
|
| id - FileID! | A unique identifier for this File. |
| name - String! | Retrieves the name of the file. |
| search - [SearchResult!]! |
Searches for content matching the given regular expression or literal string.
Uses Rust regex syntax; escape literal ., [,], {, }, | with backslashes.
| |
pattern - String!The text to match.
literal - BooleanInterpret the pattern as a literal string instead of a regular expression.
multiline - BooleanEnable searching across multiple lines.
dotall - BooleanAllow the . pattern to match newlines in multiline mode.
insensitive - BooleanEnable case-insensitive matching.
skipIgnored - BooleanHonor .gitignore, .ignore, and .rgignore files.
skipHidden - BooleanSkip hidden files (files starting with .).
filesOnly - BooleanOnly return matching files, not lines and content
limit - IntLimit the number of results to return
paths - [String!]globs - [String!]|
| size - Int! | Retrieves the size of the file, in bytes. |
| stat - Stat | Return file status |
| sync - FileID! | Force evaluation in the engine. |
| withName - File! | Retrieves this file with its name set to the given name. |
|
name - String!Name to set file to.
|
| withReplaced - File! |
Retrieves the file with content replaced with the given text.
If 'all' is true, all occurrences of the pattern will be replaced.
If 'firstAfter' is specified, only the first match starting at the specified line will be replaced.
If neither are specified, and there are multiple matches for the pattern, this will error.
If there are no matches for the pattern, this will error.
| |
search - String!The text to match.
replacement - String!The text to match.
all - BooleanReplace all occurrences of the pattern.
firstFrom - IntReplace the first match starting from the specified line.
|
| withTimestamps - File! | Retrieves this file with its created/modified timestamps set to the given time. |
|
timestamp - Int!Timestamp to set dir/files in.
Formatted in seconds following Unix epoch (e.g., 1672531199).
|
The FileID scalar type represents an identifier for an object of type File.
File type.
| Enum Value | Description |
|---|---|
UNKNOWN
| unknown file type | |
REGULAR
| regular file type | |
DIRECTORY
| directory file type | |
SYMLINK
| symlink file type | |
REGULAR_TYPE
| regular file type | |
DIRECTORY_TYPE
| directory file type | |
SYMLINK_TYPE
| symlink file type |
"UNKNOWN"
Function represents a resolver provided by a Module.
A function always evaluates against a parent object and is given a set of named arguments.
| Field Name | Description |
|---|---|
args - [FunctionArg!]! | Arguments accepted by the function, if any. |
deprecated - String | The reason this function is deprecated, if any. |
description - String! | A doc string for the function, if any. |
id - FunctionID! | A unique identifier for this Function. |
name - String! | The name of the function. |
returnType - TypeDef! | The type returned by the function. |
sourceMap - SourceMap | The location of this function declaration. |
sourceModuleName - String! | If this function is provided by a module, the name of the module. Unset otherwise. |
withArg - Function! | Returns the function with the provided argument |
name - String!The name of the argument
typeDef - TypeDefID!The type of the argument
description - StringA doc string for the argument, if any
defaultValue - JSONA default value to use for this argument if not explicitly set by the caller, if any
defaultPath - StringIf the argument is a Directory or File type, default to load path from context directory, relative to root directory.
ignore - [String!]Patterns to ignore when loading the contextual argument value.
sourceMap - SourceMapIDThe source map for the argument definition.
deprecated - StringIf deprecated, the reason or migration path.
defaultAddress - String|
| withCachePolicy - Function! | Returns the function updated to use the provided cache policy. |
|
policy - FunctionCachePolicy!The cache policy to use.
timeToLive - StringThe TTL for the cache policy, if applicable. Provided as a duration string, e.g. "5m", "1h30s".
|
| withCheck - Function! | Returns the function with a flag indicating it's a check. |
| withDeprecated - Function! | Returns the function with the provided deprecation reason. |
|
reason - StringReason or migration path describing the deprecation.
|
| withDescription - Function! | Returns the function with the given doc string. |
|
description - String!The doc string to set.
|
| withGenerator - Function! | Returns the function with a flag indicating it's a generator. |
| withSourceMap - Function! | Returns the function with the given source map. |
|
sourceMap - SourceMapID!The source map for the function definition.
|
| withUp - Function! | Returns the function with a flag indicating it returns a service for dagger up. |
An argument accepted by a function.
This is a specification for an argument at function definition time, not an argument passed at function call time.
| Field Name | Description |
|---|---|
defaultAddress - String! | Only applies to arguments of type Container. If the argument is not set, load it from the given address (e.g. alpine:latest) |
defaultPath - String! | Only applies to arguments of type File or Directory. If the argument is not set, load it from the given path in the context directory |
defaultValue - JSON! | A default value to use for this argument when not explicitly set by the caller, if any. |
deprecated - String | The reason this function is deprecated, if any. |
description - String! | A doc string for the argument, if any. |
id - FunctionArgID! | A unique identifier for this FunctionArg. |
ignore - [String!]! | Only applies to arguments of type Directory. The ignore patterns are applied to the input directory, and matching entries are filtered out, in a cache-efficient manner. |
name - String! | The name of the argument in lowerCamelCase format. |
sourceMap - SourceMap | The location of this arg declaration. |
typeDef - TypeDef! | The type of the argument. |
The FunctionArgID scalar type represents an identifier for an object of type FunctionArg.
The behavior configured for function result caching.
| Enum Value | Description |
|---|---|
Default
| | |
PerSession
| | |
Never
| |
"Default"
An active function call.
| Field Name | Description |
|---|---|
id - FunctionCallID! | A unique identifier for this FunctionCall. |
inputArgs - [FunctionCallArgValue!]! | The argument values the function is being invoked with. |
name - String! | The name of the function being called. |
parent - JSON! | The value of the parent object of the function being called. If the function is top-level to the module, this is always an empty object. |
parentName - String! | The name of the parent object of the function being called. If the function is top-level to the module, this is the name of the module. |
returnError - Void | Return an error from the function. |
error - ErrorID!The error to return.
|
| returnValue - Void | Set the return value of the function call to the provided value. |
|
value - JSON!JSON serialization of the return value.
|
A value passed as a named argument to a function call.
| Field Name | Description |
|---|---|
id - FunctionCallArgValueID! | A unique identifier for this FunctionCallArgValue. |
name - String! | The name of the argument. |
value - JSON! | The value of the argument represented as a JSON serialized string. |
The FunctionCallArgValueID scalar type represents an identifier for an object of type FunctionCallArgValue.
The FunctionCallID scalar type represents an identifier for an object of type FunctionCall.
The FunctionID scalar type represents an identifier for an object of type Function.
The result of running an SDK's codegen.
| Field Name | Description |
|---|---|
code - Directory! | The directory containing the generated code. |
id - GeneratedCodeID! | A unique identifier for this GeneratedCode. |
vcsGeneratedPaths - [String!]! | List of paths to mark generated in version control (i.e. .gitattributes). |
vcsIgnoredPaths - [String!]! | List of paths to ignore in version control (i.e. .gitignore). |
withVCSGeneratedPaths - GeneratedCode! | Set the list of paths to mark generated in version control. |
paths - [String!]!|
| withVCSIgnoredPaths - GeneratedCode! | Set the list of paths to ignore in version control. |
|
paths - [String!]!|
The GeneratedCodeID scalar type represents an identifier for an object of type GeneratedCode.
| Field Name | Description |
|---|---|
changes - Changeset! | The generated changeset from the last run |
completed - Boolean! | Whether the generator complete |
description - String! | Return the description of the generator |
id - GeneratorID! | A unique identifier for this Generator. |
isEmpty - Boolean! | Whether changeset from the last generator run is empty or not |
name - String! | Return the fully qualified name of the generator |
originalModule - Module! | The original module in which the generator has been defined |
path - [String!]! | The path of the generator within its module |
run - Generator! | Execute the generator |
| Field Name | Description |
|---|---|
changes - Changeset! |
The combined changes from the last run of the generators
If any conflict occurs, for instance if the same file is modified by multiple generators, or if a file is both modified and deleted, an error is raised and the merge of the changesets will failed.
Set 'continueOnConflicts' flag to force to merge the changes in a 'last write wins' strategy.
| |
onConflict - ChangesetsMergeConflictStrategy to apply on conflicts between generators
|
| id - GeneratorGroupID! | A unique identifier for this GeneratorGroup. |
| isEmpty - Boolean! | Whether the generated changeset from the last run is empty or not |
| list - [Generator!]! | Return a list of individual generators and their details |
| run - GeneratorGroup! | Execute all selected generators |
The GeneratorGroupID scalar type represents an identifier for an object of type GeneratorGroup.
The GeneratorID scalar type represents an identifier for an object of type Generator.
A git ref (tag, branch, or commit).
| Field Name | Description |
|---|---|
commit - String! | The resolved commit id at this ref. |
commonAncestor - GitRef! | Find the best common ancestor between this ref and another ref. |
other - GitRefID!The other ref to compare against.
|
| id - GitRefID! | A unique identifier for this GitRef. |
| ref - String! | The resolved ref name at this ref. |
| tree - Directory! | The filesystem tree at this ref. |
|
discardGitDir - BooleanSet to true to discard .git directory.
depth - IntThe depth of the tree to fetch.
includeTags - BooleanSet to true to populate tag refs in the local checkout .git.
|
The GitRefID scalar type represents an identifier for an object of type GitRef.
A git repository.
| Field Name | Description |
|---|---|
branch - GitRef! | Returns details of a branch. |
name - String!Branch's name (e.g., "main").
|
| branches - [String!]! | branches that match any of the given glob patterns. |
|
patterns - [String!]Glob patterns (e.g., "refs/tags/v*").
|
| commit - GitRef! | Returns details of a commit. |
|
id - String!Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b").
|
| head - GitRef! | Returns details for HEAD. |
| id - GitRepositoryID! | A unique identifier for this GitRepository. |
| latestVersion - GitRef! | Returns details for the latest semver tag. |
| ref - GitRef! | Returns details of a ref. |
|
name - String!Ref's name (can be a commit identifier, a tag name, a branch name, or a fully-qualified ref).
|
| tag - GitRef! | Returns details of a tag. |
|
name - String!Tag's name (e.g., "v0.3.9").
|
| tags - [String!]! | tags that match any of the given glob patterns. |
|
patterns - [String!]Glob patterns (e.g., "refs/tags/v*").
|
| uncommitted - Changeset! | Returns the changeset of uncommitted changes in the git repository. |
| url - String | The URL of the git repository. |
The GitRepositoryID scalar type represents an identifier for an object of type GitRepository.
Image healthcheck configuration.
| Field Name | Description |
|---|---|
args - [String!]! | Healthcheck command arguments. |
id - HealthcheckConfigID! | A unique identifier for this HealthcheckConfig. |
interval - String! | Interval between running healthcheck. Example:30s |
retries - Int! | The maximum number of consecutive failures before the container is marked as unhealthy. Example:3 |
shell - Boolean! | Healthcheck command is a shell command. |
startInterval - String! | StartInterval configures the duration between checks during the startup phase. Example:5s |
startPeriod - String! | StartPeriod allows for failures during this initial startup period which do not count towards maximum number of retries. Example:0s |
timeout - String! | Healthcheck timeout. Example:3s |
The HealthcheckConfigID scalar type represents an identifier for an object of type HealthcheckConfig.
Information about the host environment.
| Field Name | Description |
|---|---|
containerImage - Container! | Accesses a container image on the host. |
name - String!Name of the image to access.
|
| directory - Directory! | Accesses a directory on the host. |
|
path - String!Location of the directory to access (e.g., ".").
exclude - [String!]Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
include - [String!]Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
noCache - BooleanIf true, the directory will always be reloaded from the host.
gitignore - BooleanApply .gitignore filter rules inside the directory
|
| file - File! | Accesses a file on the host. |
|
path - String!Location of the file to retrieve (e.g., "README.md").
noCache - BooleanIf true, the file will always be reloaded from the host.
|
| findUp - String | Search for a file or directory by walking up the tree from system workdir. Return its relative path. If no match, return null |
|
name - String!name of the file or directory to search for
noCache - Boolean|
| id - HostID! | A unique identifier for this Host. |
| service - Service! | Creates a service that forwards traffic to a specified address via the host. |
|
ports - [PortForward!]!Ports to expose via the service, forwarding through the host network.
If a port's frontend is unspecified or 0, it defaults to the same as the backend port.
An empty set of ports is not valid; an error will be returned.
host - StringUpstream host to forward traffic to.
|
| tunnel - Service! | Creates a tunnel that forwards traffic from the host to a service. |
|
service - ServiceID!Service to send traffic from the tunnel.
native - BooleanMap each service port to the same port on the host, as if the service were running natively.
Note: enabling may result in port conflicts.
ports - [PortForward!]Configure explicit port forwarding rules for the tunnel.
If a port's frontend is unspecified or 0, a random port will be chosen by the host.
If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host.
If ports are given and native is true, the ports are additive.
|
| unixSocket - Socket! | Accesses a Unix socket on the host. |
|
path - String!Location of the Unix socket (e.g., "/var/run/docker.sock").
|
The HostID scalar type represents an identifier for an object of type Host.
Compression algorithm to use for image layers.
| Enum Value | Description |
|---|---|
Gzip
| | |
Zstd
| | |
EStarGZ
| | |
Uncompressed
| | |
GZIP
| | |
ZSTD
| | |
ESTARGZ
| | |
UNCOMPRESSED
| |
"Gzip"
Mediatypes to use in published or exported image metadata.
| Enum Value | Description |
|---|---|
OCIMediaTypes
| | |
DockerMediaTypes
| | |
OCI
| | |
DOCKER
| |
"OCIMediaTypes"
A graphql input type, which is essentially just a group of named args. This is currently only used to represent pre-existing usage of graphql input types in the core API. It is not used by user modules and shouldn't ever be as user module accept input objects via their id rather than graphql input types.
| Field Name | Description |
|---|---|
fields - [FieldTypeDef!]! | Static fields defined on this input object, if any. |
id - InputTypeDefID! | A unique identifier for this InputTypeDef. |
name - String! | The name of the input object. |
The InputTypeDefID scalar type represents an identifier for an object of type InputTypeDef.
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
A definition of a custom interface defined in a Module.
| Field Name | Description |
|---|---|
description - String! | The doc string for the interface, if any. |
functions - [Function!]! | Functions defined on this interface, if any. |
id - InterfaceTypeDefID! | A unique identifier for this InterfaceTypeDef. |
name - String! | The name of the interface. |
sourceMap - SourceMap | The location of this interface declaration. |
sourceModuleName - String! | If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise. |
The InterfaceTypeDefID scalar type represents an identifier for an object of type InterfaceTypeDef.
An arbitrary JSON-encoded value.
| Field Name | Description |
|---|---|
asArray - [JSONValue!]! | Decode an array from json |
asBoolean - Boolean! | Decode a boolean from json |
asInteger - Int! | Decode an integer from json |
asString - String! | Decode a string from json |
contents - JSON! | Return the value encoded as json |
pretty - BooleanPretty-print
indent - StringOptional line prefix
|
| field - JSONValue! | Lookup the field at the given path, and return its value. |
|
path - [String!]!Path of the field to lookup, encoded as an array of field names
|
| fields - [String!]! | List fields of the encoded object |
| id - JSONValueID! | A unique identifier for this JSONValue. |
| newBoolean - JSONValue! | Encode a boolean to json |
|
value - Boolean!New boolean value
|
| newInteger - JSONValue! | Encode an integer to json |
|
value - Int!New integer value
|
| newString - JSONValue! | Encode a string to json |
|
value - String!New string value
|
| withContents - JSONValue! | Return a new json value, decoded from the given content |
|
contents - JSON!New JSON-encoded contents
|
| withField - JSONValue! | Set a new field at the given path |
|
path - [String!]!Path of the field to set, encoded as an array of field names
value - JSONValueID!The new value of the field
|
The JSONValueID scalar type represents an identifier for an object of type JSONValue.
| Field Name | Description |
|---|---|
attempt - LLM! | create a branch in the LLM's history |
number - Int!|
| bindResult - Binding | returns the type of the current state |
|
name - String!|
| env - Env! | return the LLM's current environment |
| hasPrompt - Boolean! | Indicates whether there are any queued prompts or tool results to send to the model |
| history - [String!]! | return the llm message history |
| historyJSON - JSON! | return the raw llm message history as json |
| id - LLMID! | A unique identifier for this LLM. |
| lastReply - String! | return the last llm reply from the history |
| loop - LLM! | Submit the queued prompt, evaluate any tool calls, queue their results, and keep going until the model ends its turn |
| model - String! | return the model used by the llm |
| provider - String! | return the provider used by the llm |
| step - LLMID! | Submit the queued prompt or tool call results, evaluate any tool calls, and queue their results |
| sync - LLMID! | synchronize LLM state |
| tokenUsage - LLMTokenUsage! | returns the token usage of the current state |
| tools - String! | print documentation for available tools |
| withBlockedFunction - LLM! | Return a new LLM with the specified function no longer exposed as a tool |
|
typeName - String!The type name whose function will be blocked
function - String!The function to block
Will be converted to lowerCamelCase if necessary.
|
| withEnv - LLM! | allow the LLM to interact with an environment via MCP |
|
env - EnvID!|
| withMCPServer - LLM! | Add an external MCP server to the LLM |
|
name - String!The name of the MCP server
service - ServiceID!The MCP service to run and communicate with over stdio
|
| withModel - LLM! | swap out the llm model |
|
model - String!The model to use
|
| withPrompt - LLM! | append a prompt to the llm context |
|
prompt - String!The prompt to send
|
| withPromptFile - LLM! | append the contents of a file to the llm context |
|
file - FileID!The file to read the prompt from
|
| withStaticTools - LLM! | Use a static set of tools for method calls, e.g. for MCP clients that do not support dynamic tool registration |
| withSystemPrompt - LLM! | Add a system prompt to the LLM's environment |
|
prompt - String!The system prompt to send
|
| withoutDefaultSystemPrompt - LLM! | Disable the default system prompt |
| withoutMessageHistory - LLM! | Clear the message history, leaving only the system prompts |
| withoutSystemPrompts - LLM! | Clear the system prompts, leaving only the default system prompt |
The LLMID scalar type represents an identifier for an object of type LLM.
| Field Name | Description |
|---|---|
cachedTokenReads - Int! | |
cachedTokenWrites - Int! | |
id - LLMTokenUsageID! | A unique identifier for this LLMTokenUsage. |
inputTokens - Int! | |
outputTokens - Int! | |
totalTokens - Int! |
The LLMTokenUsageID scalar type represents an identifier for an object of type LLMTokenUsage.
A simple key value object that represents a label.
| Field Name | Description |
|---|---|
id - LabelID! | A unique identifier for this Label. |
name - String! | The label name. |
value - String! | The label value. |
The LabelID scalar type represents an identifier for an object of type Label.
A definition of a list type in a Module.
| Field Name | Description |
|---|---|
elementTypeDef - TypeDef! | The type of the elements in the list. |
id - ListTypeDefID! | A unique identifier for this ListTypeDef. |
The ListTypeDefID scalar type represents an identifier for an object of type ListTypeDef.
A Dagger module.
| Field Name | Description |
|---|---|
check - Check! | Return the check defined by the module with the given name. Must match to exactly one check. |
name - String!The name of the check to retrieve
|
| checks - CheckGroup! | Return all checks defined by the module |
|
include - [String!]Only include checks matching the specified patterns
|
| dependencies - [Module!]! | The dependencies of the module. |
| description - String! | The doc string of the module, if any |
| enums - [TypeDef!]! | Enumerations served by this module. |
| generatedContextDirectory - Directory! | The generated files and directories made on top of the module source's context directory. |
| generator - Generator! | Return the generator defined by the module with the given name. Must match to exactly one generator. |
|
name - String!The name of the generator to retrieve
|
| generators - GeneratorGroup! | Return all generators defined by the module |
|
include - [String!]Only include generators matching the specified patterns
|
| id - ModuleID! | A unique identifier for this Module. |
| interfaces - [TypeDef!]! | Interfaces served by this module. |
| introspectionSchemaJSON - File! |
The introspection schema JSON file for this module.
This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
Note: this is in the context of a module, so some core types may be hidden.
|
| name - String! | The name of the module |
| objects - [TypeDef!]! | Objects served by this module. |
| runtime - Container | The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile. |
| sdk - SDKConfig | The SDK config used by this module. |
| serve - Void |
Serve a module's API in the current session.
Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.
| |
includeDependencies - BooleanExpose the dependencies of this module to the client
entrypoint - BooleanInstall the module as the entrypoint, promoting its main-object methods onto the Query root
|
| services - UpGroup! | Return all services defined by the module |
|
include - [String!]Only include services matching the specified patterns
|
| source - ModuleSource | The source for the module. |
| sync - ModuleID! | Forces evaluation of the module, including any loading into the engine and associated validation. |
| userDefaults - EnvFile! | User-defined default values, loaded from local .env files. |
| withDescription - Module! | Retrieves the module with the given description |
|
description - String!The description to set
|
| withEnum - Module! | This module plus the given Enum type and associated values |
|
enum - TypeDefID!|
| withInterface - Module! | This module plus the given Interface type and associated functions |
|
iface - TypeDefID!|
| withObject - Module! | This module plus the given Object type and associated functions. |
|
object - TypeDefID!|
The client generated for the module.
| Field Name | Description |
|---|---|
directory - String! | The directory the client is generated in. |
generator - String! | The generator to use |
id - ModuleConfigClientID! | A unique identifier for this ModuleConfigClient. |
The ModuleConfigClientID scalar type represents an identifier for an object of type ModuleConfigClient.
The ModuleID scalar type represents an identifier for an object of type Module.
The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
| Field Name | Description |
|---|---|
asModule - Module! | Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation |
asString - String! | A human readable ref string representation of this module source. |
blueprint - ModuleSource! | The blueprint referenced by the module source. |
cloneRef - String! | The ref to clone the root of the git repo from. Only valid for git sources. |
commit - String! | The resolved commit of the git repo this source points to. |
configClients - [ModuleConfigClient!]! | The clients generated for the module. |
configExists - Boolean! | Whether an existing dagger.json for the module was found. |
contextDirectory - Directory! | The full directory loaded for the module source, including the source code as a subdirectory. |
dependencies - [ModuleSource!]! | The dependencies of the module source. |
digest - String! | A content-hash of the module source. Module sources with the same digest will output the same generated context and convert into the same module instance. |
directory - Directory! | The directory containing the module configuration and source code (source code may be in a subdir). |
path - String!A subpath from the source directory to select.
|
| engineVersion - String! | The engine version of the module. |
| generatedContextChangeset - Changeset! | The generated files and directories made on top of the module source's context directory, returned as a Changeset. |
| generatedContextDirectory - Directory! | The generated files and directories made on top of the module source's context directory. |
| htmlRepoURL - String! | The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket). |
| htmlURL - String! | The URL to the source's git repo in a web browser. Only valid for git sources. |
| id - ModuleSourceID! | A unique identifier for this ModuleSource. |
| introspectionSchemaJSON - File! |
The introspection schema JSON file for this module source.
This file represents the schema visible to the module's source code, including all core types and those from the dependencies.
Note: this is in the context of a module, so some core types may be hidden.
|
| kind - ModuleSourceKind! | The kind of module source (currently local, git or dir). |
| localContextDirectoryPath - String! | The full absolute path to the context directory on the caller's host filesystem that this module source is loaded from. Only valid for local module sources. |
| moduleName - String! | The name of the module, including any setting via the withName API. |
| moduleOriginalName - String! | The original name of the module as read from the module's dagger.json (or set for the first time with the withName API). |
| originalSubpath - String! | The original subpath used when instantiating this module source, relative to the context directory. |
| pin - String! | The pinned version of this module source. |
| repoRootPath - String! | The import path corresponding to the root of the git repo this source points to. Only valid for git sources. |
| sdk - SDKConfig | The SDK configuration of the module. |
| sourceRootSubpath - String! | The path, relative to the context directory, that contains the module's dagger.json. |
| sourceSubpath - String! | The path to the directory containing the module's source code, relative to the context directory. |
| sync - ModuleSourceID! | Forces evaluation of the module source, including any loading into the engine and associated validation. |
| toolchains - [ModuleSource!]! | The toolchains referenced by the module source. |
| userDefaults - EnvFile! | User-defined defaults read from local .env files |
| version - String! | The specified version of the git repo this source points to. |
| withBlueprint - ModuleSource! | Set a blueprint for the module source. |
|
blueprint - ModuleSourceID!The blueprint module to set.
|
| withClient - ModuleSource! | Update the module source with a new client to generate. |
|
generator - String!The generator to use
outputDir - String!The output directory for the generated client.
|
| withDependencies - ModuleSource! | Append the provided dependencies to the module source's dependency list. |
|
dependencies - [ModuleSourceID!]!The dependencies to append.
|
| withEngineVersion - ModuleSource! | Upgrade the engine version of the module to the given value. |
|
version - String!The engine version to upgrade to.
|
| withExperimentalFeatures - ModuleSource! | Enable the experimental features for the module source. |
|
features - [ModuleSourceExperimentalFeature!]!The experimental features to enable.
|
| withIncludes - ModuleSource! | Update the module source with additional include patterns for files+directories from its context that are required for building it |
|
patterns - [String!]!The new additional include patterns.
|
| withName - ModuleSource! | Update the module source with a new name. |
|
name - String!The name to set.
|
| withSDK - ModuleSource! | Update the module source with a new SDK. |
|
source - String!The SDK source to set.
|
| withSourceSubpath - ModuleSource! | Update the module source with a new source subpath. |
|
path - String!The path to set as the source subpath. Must be relative to the module source's source root directory.
|
| withToolchains - ModuleSource! | Add toolchains to the module source. |
|
toolchains - [ModuleSourceID!]!The toolchain modules to add.
|
| withUpdateBlueprint - ModuleSource! | Update the blueprint module to the latest version. |
| withUpdateDependencies - ModuleSource! | Update one or more module dependencies. |
|
dependencies - [String!]!The dependencies to update.
|
| withUpdateToolchains - ModuleSource! | Update one or more toolchains. |
|
toolchains - [String!]!The toolchains to update.
|
| withUpdatedClients - ModuleSource! | Update one or more clients. |
|
clients - [String!]!The clients to update
|
| withoutBlueprint - ModuleSource! | Remove the current blueprint from the module source. |
| withoutClient - ModuleSource! | Remove a client from the module source. |
|
path - String!The path of the client to remove.
|
| withoutDependencies - ModuleSource! | Remove the provided dependencies from the module source's dependency list. |
|
dependencies - [String!]!The dependencies to remove.
|
| withoutExperimentalFeatures - ModuleSource! | Disable experimental features for the module source. |
|
features - [ModuleSourceExperimentalFeature!]!The experimental features to disable.
|
| withoutToolchains - ModuleSource! | Remove the provided toolchains from the module source. |
|
toolchains - [String!]!The toolchains to remove.
|
Experimental features of a module
| Enum Value | Description |
|---|---|
SELF_CALLS
| Self calls |
"SELF_CALLS"
The ModuleSourceID scalar type represents an identifier for an object of type ModuleSource.
The kind of module source.
| Enum Value | Description |
|---|---|
LOCAL_SOURCE
| | |
GIT_SOURCE
| | |
DIR_SOURCE
| | |
LOCAL
| | |
GIT
| | |
DIR
| |
"LOCAL_SOURCE"
Transport layer network protocol associated to a port.
| Enum Value | Description |
|---|---|
TCP
| | |
UDP
| |
"TCP"
A definition of a custom object defined in a Module.
| Field Name | Description |
|---|---|
constructor - Function | The function used to construct new instances of this object, if any |
deprecated - String | The reason this enum member is deprecated, if any. |
description - String! | The doc string for the object, if any. |
fields - [FieldTypeDef!]! | Static fields defined on this object, if any. |
functions - [Function!]! | Functions defined on this object, if any. |
id - ObjectTypeDefID! | A unique identifier for this ObjectTypeDef. |
name - String! | The name of the object. |
sourceMap - SourceMap | The location of this object declaration. |
sourceModuleName - String! | If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise. |
The ObjectTypeDefID scalar type represents an identifier for an object of type ObjectTypeDef.
Key value object that represents a pipeline label.
| Input Field | Description |
|---|---|
name - String! | Label name. |
value - String! | Label value. |
{
"name": "abc123",
"value": "abc123"
}
The platform config OS and architecture in a Container.
The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64").
A port exposed by a container.
| Field Name | Description |
|---|---|
description - String | The port description. |
experimentalSkipHealthcheck - Boolean! | Skip the health check when run as a service. |
id - PortID! | A unique identifier for this Port. |
port - Int! | The port number. |
protocol - NetworkProtocol! | The transport layer protocol. |
Port forwarding rules for tunneling network traffic.
| Input Field | Description |
|---|---|
frontend - Int | Port to expose to clients. If unspecified, a default will be chosen. |
backend - Int! | Destination port for traffic. |
protocol - NetworkProtocol | Transport layer protocol to use for traffic. |
{"frontend": 123, "backend": 123, "protocol": "TCP"}
The PortID scalar type represents an identifier for an object of type Port.
The QueryID scalar type represents an identifier for an object of type Query.
Expected return type of an execution
| Enum Value | Description |
|---|---|
SUCCESS
| A successful execution (exit code 0) | |
FAILURE
| A failed execution (exit codes 1-127 and 192-255) | |
ANY
| Any execution (exit codes 0-127 and 192-255) |
"SUCCESS"
The SDK config of the module.
| Field Name | Description |
|---|---|
debug - Boolean! | Whether to start the SDK runtime in debug mode with an interactive terminal. |
id - SDKConfigID! | A unique identifier for this SDKConfig. |
source - String! | Source of the SDK. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation. |
The SDKConfigID scalar type represents an identifier for an object of type SDKConfig.
A definition of a custom scalar defined in a Module.
| Field Name | Description |
|---|---|
description - String! | A doc string for the scalar, if any. |
id - ScalarTypeDefID! | A unique identifier for this ScalarTypeDef. |
name - String! | The name of the scalar. |
sourceModuleName - String! | If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise. |
The ScalarTypeDefID scalar type represents an identifier for an object of type ScalarTypeDef.
| Field Name | Description |
|---|---|
absoluteOffset - Int! | The byte offset of this line within the file. |
filePath - String! | The path to the file that matched. |
id - SearchResultID! | A unique identifier for this SearchResult. |
lineNumber - Int! | The first line that matched. |
matchedLines - String! | The line content that matched. |
submatches - [SearchSubmatch!]! | Sub-match positions and content within the matched lines. |
The SearchResultID scalar type represents an identifier for an object of type SearchResult.
| Field Name | Description |
|---|---|
end - Int! | The match's end offset within the matched lines. |
id - SearchSubmatchID! | A unique identifier for this SearchSubmatch. |
start - Int! | The match's start offset within the matched lines. |
text - String! | The matched text. |
The SearchSubmatchID scalar type represents an identifier for an object of type SearchSubmatch.
A reference to a secret value, which can be handled more safely than the value itself.
| Field Name | Description |
|---|---|
id - SecretID! | A unique identifier for this Secret. |
name - String! | The name of this secret. |
plaintext - String! | The value of this secret. |
uri - String! | The URI of this secret. |
The SecretID scalar type represents an identifier for an object of type Secret.
A content-addressed service providing TCP connectivity.
| Field Name | Description |
|---|---|
endpoint - String! |
Retrieves an endpoint that clients can use to reach this container.
If no port is specified, the first exposed port is used. If none exist an error is returned.
If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
| |
port - IntThe exposed port number for the endpoint
scheme - StringReturn a URL with the given scheme, eg. http for http://
|
| hostname - String! | Retrieves a hostname which can be used by clients to reach this container. |
| id - ServiceID! | A unique identifier for this Service. |
| ports - [Port!]! | Retrieves the list of ports provided by the service. |
| start - ServiceID! |
Start the service and wait for its health checks to succeed.
Services bound to a Container do not need to be manually started.
|
| stop - ServiceID! | Stop the service. |
|
kill - BooleanImmediately kill the service without waiting for a graceful exit
|
| sync - ServiceID! | Forces evaluation of the pipeline in the engine. |
| terminal - Service! | |
|
cmd - [String!]|
| up - Void | Creates a tunnel that forwards traffic from the caller's network to this service. |
|
ports - [PortForward!]List of frontend/backend port mappings to forward.
Frontend is the port accepting traffic on the host, backend is the service port.
random - BooleanBind each tunnel port to a random port on the host.
|
| withHostname - Service! | Configures a hostname which can be used by clients within the session to reach this container. |
|
hostname - String!The hostname to use.
|
The ServiceID scalar type represents an identifier for an object of type Service.
A Unix or TCP/IP socket that can be mounted into a container.
| Field Name | Description |
|---|---|
id - SocketID! | A unique identifier for this Socket. |
The SocketID scalar type represents an identifier for an object of type Socket.
Source location information.
| Field Name | Description |
|---|---|
column - Int! | The column number within the line. |
filename - String! | The filename from the module source. |
id - SourceMapID! | A unique identifier for this SourceMap. |
line - Int! | The line number within the filename. |
module - String! | The module dependency this was declared in. |
url - String! | The URL to the file, if any. This can be used to link to the source map in the browser. |
The SourceMapID scalar type represents an identifier for an object of type SourceMap.
A file or directory status object.
| Field Name | Description |
|---|---|
fileType - FileType | file type |
id - StatID! | A unique identifier for this Stat. |
name - String! | file name |
permissions - Int! | permission bits |
size - Int! | file size |
The StatID scalar type represents an identifier for an object of type Stat.
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
An interactive terminal that clients can connect to.
| Field Name | Description |
|---|---|
id - TerminalID! | A unique identifier for this Terminal. |
sync - TerminalID! |
Forces evaluation of the pipeline in the engine.
It doesn't run the default command if no exec has been set.
|
The TerminalID scalar type represents an identifier for an object of type Terminal.
A definition of a parameter or return type in a Module.
| Field Name | Description |
|---|---|
asEnum - EnumTypeDef | If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null. |
asInput - InputTypeDef | If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null. |
asInterface - InterfaceTypeDef | If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null. |
asList - ListTypeDef | If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null. |
asObject - ObjectTypeDef | If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null. |
asScalar - ScalarTypeDef | If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null. |
id - TypeDefID! | A unique identifier for this TypeDef. |
kind - TypeDefKind! | The kind of type this is (e.g. primitive, list, object). |
optional - Boolean! | Whether this type can be set to null. Defaults to false. |
withConstructor - TypeDef! | Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object. |
function - FunctionID!Returns a TypeDef of kind Enum with the provided name.
Note that an enum's values may be omitted if the intent is only to refer to an enum. This is how functions are able to return their own, or any other circular reference.
| |
name - String!The name of the enum
description - StringA doc string for the enum, if any
sourceMap - SourceMapIDThe source map for the enum definition.
|
| withEnumMember - TypeDef! | Adds a static value for an Enum TypeDef, failing if the type is not an enum. |
|
name - String!The name of the member in the enum
value - StringThe value of the member in the enum
description - StringA doc string for the member, if any
sourceMap - SourceMapIDThe source map for the enum member definition.
deprecated - StringIf deprecated, the reason or migration path.
|
| withEnumValue - TypeDef! | Adds a static value for an Enum TypeDef, failing if the type is not an enum. Use withEnumMember instead |
|
value - String!The name of the value in the enum
description - StringA doc string for the value, if any
sourceMap - SourceMapIDThe source map for the enum value definition.
deprecated - StringIf deprecated, the reason or migration path.
|
| withField - TypeDef! | Adds a static field for an Object TypeDef, failing if the type is not an object. |
|
name - String!The name of the field in the object
typeDef - TypeDefID!The type of the field
description - StringA doc string for the field, if any
sourceMap - SourceMapIDThe source map for the field definition.
deprecated - StringIf deprecated, the reason or migration path.
|
| withFunction - TypeDef! | Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds. |
|
function - FunctionID!|
| withInterface - TypeDef! | Returns a TypeDef of kind Interface with the provided name. |
|
name - String!description - StringsourceMap - SourceMapID|
| withKind - TypeDef! | Sets the kind of the type. |
|
kind - TypeDefKind!|
| withListOf - TypeDef! | Returns a TypeDef of kind List with the provided type for its elements. |
|
elementType - TypeDefID!|
| withObject - TypeDef! |
Returns a TypeDef of kind Object with the provided name.
Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference.
| |
name - String!description - StringsourceMap - SourceMapIDdeprecated - String|
| withOptional - TypeDef! | Sets whether this type can be set to null. |
|
optional - Boolean!|
| withScalar - TypeDef! | Returns a TypeDef of kind Scalar with the provided name. |
|
name - String!description - String|
The TypeDefID scalar type represents an identifier for an object of type TypeDef.
Distinguishes the different kinds of TypeDefs.
| Enum Value | Description |
|---|---|
STRING_KIND
| A string value. | |
INTEGER_KIND
| An integer value. | |
FLOAT_KIND
| A float value. | |
BOOLEAN_KIND
| A boolean value. | |
SCALAR_KIND
| A scalar value of any basic kind. | |
LIST_KIND
|
Always paired with a ListTypeDef.
A list of values all having the same type.
| |
OBJECT_KIND
|
Always paired with an ObjectTypeDef.
A named type defined in the GraphQL schema, with fields and functions.
| |
INTERFACE_KIND
|
Always paired with an InterfaceTypeDef.
A named type of functions that can be matched+implemented by other objects+interfaces.
| |
INPUT_KIND
| A graphql input type, used only when representing the core API via TypeDefs. | |
VOID_KIND
|
A special kind used to signify that no value is returned.
This is used for functions that have no return value. The outer TypeDef specifying this Kind is always Optional, as the Void is never actually represented.
| |
ENUM_KIND
|
A GraphQL enum type and its values
Always paired with an EnumTypeDef.
| |
STRING
| A string value. | |
INTEGER
| An integer value. | |
FLOAT
| A float value. | |
BOOLEAN
| A boolean value. | |
SCALAR
| A scalar value of any basic kind. | |
LIST
|
Always paired with a ListTypeDef.
A list of values all having the same type.
| |
OBJECT
|
Always paired with an ObjectTypeDef.
A named type defined in the GraphQL schema, with fields and functions.
| |
INTERFACE
|
Always paired with an InterfaceTypeDef.
A named type of functions that can be matched+implemented by other objects+interfaces.
| |
INPUT
| A graphql input type, used only when representing the core API via TypeDefs. | |
VOID
|
A special kind used to signify that no value is returned.
This is used for functions that have no return value. The outer TypeDef specifying this Kind is always Optional, as the Void is never actually represented.
| |
ENUM
|
A GraphQL enum type and its values
Always paired with an EnumTypeDef.
|
"STRING_KIND"
| Field Name | Description |
|---|---|
description - String! | The description of the service |
id - UpID! | A unique identifier for this Up. |
name - String! | Return the fully qualified name of the service |
originalModule - Module! | The original module in which the service has been defined |
path - [String!]! | The path of the service within its module |
run - Up! | Execute the service function |
| Field Name | Description |
|---|---|
id - UpGroupID! | A unique identifier for this UpGroup. |
list - [Up!]! | Return a list of individual services and their details |
run - UpGroup! | Execute all selected service functions |
The UpGroupID scalar type represents an identifier for an object of type UpGroup.
The UpID scalar type represents an identifier for an object of type Up.
The absence of a value.
A Null Void is used as a placeholder for resolvers that do not return anything.
A Dagger workspace detected from the current working directory.
| Field Name | Description |
|---|---|
address - String! | Canonical Dagger address of the workspace directory. |
checks - CheckGroup! | Return all checks from modules loaded in the workspace. |
include - [String!]Only include checks matching the specified patterns
|
| clientId - String! | The client ID that owns this workspace's host filesystem. |
| configPath - String! | Path to config.toml relative to the workspace boundary (empty if not initialized). |
| directory - Directory! |
Returns a Directory from the workspace.
Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.
| |
path - String!Location of the directory to retrieve. Relative paths (e.g., "src") resolve from the workspace directory; absolute paths (e.g., "/src") resolve from the workspace boundary.
exclude - [String!]Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
include - [String!]Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
gitignore - BooleanApply .gitignore filter rules inside the directory.
Returns a File from the workspace.
Relative paths resolve from the workspace directory. Absolute paths resolve from the workspace boundary.
| |
path - String!Location of the file to retrieve. Relative paths (e.g., "go.mod") resolve from the workspace directory; absolute paths (e.g., "/go.mod") resolve from the workspace boundary.
Search for a file or directory by walking up from the start path within the workspace.
Returns the absolute workspace path if found, or null if not found.
Relative start paths resolve from the workspace directory.
The search stops at the workspace boundary and will not traverse above it.
| |
name - String!The name of the file or directory to search for.
from - StringPath to start the search from. Relative paths resolve from the workspace directory; absolute paths resolve from the workspace boundary.
|
| generators - GeneratorGroup! | Return all generators from modules loaded in the workspace. |
|
include - [String!]Only include generators matching the specified patterns
|
| hasConfig - Boolean! | Whether a config.toml file exists in the workspace. |
| id - WorkspaceID! | A unique identifier for this Workspace. |
| initialized - Boolean! | Whether .dagger/config.toml exists. |
| path - String! | Workspace directory path relative to the workspace boundary. |
| services - UpGroup! | Return all services from modules loaded in the workspace. |
|
include - [String!]Only include services matching the specified patterns
|
The WorkspaceID scalar type represents an identifier for an object of type Workspace.