Skip to content

Install, Switch, and Inspect ​

These are the everyday commands: install and lock, set the current version, inspect local and remote versions, run temporarily, and define version and tool-name aliases. See the runtime pages for backend options and Reproducible Lockfiles for exact lock read/write rules.

Install, lock, check, and upgrade ​

text
osdk install|i [TOOL[@VERSION] ...] [-o|--opt KEY=VALUE ...] [--include-lazy]
osdk lock [TOOL[@VERSION] ...] [-o|--opt KEY=VALUE ...]
osdk outdated [TOOL[@VERSION] ...]
osdk upgrade [TOOL[@VERSION] ...] [-o|--opt KEY=VALUE ...]
osdk upgrade -g|--global [TOOL ...]
CommandBehavior
installInstall tools and generate shims; a bare project install consumes the current-platform lock when present, otherwise resolves configuration and records an exact lock; lazy entries are skipped unless --include-lazy is present
lockResolve requests and write a platform-partitioned osdk.lock; do not install; floating Rust channels remain channel names
outdatedRe-resolve configuration or explicit requests and report targets not installed; never read the lock
upgradeRe-resolve, install, and refresh the lock; never use the old lock as resolution input

-o/--opt is repeatable and must be KEY=VALUE. A later duplicate wins. The same option set is applied to every tool in a multi-tool command, so do not mix backend-specific options with unrelated tools.

bash
osdk --jobs 4 install node@20 go@1.22 python@3.12
osdk install --include-lazy
osdk install rust@stable -o profile=minimal -o components=clippy,rustfmt
osdk lock node@20 -o arch=arm64
osdk outdated node@20 python@3.12
osdk upgrade

Explicit install TOOL... is a one-shot shared installation and changes neither project [tools] nor the lock. Use osdk use TOOL@VERSION to add a project selection; it installs the tool and atomically updates project configuration and the current-platform lock.

A structured [tools] entry with lazy = true stays out of a no-argument install by default. --include-lazy includes all such entries. The flag is not needed for explicit operands: naming a tool is already an explicit request to install it. Runtime dependencies of an included tool are installed even when their own declaration is lazy. Until a lazy tool is installed, shell activation, osdk env and tool-less osdk exec leave it out instead of failing, since being absent is its normal state.

See Reproducible Lockfiles for the exact read/write matrix. Floating Rust channels such as stable, beta, and nightly are not frozen to a concrete release. Use an explicit or dated toolchain for immutable rebuilding.

Upgrade global tools ​

bash
osdk upgrade -g github:lejunyang/ai-auto-desktop
osdk upgrade -g aad  # a unique command of an installed global tool
osdk upgrade --global

-g/--global reads only user tool selections, sources, and settings. It ignores the current project's configuration, version files, and lock, even when that configuration is invalid or untrusted. With no names it upgrades every applicable global selection, including lazy entries; names or configured aliases limit the upgrade to those tools and their managed runtimes. Incompatible when entries are excluded. Results update osdk.lock beside user config.toml, preserving unrelated tools and other platforms without changing project files.

Tool names and configured aliases take priority. Otherwise, a command exported by an installed global selection, such as aad, can identify the tool. Lookup follows shim include/exclude settings and never guesses package-name suffixes, searches PATH, or executes external programs. Multiple selections exporting the command produce an error listing the candidates; pass the full tool ID or a configured alias. Inactive versions, unselected installs, and commands withheld as dependency bins do not participate.

Global upgrades preserve version constraints, backend options, when, and lazy: 20 stays within 20.x and an exact pin keeps its version. Global mode accepts tool names, configured aliases, or unique managed commands, without @VERSION or -o. Change a constraint or option with osdk use -g TOOL@VERSION -o KEY=VALUE; add unselected tools with use -g first. npm: packages retain their controlled global npm/pnpm prefix and native lock rather than entering the isolated project install path.

Set the current version and uninstall ​

text
osdk use|u TOOL[@VERSION] [-g|--global] [-o|--opt KEY=VALUE ...]
osdk uninstall|rm TOOL@VERSION

use installs and generates shims, then writes a pin. By default it updates the nearest project configuration, creating osdk.toml in the current directory if none exists. --global updates user config.toml. An explicit prefix or channel is preserved; a bare tool stores the exact resolved version.

An explicit use TOOL@latest (including -g) resolves the newest matching release from the configured version source before checking local installations. It installs and selects a newer release, or reports the resolved target as up to date and reuses it. Other explicit prefixes or ranges also resolve first; bare use TOOL can reuse a local match. upgrade always resolves its constraints again; install --force reinstalls a version. Offline resolution uses cached metadata or a local catalog and cannot establish whether upstream has changed.

uninstall normally expects an exact version, which must be installed (17.0.10 also names the install 17.0.10+7; anything else is an error rather than a reported success). A prefix selects an installed version named exactly that, otherwise the newest installed version whose leading segments match (go@1.2 never matches 1.22.x); other non-exact requests are rejected. Bare rust is the exception and removes stable. It asks for confirmation, so pass --yes in automation. When a regular dynamic tool is removed, osdk also removes any user-global pin and user lock entry that still select that version; project configuration and project locks are unchanged. Newly unreferenced CAS objects are collected afterward. When a configured tool is not installed, shell activation does not silently use a same-named command from the system PATH: the prompt hook activates the other installed tools and prints, once above the prompt, osdk: <dir>: not installed: node@20; the other tools are active. Run osdk install to install them (once per directory and set of missing tools). osdk env, osdk exec without --tool, and tasks see that same environment: a missing tool is named once on stderr and left out, and everything else is available, so a tool that is declared but not needed this time (an Android SDK on a CI job that does not build Android) does not fail the command before it runs. Declare what a command does need: osdk exec --tool, or a task's tools list, whose tools are installed on demand and fail the task if they are still missing.

Inspect local and remote versions ​

text
osdk list|ls [TOOL]
osdk list-remote|lsr TOOL [FILTER]
osdk current [TOOL]
osdk current TOOL --sources [--project DIR] [--json] [--probe]
osdk where TOOL[@VERSION]
osdk reshim
CommandExact semantics
list [TOOL]List local versions with completion markers; without a tool, include registered backends and inventory-backed dynamic tools found on disk, including GitHub, Cargo, and Go command tools
list-remote TOOL [FILTER]List stable remote versions; optional FILTER is a string prefix
current [TOOL]Show the raw request and discovery source for the current directory; the request need not be installed or remotely resolved. When several declarations compete, the losing ones are listed indented under the tool (shadowed/ignored with the reason); current TOOL --sources --json has the full structured record
where TOOL[@VERSION]With an explicit selector (including prefixes such as 21 or build-number-less 21.0.12), select only from installed versions using the same matching rules as install and error when nothing matches, without reading the project selection; a bare tool resolves the active version (project ecosystem files, config, dynamic shim request), falling back to the last installed entry
reshimRegenerate shims for installed built-in and inventory-backed dynamic tools, and coordinate npm/npx routing

current node and where node answer different questions: the former shows the project selection (which need not be installed), while the latter prints an installed directory — a bare tool follows the active version, and an explicit where node@<selector> locates strictly among installed versions. Give a selector when a script needs a deterministic path.

Temporary execution ​

text
osdk exec [(-t|--tool TOOL[@VERSION])...] -- COMMAND [ARG ...]

-t/--tool is repeatable. osdk installs the requested versions, then exposes their bins and environment to the requested command. It neither changes project pins nor reads the lock.

Without any --tool, the command runs with the environment an activated shell would have in this directory, and nothing is installed. This is the entry point for IDE tasks, CI steps and scheduled jobs that have no shell hook; see Without a shell hook, which also covers osdk env for exporting that environment.

Without @, the operand inherits the pin in effect. -t java means "the Java this project selected": osdk walks up for osdk.toml, .tool-versions and the idiomatic version files following the working-directory precedence. Only -t java@<selector> overrides it -- including an explicit @latest. The rule is the same for install, exec, lock, outdated and upgrade, and latest remains the fallback when nothing is configured.

bash
osdk exec --tool node@20 -- node --version
osdk exec --tool node@20 --tool pnpm@10 -- pnpm test
osdk exec -t bun@latest -- bunx vite
osdk exec -t java -- ./gradlew build   # uses the project's pinned JDK

pnpx routes to managed pnpm dlx and bunx to managed bun x; omitting the corresponding backend is an error. A package-manager invocation may run registry preflight before startup. osdk passes through the command's exit code and adds no error line of its own, so osdk exec -- cargo test; echo $? sees the test runner's code.

On Unix, the command takes over the osdk exec PID when it starts. A SIGTERM or SIGINT sent to that PID goes directly to the command. If a signal terminates the command, the caller observes that signal, which shells typically report as 128 + signal number. On Windows, osdk waits for the command and returns its exit code.

Version aliases ​

text
osdk alias set TOOL NAME TARGET
osdk alias list [TOOL]
osdk alias unset TOOL NAME
bash
osdk alias set node maintenance 20
osdk alias set node default maintenance
osdk alias list node
osdk use node@default
osdk alias unset node maintenance

The CLI always edits user-global aliases. A project may define [alias.tools.<tool>] manually and override a global name. Alias chains are allowed; cycles are rejected. Names cannot be empty, contain whitespace or @, or use latest, current, stable, system, lts, lts/*, lts-latest, or any lts/ or lts- prefix. alias set also rejects names spelled like a version (20, v20, 20.1), which would otherwise redirect that version everywhere, and alias unset fails for a name that is not defined. Tool aliases are canonicalized before storage.

This kind of alias replaces a version request only. It is expanded by install/use/uninstall, activation, shim selection, and global npm-tool version resolution; it neither renames an executable nor duplicates an installation. [alias] is a category namespace reserved for future capabilities such as alias.shell; only alias.tools exists today, and unknown categories fail explicitly.

Tool name aliases ​

InputCanonical backend
nodejsnode
py, cpythonpython
jdk, openjdkjava
golanggo
rustuprust
mvnmaven
kotlinckotlin

Next, read Projects and Configuration to turn individual commands into a shared project environment.

Use source diagnostics to list supported, present, missing and inapplicable kinds with effective order; default inspection does not execute system tools.

Released under the MIT License