Skip to content

Add completion spec: SDKMAN! (sdk)#220

Merged
lucieleblanc merged 1 commit into
mainfrom
app-3515/command-spec-sdkman
Apr 1, 2026
Merged

Add completion spec: SDKMAN! (sdk)#220
lucieleblanc merged 1 commit into
mainfrom
app-3515/command-spec-sdkman

Conversation

@lucieleblanc
Copy link
Copy Markdown
Contributor

Summary

Adds a completion spec and generators for the SDKMAN! CLI (sdk command), 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 / d
  • home, current / c, upgrade / ug, env, version / v
  • selfupdate, update, flush, config, help / h

Static suggestions for env (init/install/clear), flush (tmp/metadata/version), selfupdate (force), and help subcommands.

Rust Generators (command-signatures/src/generators/sdk.rs)

Three generators, all using ${SDKMAN_DIR:-$HOME/.sdkman} for portability:

  1. candidates — Reads the local SDKMAN candidate cache (var/candidates) and splits by comma. Used by install, list, use, default, home, current, upgrade, uninstall.

  2. available_versions — Queries the SDKMAN API (api.sdkman.io/2/candidates/<candidate>/<platform>/versions/all) using the platform stored in var/platform. Context-aware via command_from_tokens. Used by install.

  3. installed_versions — Lists installed versions from the local filesystem (candidates/<candidate>/), filtering out the current symlink. Context-aware via command_from_tokens. Used by use, uninstall, default, home.

Generator Verification

All three generators were tested end-to-end in a local Warp build:

candidates generator (sdk install <Tab>)

Shows SDK candidate names (activemq, ant, asciidoctorj, ballerina, bld, bpipe, ...) each labeled "SDK candidate" in the completions dropdown.

available_versions generator (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_versions generator (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).

Note: Screenshots were captured during testing but could not be uploaded via API from the sandbox environment. The screenshots are available locally at /tmp/sdk_candidates.png, /tmp/sdk_available_versions.png, and /tmp/sdk_installed_versions.png.


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.

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>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 1, 2026

APP-3515 Add sdkman completion spec + version generator

No sdk.json spec exists. Version completion is dynamic (queries sdkman API). Need spec + generator from scratch.

See GitHub #3344

Copy link
Copy Markdown
Contributor Author

Generator Screenshots

candidates generator (sdk install )

sdk_candidates

available_versions generator (sdk install gradle )

sdk_available_versions

installed_versions generator (sdk use gradle )

sdk_installed_versions

@lucieleblanc lucieleblanc marked this pull request as ready for review April 1, 2026 20:40
@lucieleblanc lucieleblanc merged commit c33293d into main Apr 1, 2026
3 checks passed
@lucieleblanc lucieleblanc deleted the app-3515/command-spec-sdkman branch April 1, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants