SDKMAN¶
- ID
sdkman- Home page
- Version requirement
>= 5
- Platforms
🐧 Linux · 🍎 macOS
- Operations
installed·outdated·install·upgrade·upgrade_all·remove·sync·cleanup- purl types
pkg:sdkman- CLI name
sdkman-init.sh- Extra search paths
~/.sdkman/bin- Forced environment
sdkman_auto_answer=true·sdkman_colour_enable=false- Issues and PRs
- Source
SDKMAN! manages parallel versions of multiple Software Development Kits on Unix-based systems.
Note
SDKMAN! primarily serves the JVM ecosystem: Java, Gradle, Maven, Kotlin, Scala, and ~115 other candidates. Each candidate is treated as a package.
Caution
The sdk command is a shell function, not a standalone binary, so mpm
detects SDKMAN by its init script (sdkman-init.sh) rather than a binary
on PATH and wraps every invocation in
bash -c 'source <init> && sdk <args>'.
Note
SDKMAN has no read-only “outdated” verb, so outdated pipes n into
sdk upgrade to capture the candidate list without applying any upgrade.
What mpm adds to sdkman¶
mpm reaches across every manager at once, not sdkman alone: mpm installed and mpm outdated cover sdkman alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your sdkman commands, in mpm¶
You already know sdkman: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
Clear caches |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
|---|---|
|
✓ |
|
✓ |
|
|
|
|
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
Selecting and configuring sdkman¶
Deselect sdkman for a single run with --no-sdkman, or persist the choice in your configuration:
[mpm]
sdkman = false
The arguments and environment variables listed in the box atop this page are forced on every sdkman call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.
Keep it enabled but tune how mpm drives it with a per-manager override:
[mpm.managers.sdkman]
timeout = 900
mpm config-template sdkman prints every overridable attribute as a ready-to-paste block.
Recipes¶
A few jobs you would otherwise script around sdkman, one mpm command each:
Snapshot and clone a machine:
mpm --sdkman dump sdkman.toml, thenmpm restore sdkman.tomlon the next one.Export a compliance SBOM:
mpm --sdkman sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.
See privilege escalation for the full policy.
Cooldown¶
State of SDKMAN’s release-age gating, from the cooldown support table:
Status: ❌ None
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: SDKMAN broker
Retraction: Unpublish: the vendor release endpoint “supports POST and DELETE HTTP methods” (vendor API)
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.
Version probe¶
The version is probed by running:
$ sdkman-init.sh version
SDKMAN!
script: 5.18.2
native: 0.4.6
and extracted with:
r"script:\s+(?P<version>\S+)"
Reference traces¶
Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know SDKMAN well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ sdk current
Using:
groovy: 4.0.22
java: 21.0.4-tem
scala: 3.4.2
Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --sdkman installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.