Repository navigation
Description
Context
In 1.0-beta, you manage Dagger SDKs directly from the command line. They are modules under the hood, but they have extra capabilities, so the CLI exposes them both as regular modules, and also in special commands.
Installing a module as an SDK also writes to dagger.toml. It goes inside the module's own entry, in an as-sdk sub-table. The SDK name, the modules it claims, and the clients it generates all live in there.
Problem
The split between "SDK is a regular module" and "SDK has its own native commands" creates some confusion in the CLI. Specifically:
SDK name vs. module name
# Accept a "SDK name", translate to a different "regular module name" under the hood
$ dagger sdk install go
# Don't accept the SDK name. User must guess the regular module name on their own
$ dagger settings dagger-go-sdkRound-trip of death
First-time users must survive a round-trip from dagger module ("why can't I do anything") to dagger sdk ("what is a SDK and how do I get one") back to dagger module ("how do I use my SDK").
Then later, another round-trip: dagger client -> dagger sdk -> dagger client
# 1. Why can't I do anything?
$ dagger module init --help
<WALL OF TEXT>
<NO AVAILABLE COMMAND>
# 2. What is a SDK and how do I get one
$ dagger sdk search
$ dagger sdk install FOO
# 3. How do I use my SDK
$ dagger module init FOOdagger.toml: SDKs are hidden
There's a top-level table for modules, and one for environments. There's none for SDKs. To find out which SDKs a workspace has, you read every module entry and check for an as-sdk sub-table. The SDK name is a value, not a key, so it doesn't show up where names normally show up.
# A module. Is it an SDK? Keep reading.
[modules.dagger-go-sdk]
source = "github.com/dagger/go-sdk"
# ...110 lines later
[modules.dagger-go-sdk.as-sdk]
name = "go"dagger.toml: death by array-of-tables
Each claimed path takes three lines: a [[...]] header, a path, and a blank line. In dagger/dagger that's 86 lines for 2 SDKs and 27 claimed modules — a third of the file, for what is really two lists of strings. And TOML won't let you re-open a table, so they can't sit next to the module they belong to. They end up in a pile at the bottom of the file.
[[modules.dagger-go-sdk.as-sdk.modules]]
path = "modules/alpine"
[[modules.dagger-go-sdk.as-sdk.modules]]
path = "modules/git-releaser"
[[modules.dagger-go-sdk.as-sdk.modules]]
path = "modules/wolfi"
# ...13 moreSolution
- Group all module operations under
dagger module: no more round trips - Harmonize SDK-managed modules and clients under the umbrella term "scopes"
- Simplify configuration model around scopes
Activity
TomChv commentedon Aug 18, 2026
Few questions
dagger sdk <SDK> module removeSo that means we also uninstall the module from the dagger.toml and remove the sources?
Should we remove the module directory or only the generated files + dagger-module.toml? Technically there could be other files in the module's directory, specially if the module's source path is outside
.dagger/modules.dagger sdk <SDK> client/module claimedWhy not just
-l?dagger sdk <SDK> module claimableDo we have a use case for that? I'm not sure I understand in which scenario this would be used.
Except maybe after a
dagger setupbut the setup will already migrate the existing modules so I don't know if that make sense.dagger sdk <SDK> infoWhat info exactly should we displayed? I understand the capabilities but should we also display the module description or something else?
shykes commentedon Aug 18, 2026
Yes, it would:
dagger sdk <SDK> unclaim)dagger uninstall)rm -fr)I was assuming just remove the contents of the directory, but you're right that in some cases it would remove too much.
For now I will just drop
dagger sdk <SDK> removeMore consistent with
dagger install/dagger installed, and more precise since it distinguishes claimed modules from existing-but-unclaimed modules.I actually had this problem. When we migrated this repo to 1.0, we forgot to claim
.dagger/modules/go. So,dagger generatewas silently failing to re-generate that module, since no SDK was managing it. I only discovered the issue by chance.dagger sdk <SDK> claimablewould help surface that information.I think for now, something like:
Really the only information we really need right now, is the module name
shykes commentedon Aug 18, 2026
@TomChv I'm starting to think you're right on
dagger sdk <SDK> module list. More predictable. Maybe the "claimable" concept is overkill. If I'm in this situation I can just calllistand check if everything is in there. Makes everything simpler.fix(cli): harden dynamic SDK workflows
feat(cli): streamline SDK workflows
fix(cli): harden dynamic SDK workflows
fix(cli): complete SDK workflow migration
feat(cli): streamline SDK workflows
fix(cli): harden dynamic SDK workflows
fix(cli): complete SDK workflow migration
feat(cli): streamline SDK workflows
fix(cli): harden dynamic SDK workflows
fix(cli): complete SDK workflow migration
5 remaining items
feat(cli): streamline SDK workflows
fix(cli): harden dynamic SDK workflows
fix(cli): complete SDK workflow migration
feat(cli): streamline SDK workflows
fix(cli): harden dynamic SDK workflows
fix(cli): complete SDK workflow migration
feat(cli): streamline SDK workflows
fix(cli): harden dynamic SDK workflows
fix(cli): complete SDK workflow migration
marcosnils commentedon Sep 3, 2026
next steps are to add support for Go SDK and dang SDK.