Add completion spec: SDKMAN! (sdk)#220
Merged
Merged
Conversation
Add JSON spec for the SDKMAN! SDK manager command with all subcommands: install, uninstall, list, use, default, home, current, upgrade, env, version, selfupdate, update, flush, config, and help (with aliases). Add three Rust generators: - candidates: reads local SDKMAN candidate cache - installed_versions: lists installed versions for a given candidate - available_versions: queries SDKMAN API for all available versions Co-Authored-By: Oz <oz-agent@warp.dev>
APP-3515 Add sdkman completion spec + version generator
No See GitHub #3344 |
Contributor
Author
peicodes
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds a completion spec and generators for the SDKMAN! CLI (
sdkcommand), addressing APP-3515.Changes
JSON Spec (
command-signatures/json/sdk.json)Complete spec for all 15 SDKMAN subcommands with aliases:
install/i,uninstall/rm,list/ls,use/u,default/dhome,current/c,upgrade/ug,env,version/vselfupdate,update,flush,config,help/hStatic suggestions for
env(init/install/clear),flush(tmp/metadata/version),selfupdate(force), andhelpsubcommands.Rust Generators (
command-signatures/src/generators/sdk.rs)Three generators, all using
${SDKMAN_DIR:-$HOME/.sdkman}for portability:candidates— Reads the local SDKMAN candidate cache (var/candidates) and splits by comma. Used byinstall,list,use,default,home,current,upgrade,uninstall.available_versions— Queries the SDKMAN API (api.sdkman.io/2/candidates/<candidate>/<platform>/versions/all) using the platform stored invar/platform. Context-aware viacommand_from_tokens. Used byinstall.installed_versions— Lists installed versions from the local filesystem (candidates/<candidate>/), filtering out thecurrentsymlink. Context-aware viacommand_from_tokens. Used byuse,uninstall,default,home.Generator Verification
All three generators were tested end-to-end in a local Warp build:
candidatesgenerator (sdk install <Tab>)Shows SDK candidate names (activemq, ant, asciidoctorj, ballerina, bld, bpipe, ...) each labeled "SDK candidate" in the completions dropdown.
available_versionsgenerator (sdk install gradle <Tab>)Queries the SDKMAN API and shows available Gradle versions (0.7, 0.8, 0.9, 0.9.1, 0.9.2, 1.0, ...) each labeled "Available version" in the completions dropdown.
installed_versionsgenerator (sdk use gradle <Tab>)After installing Gradle 8.14.2, shows the installed version. With a single installed version, Warp auto-completed inline (expected single-match behavior).
Conversation: https://staging.warp.dev/conversation/c67c54da-df9a-431c-be9e-6acf2a5885c8
Run: https://oz.staging.warp.dev/runs/019d4aa7-1b41-7b62-9c12-efc5036cb695
This PR was generated with Oz.