explaingit

sdkman/sdkman-cli

6,754ShellAudience · developerComplexity · 2/5Setup · easy

TLDR

A command-line tool for installing and switching between multiple versions of developer tools like Java and Kotlin on Linux and macOS using a single `sdk` command, note the core is being rewritten in Rust.

Mindmap

mindmap
  root((sdkman-cli))
    What it does
      Install SDKs
      Switch versions
      Remove old versions
    Supported systems
      Linux
      macOS
      Unix shells
    Status
      Maintenance mode
      Rust rewrite pending
      Bug fixes only
    Dev setup
      Gradle build
      Cucumber tests
      JDK 11 required
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Install multiple Java versions and switch between them per terminal session with a single command.

USE CASE 2

Keep Kotlin, Gradle, or Maven versions aligned with project requirements without manually editing PATH.

USE CASE 3

Set up a consistent SDK environment on a new developer machine using a one-line install script.

Tech stack

ShellGradleCucumberRust

Getting it running

Difficulty · easy Time to first run · 5min

Install with a single one-line terminal script on Linux or macOS, no extra tools required.

In plain English

SDKMAN is a command-line tool for managing multiple versions of software development kits on Unix-based systems, including Linux and macOS. The problem it solves is a common one for developers: different projects often require different versions of the same tool, such as Java or Kotlin, and switching between them by hand is tedious and error-prone. SDKMAN lets you install as many versions as you need and switch between them with a single command. Installation is a one-liner run in a terminal: a small script is downloaded and executed, and SDKMAN sets itself up automatically. After that, you can use the sdk command to install a tool, list available versions, switch the active version, or remove one you no longer need. The full catalog of supported tools is listed on the SDKMAN website rather than in this repository. The README includes an important notice: the project is currently being rewritten in Rust under a separate repository. The shell-based codebase here will eventually become a thin launcher for those new Rust commands. At this point, only bug fixes are accepted in this repository, not new features, so the shell code should be considered in maintenance mode. For developers who want to contribute or run the tests, the project uses Gradle and writes its tests in a format called Cucumber, which describes expected behavior in plain-language scenarios. A JDK 11 installation is required for development work. The project is open-source and supported by backers and sponsors through Open Collective, with backend services hosted on DigitalOcean. The README does not include a license section, so license terms would need to be checked in the repository files directly.

Copy-paste prompts

Prompt 1
I am using SDKMAN. Help me write a .sdkmanrc file that pins the Java and Gradle versions for my project so teammates automatically get the same setup.
Prompt 2
Using SDKMAN, walk me through installing Java 17 and Java 21 side by side and switching between them for different projects.
Prompt 3
Help me troubleshoot why my `sdk use java` command is not persisting the Java version change between new terminal sessions.
Open on GitHub → Explain another repo

← sdkman on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.