Installation
osdk provides prebuilt binaries for Windows, macOS, and Linux. Each release archive installs three sibling programs: the main osdk CLI, osdk-shim, which launches active tools, and the private osdk-aube helper used for process-isolated Aube global installs. Keep all three in the same directory.
Linux and macOS
Run the one-line installer:
curl --proto '=https' --tlsv1.2 -sSf \
https://raw.githubusercontent.com/lejunyang/one-sdk/main/install.sh | shThe default destination is ~/.local/bin. Make sure it is on PATH:
export PATH="$HOME/.local/bin:$PATH"Add that line to ~/.bashrc or ~/.zshrc to persist it.
Windows
Run this in PowerShell:
irm https://raw.githubusercontent.com/lejunyang/one-sdk/main/install.ps1 | iexThe default destination is %LOCALAPPDATA%\Programs\osdk\bin. Add it to your user PATH if the installer reports that it is missing.
Customize the installation
Piping is convenient for the defaults. Download the script first when passing arguments.
Unix options
curl -sSfLO https://raw.githubusercontent.com/lejunyang/one-sdk/main/install.sh
sh install.sh \
--version 0.0.1 \
--install-dir "$HOME/bin" \
--repository lejunyang/one-sdk \
--target x86_64-unknown-linux-gnu| Option | Environment variable | Purpose |
|---|---|---|
--version | OSDK_VERSION | Version with or without v; defaults to latest |
--install-dir | OSDK_BIN_DIR | Binary destination |
--repository | OSDK_REPOSITORY | GitHub owner/repo |
--base-url | OSDK_DOWNLOAD_BASE_URL | GitHub or mirror base URL |
--target | OSDK_TARGET | Override automatic platform detection |
--skip-verify | OSDK_SKIP_VERIFY=1 | Skip SHA-256 verification; not recommended |
Run sh install.sh --help for the complete help text.
PowerShell options
Invoke-WebRequest `
https://raw.githubusercontent.com/lejunyang/one-sdk/main/install.ps1 `
-OutFile install.ps1
.\install.ps1 `
-Version 0.0.1 `
-InstallDir "$HOME\bin" `
-Repository lejunyang/one-sdk `
-Target x86_64-pc-windows-msvcPowerShell accepts -Version, -InstallDir, -Repository, -BaseUrl, -Target, and -SkipVerify, plus the environment variables in the table.
Verification
Both installers download SHA256SUMS from the release and verify the archive by default. Skip verification only if you have authenticated the artifact through another trusted channel.
Build from source
Rust 1.91.1 or newer is required; the repository pins Rust 1.98.0 by default:
git clone https://github.com/lejunyang/one-sdk.git
cd one-sdk
cargo build --locked --releaseThe binaries are written to:
target/release/osdk
target/release/osdk-shim
target/release/osdk-aubePlace all three files in the same directory and add that directory to PATH. osdk-aube is a packaged implementation helper, not a command users normally invoke directly.
If Rust is already installed, you can install the primary command and private Aube helper from crates.io:
cargo install osdk-cli --lockedosdk-shim is a separate package. The Release installer above remains the recommended complete installation because it installs same-version osdk, osdk-shim, and osdk-aube programs together.
In mainland China, you may want to configure a rustup mirror first:
export RUSTUP_DIST_SERVER=https://rsproxy.cn
export RUSTUP_UPDATE_ROOT=https://rsproxy.cn/rustup
curl --proto '=https' --tlsv1.2 -sSf \
https://rsproxy.cn/rustup-init.sh | sh -s -- -yVerify the installation
osdk --version
osdk doctordoctor displays data, cache, store, and installation directories along with the link mode and backend status.
First use
# Install Node.js
osdk install node@20
# Set it as the global default and generate shims
osdk use -g node@20
# Check the effective version
node --versionYou can use shell activation instead of relying on fixed shims:
eval "$(osdk activate bash)" # zsh, fish, and powershell are supported too