Skip to main content
Version: 1.0-beta

Workspace

API reference

A Dagger workspace detected from the current working directory or constructed from a Directory.

Implements Node

address
Canonical Dagger address of the workspace location, or an opaque identity for synthetic workspaces.
configFile
Selected native workspace config file relative to the workspace cwd, if any.
configRead
Read a configuration value from dagger.toml.
cwd
Current location within the workspace root.
detectScope
Return the selected SDK module's current scope at this workspace location.
entrypoint
Installed name of the module selected as the workspace entrypoint, or an empty string when none is selected.
envList
List named environments defined in the workspace configuration.
export
Write this workspace's commits and pending changes to a checkout on the calling client.
findRoots
Find project roots marked by any of the given filenames, starting from a path relative to the workspace cwd.
findUp
Search for a file or directory by walking up from the start path within the workspace.
glob
Returns a list of files and directories that match the given pattern.
id
A unique identifier for this Workspace.
agents
Return all agent middlewares from modules loaded in the workspace.
changes
Return this workspace's changes, with paths relative to its working directory.
checks
Return all checks from modules loaded in the workspace.
compareCommitsFrom
Preview which source commits withCommitsFrom would apply, skip, or report as conflicting.
directory
Returns a Directory from the workspace.
file
Returns a File from the workspace.
generators
Return all generators from modules loaded in the workspace.
git
Git state for this workspace. Errors if the workspace is not in a git repository.
migrate
Plan the explicit migration needed for the current workspace.
migrateModule
Plan migration of one local module without migrating its dependencies or creating a workspace configuration.
module
Return a module defined in the workspace configuration.
modules
List modules defined in the workspace configuration.
moduleSource
Load a module source from a path within the workspace.
sdk
An installed SDK, by name.
sdks
Installed SDKs.
search
Searches for content matching the given regular expression or literal string.
services
Return all services from modules loaded in the workspace.
snapshot
Return a snapshot of this workspace as a stable value.
terminals
Return all terminal targets from modules loaded in the workspace.
withChanges
Return this workspace with a changeset applied, without mutating the source.
withClient
Return this workspace with a generated module client added to one SDK scope.
withCommit
Create a Git commit from a changeset and return a stable workspace with HEAD advanced.
withCommitsFrom
Integrate source commits into this workspace and return the result, preserving this workspace's uncommitted changes and metadata.
withConfigEnv
Return this workspace with a named config environment created.
withConfigEnvironment
Select the config environment carried by this workspace.
withConfigPaths
Select workspace-root-relative config and lockfile paths. Empty paths clear the selection.
withConfigValue
Return this workspace with a configuration value written.
withDirectory
Return this workspace with a directory merged into the given path, without mutating the source.
withEntrypoint
Return this workspace with an installed module selected as its entrypoint.
withFile
Return this workspace with a file added or replaced, without mutating the source.
withInitialized
Return this workspace with a native configuration, without changing an existing configuration.
withInitModule
Return this workspace with a location initialized as a module scope.
withModule
Return this workspace with a module installed in its config.
withMountedDirectory
Return this workspace with a directory mounted read-only at the given path, without mutating the source.
withMountedFile
Return this workspace with a file mounted read-only at the given path, without mutating the source.
withNewDirectory
Return this workspace with the given path replaced by a directory, without mutating the source.
withNewFile
Return this workspace with a new or replaced file, without mutating the source.
withoutClient
Return this workspace with a module client removed from the deepest matching recorded scope.
withoutConfigEnv
Return this workspace with a named config environment removed.
withoutConfigValue
Return this workspace with a configuration value removed.
withoutDirectory
Return this workspace with a directory removed, without mutating the source.
withoutEntrypoint
Return this workspace with no module selected as its entrypoint.
withoutFile
Return this workspace with a file removed, without mutating the source.
withoutModule
Return this workspace with a module removed from its config.
withoutMount
Return this workspace with the content mounted at the given path unmounted.
withoutSDK
Return this workspace with an SDK removed from its config.
withReset
Move this workspace's Git HEAD to a commit and return the resulting stable workspace.
withSDK
Return this workspace with an SDK installed in its config.
withUpdatedClients
Return this workspace with the selected module clients updated.
withUpdatedLock
Return this workspace with refreshed lockfile state.
withUpdatedModules
Return this workspace with updated module versions and lockfile state.
withWorkdir
Return this workspace with its working directory pointed at the given workspace-relative path.

address: String!

Canonical Dagger address of the workspace location, or an opaque identity for synthetic workspaces.

configFile: String!

Selected native workspace config file relative to the workspace cwd, if any.

configRead(key: String = ""): String!

Read a configuration value from dagger.toml.

If key is empty, returns the full config.

If key points to a scalar, returns the value.

If key points to a table, returns flattened dotted-key output.

key: String = ""

Dotted key path (e.g. modules.greeter.source). Empty for full config.

cwd: String!

Current location within the workspace root.

The workspace root is returned as "/".

Relative paths in workspace APIs resolve from here.

detectScope(sdk: String!): String!

Return the selected SDK module's current scope at this workspace location.

sdk: String!

SDK name to probe. Required.

entrypoint: String!

Installed name of the module selected as the workspace entrypoint, or an empty string when none is selected.

Reflects the selected env's effective view. Fails if several modules are selected.

envList: [String!]!

List named environments defined in the workspace configuration.

export(path: String = "", from: Workspace): Void!

Write this workspace's commits and pending changes to a checkout on the calling client.

With path, accept a frozen source, integrate divergent commits by cherry-picking, preserve unrelated checkout edits, and refuse conflicts. The source is unchanged. Pass from to save only work since an earlier source value, including previously saved pending edits that are now committed.

Without path, apply a local workspace's overlay changes at its host root. Pass from to apply only changes since an earlier local workspace state. Export paths are relative to the workspace root regardless of its working directory. Like Directory.export, this writes only to the client making the call, never the source's client.

path: String = ""

Destination checkout path on the calling client. Relative paths start at the client's working directory. Omit to apply a local workspace's overlay changes at its host root.

from: Workspace

Earlier workspace state to compare against. With path, this must be a previously exported frozen source workspace.

findRoots(start: String = ".",markers: [String!]!,exclude: [String!] = []): [String!]!

Find project roots marked by any of the given filenames, starting from a path relative to the workspace cwd.

Returns cwd-relative directory paths for every marked directory at or below start, plus the nearest marked ancestor when start itself is not marked.

Each returned path is usable as-is with other workspace APIs, e.g. directory(path).

start: String = "."

Directory to start from. Relative paths resolve from the workspace cwd.

markers: [String!]!

File basenames that mark a project root (e.g. ["go.mod"] or ["deno.json", "deno.jsonc"]).

exclude: [String!] = []

Glob patterns pruning the walk below start (e.g. ["/node_modules/"]).

findUp(name: String!, from: String = "."): String

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 cwd.

The search stops at the workspace root and will not traverse above it.

name: String!

The name of the file or directory to search for.

from: String = "."

Path to start the search from. Relative paths resolve from the workspace cwd; absolute paths resolve from the workspace root.

glob(pattern: String!): [String!]!

Returns a list of files and directories that match the given pattern.

Patterns match paths relative to the workspace root.

pattern: String!

Pattern to match (e.g., "*.md").

id: ID!

A unique identifier for this Workspace.

agents(include: [String!], exclude: [String!]): AgentMiddlewareGroup!Experimental

Return all agent middlewares from modules loaded in the workspace.

Experimental: Agent APIs are likely to change.

include: [String!]

Only include agents matching the specified patterns

exclude: [String!]

Exclude agents matching the specified patterns

changes(from: Workspace): Changeset!

Return this workspace's changes, with paths relative to its working directory.

Pass from to compare against an earlier workspace state. Omitting it preserves the cumulative behavior used by clients from before this argument was added.

from: Workspace

An earlier workspace state to compare against.

checks(include: [String!],skip: [String!],noGenerate: Boolean,onlyGenerate: Boolean): CheckGroup!

Return all checks from modules loaded in the workspace.

include: [String!]

Only include checks matching the specified patterns

skip: [String!]

Skip checks matching the specified patterns

noGenerate: Boolean

When true, only return annotated check functions; exclude generate-as-checks

onlyGenerate: Boolean

When true, only return generate-as-checks; exclude annotated check functions

compareCommitsFrom(source: Workspace!,commits: [String!] = [],maxCommits: Int = 100): [WorkspaceCommitPick!]!

Preview which source commits withCommitsFrom would apply, skip, or report as conflicting.

Results are ordered oldest first and account for earlier applicable commits in the same preview. The preview does not apply commits or write to the checkout.

A local receiver is snapshotted automatically; untracked files require interactive approval. Source uncommitted changes are ignored. Exceeding maxCommits fails rather than returning a partial preview. Divergent merge commits require manual integration.

source: Workspace!

Git-backed source workspace. For a local checkout, call snapshot on the source first and pass the returned workspace.

commits: [String!] = []

Full lowercase commit hashes or unambiguous lowercase hex prefixes (4-40 characters) to select, in any order. Prefixes resolve against the frozen source's Git objects and are recorded as full hashes; duplicate selections after resolution are rejected. Empty selects all new source commits. Selected commits must be within the source's latest 10000 commits.

maxCommits: Int = 100

Maximum commits in either differing history, from 1 to 1000. Exceeding the limit fails; nothing is silently omitted.

directory(path: String!,exclude: [String!] = [],include: [String!] = [],gitignore: Boolean = false): Directory!

Returns a Directory from the workspace.

Relative paths resolve from the workspace cwd. Absolute paths resolve from the workspace root.

path: String!

Location of the directory to retrieve. Relative paths (e.g., "src") resolve from the workspace cwd; absolute paths (e.g., "/src") resolve from the workspace root.

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: Boolean = false

Apply .gitignore filter rules inside the directory.

file(path: String!): File!

Returns a File from the workspace.

Relative paths resolve from the workspace cwd. Absolute paths resolve from the workspace root.

path: String!

Location of the file to retrieve. Relative paths (e.g., "go.mod") resolve from the workspace cwd; absolute paths (e.g., "/go.mod") resolve from the workspace root.

generators(include: [String!]): GeneratorGroup!

Return all generators from modules loaded in the workspace.

include: [String!]

Only include generators matching the specified patterns

git: WorkspaceGit!

Git state for this workspace. Errors if the workspace is not in a git repository.

migrate(modules: [String!] = []): WorkspaceMigration!

Plan the explicit migration needed for the current workspace.

Include installed local modules and their local dependencies. Other module candidates remain unchanged unless selected.

The returned plan has an empty changeset and no steps when no migration is needed.

modules: [String!] = []

Additional local modules to migrate. Relative paths start at the workspace cwd; absolute paths start at the workspace root.

migrateModule(path: String = "."): WorkspaceMigration!

Plan migration of one local module without migrating its dependencies or creating a workspace configuration.

Include SDK registration when a workspace configuration exists and remove obsolete generated-file ignore rules.

path: String = "."

Module directory. Relative paths start at the workspace cwd; absolute paths start at the workspace root.

module(name: String!): WorkspaceModule!

Return a module defined in the workspace configuration.

Reflects the selected env's effective view.

name: String!

Module name to inspect.

modules: [WorkspaceModule!]!

List modules defined in the workspace configuration.

Reflects the selected env's effective view.

moduleSource(path: String!): ModuleSource!

Load a module source from a path within the workspace.

Relative paths (e.g., "foo") resolve from the workspace cwd; absolute paths (e.g., "/foo") resolve from the workspace root.

Fails if the path does not point to an initialized module.

path: String!

Location of the module source to load, relative to the workspace cwd or absolute from the workspace root.

sdk(name: String!): WorkspaceSDK!

An installed SDK, by name.

name: String!

SDK name to look up.

sdks: [WorkspaceSDK!]!

Installed SDKs.

Searches for content matching the given regular expression or literal string.

Uses Rust regex syntax; escape literal ., [, ], {, }, | with backslashes.

Runs ripgrep on the client host, falling back to grep if unavailable.

paths: [String!] = []

Directory or file paths to search

globs: [String!] = []

Glob patterns to match (e.g., "*.md")

pattern: String!

The text to match.

literal: Boolean = false

Interpret the pattern as a literal string instead of a regular expression.

multiline: Boolean = false

Enable searching across multiple lines.

dotall: Boolean = false

Allow the . pattern to match newlines in multiline mode.

insensitive: Boolean = false

Enable case-insensitive matching.

skipIgnored: Boolean = false

Honor .gitignore, .ignore, and .rgignore files.

skipHidden: Boolean = false

Skip hidden files (files starting with .).

filesOnly: Boolean = false

Only return matching files, not lines and content

limit: Int

Limit the number of results to return

services(include: [String!]): UpGroup!

Return all services from modules loaded in the workspace.

include: [String!]

Only include services matching the specified patterns

snapshot: Workspace!Experimental

Return a snapshot of this workspace as a stable value.

Git capture is a progressive enhancement: if the workspace has no Git repository or commits, or the client cannot capture Git, return this workspace unchanged. Approval rejections and capture failures remain errors.

Use the returned workspace for subsequent reads, edits, and module loading against the captured baseline. Snapshotting an existing stable value preserves its baseline; snapshot currentWorkspace again to capture later checkout changes.

Only the owning client can capture a local checkout. Tracked changes are captured automatically; untracked files require interactive approval. Remote Git refs are pinned to their resolved commits. Capturing leaves the checkout unchanged.

The recipe is portable when a remote can serve its base; otherwise it is frozen for this session only.

Experimental: Best-effort capture for resumable sessions; capture and fallback behavior may change.

terminals(include: [String!]): TerminalGroup!

Return all terminal targets from modules loaded in the workspace.

include: [String!]

Only include terminal targets matching the specified patterns

withChanges(changes: Changeset!): Workspace!

Return this workspace with a changeset applied, without mutating the source.

changes: Changeset!

Changes to apply.

withClient(module: String!,sdk: String = "",settings: JSON): Workspace!

Return this workspace with a generated module client added to one SDK scope.

Select the deepest detected or registered scope. Fail if several SDKs have that deepest scope.

module: String!

Explicit local path or module address to generate a client for. Installed module names are not supported.

sdk: String = ""

Optional SDK name. Inspect all installed SDKs when omitted.

settings: JSON

Explicit SDK-module constructor setting overrides for this scope. Requires an explicit SDK name.

withCommit(changes: Changeset!,message: String!,date: String!,authorName: String,authorEmail: String,signoff: Boolean = false): Workspace!

Create a Git commit from a changeset and return a stable workspace with HEAD advanced.

The changeset is three-way merged into both HEAD and the frozen working tree. Compatible unselected edits remain uncommitted; incoming changes need not already be in the working tree. Conflicts with either tree fail without modifying the workspace. Empty changesets, or changes already present in HEAD, fail with nothing to commit.

A local workspace is snapshotted automatically before committing; untracked files require interactive approval. The host checkout is not modified.

Missing author fields are resolved from Git config in the calling client's working directory at commit time, then recorded explicitly for reproducible commits. Unconfigured fields default to Dagger and dagger@localhost.

changes: Changeset!

Changeset to commit, for example git.uncommitted.filter(...). Paths are rooted at the repository; rename sides are determined by the changeset. Git metadata (.git) is ignored; metadata-only changes fail with nothing to commit.

message: String!

Commit message.

date: String!

RFC3339 author and committer date. Required for reproducible commits.

authorName: String

Author and committer name. Defaults to git config user.name in the calling client's working directory, otherwise Dagger.

authorEmail: String

Author and committer email. Defaults to git config user.email in the calling client's working directory, otherwise dagger@localhost.

signoff: Boolean = false

Add a Signed-off-by trailer using the commit author's name and email.

withCommitsFrom(source: Workspace!,commits: [String!] = [],maxCommits: Int = 100): Workspace!

Integrate source commits into this workspace and return the result, preserving this workspace's uncommitted changes and metadata.

Fast-forward when the selected commits include all new ancestors of their tip; otherwise cherry-pick them oldest first. Already integrated commits and patches already present are skipped. Any conflict fails the operation. Source uncommitted changes are not transferred; merge them explicitly if needed. Use compareCommitsFrom to preview the integration.

A local receiver is snapshotted automatically; untracked files require interactive approval. The checkout is not modified. Export the result with an explicit path to write it to a checkout.

Cherry-picks preserve the source author and author date, use the calling client's Git config for committer identity, and reuse the source committer date for reproducible hashes. Origin trailers track cherry-picked commits. Divergent merge commits require manual integration.

source: Workspace!

Git-backed source workspace. For a local checkout, call snapshot on the source first and pass the returned workspace.

commits: [String!] = []

Full lowercase commit hashes or unambiguous lowercase hex prefixes (4-40 characters) to select, in any order. Prefixes resolve against the frozen source's Git objects and are recorded as full hashes; duplicate selections after resolution are rejected. Empty selects all new source commits. Selected commits must be within the source's latest 10000 commits.

maxCommits: Int = 100

Maximum commits in either differing history, from 1 to 1000. Exceeding the limit fails; nothing is silently omitted.

withConfigEnv(name: String!, here: Boolean = false): Workspace!

Return this workspace with a named config environment created.

name: String!

Environment name.

here: Boolean = false

Write to the workspace config directory at the workspace cwd.

withConfigEnvironment(name: String!): Workspace!

Select the config environment carried by this workspace.

name: String!

Environment name, or empty to clear the selection.

withConfigPaths(configFile: String!, lockFile: String!): Workspace!

Select workspace-root-relative config and lockfile paths. Empty paths clear the selection.

configFile: String!

Config file path.

lockFile: String!

Lockfile path.

withConfigValue(key: String!,value: String!,values: [String!],here: Boolean = false): Workspace!

Return this workspace with a configuration value written.

When the session selects an env, the key is scoped to that env's overlay and the env is created if missing.

key: String!

Dotted key path.

value: String!

Value to set. Bools, integers, and comma-separated arrays are auto-detected.

values: [String!]

List value to set. Elements are stored verbatim, with no auto-detection. Mutually exclusive with value.

here: Boolean = false

Write to the workspace config directory at the workspace cwd.

withDirectory(path: String!, source: Directory!): Workspace!

Return this workspace with a directory merged into the given path, without mutating the source.

Anything already at the path stays, and files the source carries win, as with Directory.withDirectory. Use withNewDirectory to replace the path instead.

path: String!

Path to merge into. Relative paths resolve from the workspace cwd.

source: Directory!

Directory to merge there.

withEntrypoint(name: String!): Workspace!

Return this workspace with an installed module selected as its entrypoint.

Every other entrypoint selection is cleared. Entrypoints live in the base workspace config.

name: String!

Exact installed module name.

withFile(path: String!,source: File!,permissions: Int): Workspace!

Return this workspace with a file added or replaced, without mutating the source.

path: String!

Destination path. Relative paths resolve from the workspace cwd.

source: File!

File to add.

permissions: Int

Permissions of the added file. Defaults to the source file permissions.

withInitialized: Workspace!

Return this workspace with a native configuration, without changing an existing configuration.

Fail if legacy configuration needs workspace migration.

withInitModule(sdk: String!,name: String = "",path: String = "",install: Boolean,entrypoint: Boolean,settings: JSON): Workspace!

Return this workspace with a location initialized as a module scope.

The selected SDK module records the scope and generates the module source.

sdk: String!

Workspace SDK name or module entry name to use. Required.

name: String = ""

Module name. The engine infers it from path, the active config file, or the workspace root when omitted.

path: String = ""

Module path relative to the workspace cwd, or an absolute workspace path. Defaults to .dagger/modules/<name> beside the active workspace config.

install: Boolean

Install the module. When omitted, install only if path is omitted.

entrypoint: Boolean

Select this module as the entrypoint and install it. False prevents automatic selection. When omitted, select only if both path and name are omitted and the module is installed.

settings: JSON

Explicit SDK-module constructor setting overrides for this scope.

withModule(ref: String!,name: String = "",here: Boolean = false): Workspace!

Return this workspace with a module installed in its config.

When the session selects an env, the module is recorded in that env's overlay and the env is created if missing.

ref: String!

Module reference to install.

name: String = ""

Override name for the installed module entry.

here: Boolean = false

Write to the workspace config directory at the workspace cwd.

withMountedDirectory(path: String!, source: Directory!): Workspace!

Return this workspace with a directory mounted read-only at the given path, without mutating the source.

Mounted content is readable through the normal workspace file tools but shadows the source at the mount path and stays out of the pending changeset: it never appears in changes, is never exported, and cannot be modified.

path: String!

Location of the mounted directory. Relative paths resolve from the workspace cwd.

source: Directory!

Directory to mount.

withMountedFile(path: String!, source: File!): Workspace!

Return this workspace with a file mounted read-only at the given path, without mutating the source.

Mounted content is readable through the normal workspace file tools but shadows the source at the mount path and stays out of the pending changeset: it never appears in changes, is never exported, and cannot be modified.

path: String!

Location of the mounted file. Relative paths resolve from the workspace cwd.

source: File!

File to mount.

withNewDirectory(path: String!, source: Directory!): Workspace!

Return this workspace with the given path replaced by a directory, without mutating the source.

The source becomes the entire contents of the path: anything already there that the source does not carry is removed. Use withDirectory to keep it instead.

path: String!

Path to replace. Relative paths resolve from the workspace cwd.

source: Directory!

Directory to write there.

withNewFile(path: String!,contents: String!,permissions: Int = 420): Workspace!

Return this workspace with a new or replaced file, without mutating the source.

path: String!

Path of the new file. Relative paths resolve from the workspace cwd.

contents: String!

Contents of the new file.

permissions: Int = 420

Permissions of the new file.

withoutClient(module: String!, sdk: String = ""): Workspace!

Return this workspace with a module client removed from the deepest matching recorded scope.

Fail if several SDKs have that deepest scope. The selected SDK module regenerates the complete scope.

If invalid client targets remain, save the removal and skip generation until those targets are corrected or removed.

module: String!

The recorded target to remove.

sdk: String = ""

Optional SDK name. Search all installed SDKs when omitted.

withoutConfigEnv(name: String!, here: Boolean = false): Workspace!

Return this workspace with a named config environment removed.

name: String!

Environment name.

here: Boolean = false

Write to the workspace config directory at the workspace cwd.

withoutConfigValue(key: String!, here: Boolean = false): Workspace!

Return this workspace with a configuration value removed.

Errors when the key is not currently set.

When the session selects an env, the key is scoped to that env's overlay.

key: String!

Dotted key path (e.g. modules.greeter.settings.greeting).

here: Boolean = false

Write to the workspace config directory at the workspace cwd.

withoutDirectory(path: String!): Workspace!

Return this workspace with a directory removed, without mutating the source.

path: String!

Path of the directory to remove. Relative paths resolve from the workspace cwd.

withoutEntrypoint: Workspace!

Return this workspace with no module selected as its entrypoint.

withoutFile(path: String!): Workspace!

Return this workspace with a file removed, without mutating the source.

path: String!

Path of the file to remove. Relative paths resolve from the workspace cwd.

withoutModule(name: String!, here: Boolean = false): Workspace!

Return this workspace with a module removed from its config.

When the session selects an env, only that env's overlay entry is removed.

name: String!

Installed module name or source to remove. Version selectors are not accepted.

here: Boolean = false

Write to the workspace config directory at the workspace cwd.

withoutMount(path: String!): Workspace!

Return this workspace with the content mounted at the given path unmounted.

Removes directory and file mounts at or below the path, revealing the underlying workspace content. Other mounts and pending changes are preserved.

path: String!

Location of the mount to remove. Relative paths resolve from the workspace cwd. Use / to remove all mounts.

withoutSDK(name: String!, here: Boolean = false): Workspace!

Return this workspace with an SDK removed from its config.

name: String!

Name of the installed SDK entry to remove.

here: Boolean = false

Write to the workspace config directory at the workspace cwd.

withReset(commit: String!, hard: Boolean = false): Workspace!

Move this workspace's Git HEAD to a commit and return the resulting stable workspace.

A local workspace is snapshotted automatically before resetting; untracked files require interactive approval. The host checkout is not modified. By default the difference between the previous working tree and the target commit stays uncommitted, as with git reset --mixed, so history can be reworked and reapplied with withCommit — e.g. to amend the latest commit message, reset to its parent and commit again.

With hard, the working tree is reset to the commit and every uncommitted change is discarded.

Commits orphaned by the reset are not preserved: the frozen repository keeps reachable history only, so a reset cannot be undone by resetting forward again.

commit: String!

Full commit hash to reset HEAD to.

hard: Boolean = false

Discard uncommitted changes, resetting the working tree to the commit.

withSDK(ref: String!,name: String = "",here: Boolean = false,asSdkName: String = ""): Workspace!

Return this workspace with an SDK installed in its config.

ref: String!

SDK module reference to install.

name: String = ""

Override name for the installed SDK entry.

here: Boolean = false

Write to the workspace config directory at the workspace cwd.

asSdkName: String = ""

Optional override for the SDK name conventionally derived from the installed module name.

withUpdatedClients(modules: [String!] = [],all: Boolean = false,sdk: String = ""): Workspace!

Return this workspace with the selected module clients updated.

The engine re-reads the source of each selected client target and writes the lock entries that those targets reach.

The selected SDK module then regenerates every scope that owns one of the targets.

modules: [String!] = []

Recorded client targets to update. All targets in the selected scopes are updated when omitted.

all: Boolean = false

Select clients in every scope instead of only the scopes containing the workspace cwd.

sdk: String = ""

Optional SDK name. All installed SDK modules are selected when omitted.

withUpdatedLock(noGenerate: Boolean = false): Workspace!

Return this workspace with refreshed lockfile state.

SDK client scopes are regenerated unless noGenerate is true.

noGenerate: Boolean = false

Do not regenerate SDK client scopes.

withUpdatedModules(names: [String!] = [], version: String = ""): Workspace!

Return this workspace with updated module versions and lockfile state.

An SDK client scope is regenerated when it targets an updated module.

names: [String!] = []

Installed module names or sources. A version suffix sets a new request. An empty list refreshes all installed modules.

version: String = ""

New version request for exactly one selected module. Cannot be combined with a version suffix.

withWorkdir(path: String!): Workspace!

Return this workspace with its working directory pointed at the given workspace-relative path.

path: String!

Workspace-relative path to use as the working directory.

References

Returned by

Accepted as an argument by