Skip to content

Environment Variables ​

For tool-specific PATH/home selectors, managed child variables and cache override settings, see Tool Environments. The precedence below applies only to implemented settings; it does not provide a universal OSDK_<TOOL>_VERSION.

Every OSDK_* variable osdk reads is listed here, grouped by purpose. Overall precedence is command-line options > OSDK_* variables > project configuration > user configuration > built-in defaults; see Configuration Files for exactly how files merge.

Boolean variables treat 1, true, yes, and on (case-insensitive) as true and any other value as false. An unrecognized value for an enumerated variable is ignored and the configured value stays in effect, except for OSDK_SELECTION as noted below.

Directories ​

VariablePurposeLinux default
OSDK_DATA_DIRData root: installs, CAS, shims, models~/.local/share/osdk
OSDK_CACHE_DIRCache root: downloads, metadata, native caches~/.cache/osdk
OSDK_CONFIG_DIRConfiguration directory: config.toml, trust records~/.config/osdk
OSDK_STORE_DIRContent-addressed store<data>/store
OSDK_INSTALL_DIRSDK installations<data>/installs

The installer asks for the first three and writes them into your shell startup files, so they rarely need to be set by hand. Derived directories and the CAS are described in Directories and Storage.

Behavior settings ​

These override the fields of the same name in [settings], [sources], and [container].

VariableConfiguration fieldValues
OSDK_JOBSsettings.jobsPositive integer; also the variable for --jobs
OSDK_MODEL_JOBSsources.model_jobsPositive integer; the variable for --model-jobs
OSDK_YESsettings.yesBoolean; answers yes to every confirmation
OSDK_OFFLINEsettings.offlineBoolean; forbids the network and uses caches only
OSDK_LINK_MODEsettings.link_modeauto, hardlink, reflink, copy, symlink
OSDK_LANGOutput languageen, zh; takes precedence over configuration and the system locale
OSDK_PRERELEASEsettings.prereleasenever, if-explicit, allow
OSDK_NPM_DEFAULT_INSTALLERsettings.npm.default-installernpm, pnpm
OSDK_OVERRIDE_TOOLS_ENVsettings.override_tools_envBoolean; can only turn it on, not off when configuration enables it
OSDK_PYTHON_CATALOG_URLsettings.python.catalog_urlHTTP(S) URL or local path
OSDK_PYTHON_CATALOG_SHA256settings.python.catalog_sha256Hex SHA-256
OSDK_JAVA_CATALOG_URLsettings.java.catalog_urlURL
OSDK_CONTAINER_RUNTIMEcontainer.runtimeauto, docker, containerd
OSDK_CONTAINER_BUILDERcontainer.builderauto or a validated Buildx builder name
OSDK_CONTAINER_PLATFORMcontainer.platformruntime or OS/ARCH[/VARIANT]

Sources and security ​

VariableConfiguration fieldValues
OSDK_SELECTIONsources.selectionauto, pinned, ordered; an unknown value falls back to auto
OSDK_SOURCE_MODEsources.modeauto, env; the variable for --source-mode
OSDK_VERIFY_SIGNATURESsettings.verify_signaturesBoolean
OSDK_REQUIRE_CHECKSUMSsettings.require_checksumsBoolean
OSDK_ATTESTATIONSsettings.attestationsoff, if-available, required
OSDK_TRUSTED_CONFIG_PATHS—Reviewed files or directories joined with the OS path separator; project configuration under them is trusted for this process. See Project Configuration Trust

OSDK_SOURCE_MODE decides how ecosystem-native mirror variables such as RUSTUP_DIST_SERVER, GOPROXY, and npm_config_registry are used; see Download Sources and Mirrors.

Credentials ​

Variables on the left win. osdk sends a credential only to that service's official endpoints and drops it on a cross-origin redirect.

ServiceVariables
GitHub APIOSDK_GITHUB_TOKEN, GITHUB_TOKEN, GH_TOKEN
Hugging FaceOSDK_HF_TOKEN, HF_TOKEN, HUGGING_FACE_HUB_TOKEN
ModelScopeOSDK_MODELSCOPE_TOKEN, MODELSCOPE_API_TOKEN
CivitaiOSDK_CIVITAI_TOKEN, CIVITAI_API_TOKEN, CIVITAI_TOKEN

Model endpoints can also be overridden with HF_ENDPOINT, MODELSCOPE_ENDPOINT / MODELSCOPE_DOMAIN, and CIVITAI_ENDPOINT; see Model Snapshots for precedence.

Logging ​

VariablePurpose
OSDK_LOGA tracing filter that replaces the -v defaults; for example OSDK_LOG=debug enables debug logs for every crate

Installer scripts ​

install.sh / install.ps1 read these only while installing osdk itself; osdk does not read them at runtime:

VariablePurpose
OSDK_VERSIONVersion to install; defaults to latest
OSDK_BIN_DIRDirectory for the executables; unrelated to the SDK state directory OSDK_INSTALL_DIR
OSDK_REPOSITORYGitHub owner/repo
OSDK_DOWNLOAD_BASE_URLRoot URL of GitHub or a download mirror
OSDK_TARGETOverrides the detected platform target
OSDK_SKIP_VERIFY1 skips SHA-256 verification; not recommended
OSDK_SETUP_SHELLSShells to configure: all, none, or a comma-separated list
OSDK_ACCEPT_DEFAULTS1 accepts every default without prompting

See Installation for every option.

Variables osdk sets itself ​

osdk sets these for child processes or the shell to track state. Do not set them by hand:

VariableMeaning
OSDK_TASK, OSDK_TASK_NAME, OSDK_TASK_ROOTThe process is a task started by osdk run, its name, and its project root; inside that root shell hooks skip re-activation when they see OSDK_TASK, and outside it they drop these variables and activate as usual
OSDK_SHIM_ACTIVELegacy internal shim marker; inherited values are ignored and removed when launching tools. No user configuration is needed
OSDK_MANAGED_ENV, OSDK_ORIG_<NAME>Variables taken over during activation and their original values, restored by deactivate
OSDK_MISSING_WARNEDThe missing-tool warning activation already showed (directory and tool set), so it is not repeated at every prompt
OSDK_ADDED_PATHThe PATH entries the last activation added; the next prompt replaces exactly these and deactivate removes them. Sessions from older versions carry OSDK_ORIGINAL_PATH instead and are migrated at the next prompt

[settings.download_cache] has max_size_bytes (default 2147483648; 0 retains none; "unlimited" disables size limit) and max_age_secs (default 604800; 0 disables expiry). OSDK_DOWNLOAD_CACHE_MAX_SIZE overrides size. See Caches and Cleanup.

Released under the MIT License