mise lock
- Usage:
mise lock [FLAGS] [TOOL]… - Effect: modifies state
- Source code:
src/cli/lock.rs
Update lockfile checksums and URLs for all specified platforms
Updates checksums and download URLs for all platforms already specified in the lockfile. If no lockfile exists, shows what would be created based on the current configuration, including tools declared by tasks. This allows you to refresh lockfile data for platforms other than the one you're currently on. Operates on the lockfile in the current config root. Use TOOL arguments to target specific tools.
Arguments
[TOOL]…— Tool(s) to update in lockfile e.g.: node python If not specified, all configured and task-specific tools will be updated
Flags
-g --global— Target only global config lockfiles (~/.config/mise/mise.lock and system config) By default, only the active project config root is locked-j --jobs <JOBS>— Number of jobs to run in parallel Values below 1 are treated as 1Environment Variable:
MISE_JOBS-n --dry-run— Show what would be updated without making changes-p --platform <PLATFORM>— Comma-separated list of platforms to target e.g.: linux-x64,macos-arm64,windows-x64 If not specified, all platforms already in lockfile will be updated--bump— Re-resolve fuzzy version selectors against the latest available versionsBy default,
mise lockrefreshes metadata for the currently locked versions. With this flag, selectors like "latest", "lts", or prefixes like "20" are re-resolved against the latest matching remote versions, so the lockfile advances without installing anything. Config files are never modified: exactly pinned versions resolve to themselves and stay unchanged (usemise upgrade --bumpto rewrite pins in mise.toml).--json— Output version changes as JSONPrints an array of objects describing lockfile version changes: name, backend, lockfile, old_versions, new_versions. Version lists keep config/lockfile order; they are not sorted. Only version-level changes are reported: checksum/URL refreshes for unchanged versions produce no entries, so plain
mise lock --jsontypically prints[]while still updating the lockfile. Suppresses the human-readable output. Combine with--dry-runto detect available updates without writing the lockfile.--local— Update mise.local.lock instead of mise.lock Use for tools defined in .local.toml configs--minimum-release-age <MINIMUM_RELEASE_AGE>— Only lock versions released before this age or dateSupports absolute dates like "2024-06-01" and relative durations like "90d" or "1y". This only affects fuzzy version matches like "20" or "latest". Explicitly pinned versions like "22.5.0" are not filtered. Existing matching lockfile entries are preserved and are not downgraded solely by this flag.
--upgrade— Upgrade legacy lockfiles to the latest formatExisting unversioned lockfiles use format version 0 and are otherwise preserved to avoid unexpected lockfile drift. This flag upgrades them to the latest format with request-specific version bindings. Format upgrades always process every configured tool and cannot be combined with tool arguments.
-h --help— Print help
Examples:
mise lock # update lockfile for all common platforms
mise lock node python # update only node and python
mise lock --platform linux-x64 # update only linux-x64 platform
mise lock --dry-run # show what would be updated
mise lock --bump # re-resolve selectors like "latest" or "20" to the latest matching versions
mise lock --bump --dry-run --json # list available updates as JSON without writing
mise lock --minimum-release-age 2024-01-01 # lock latest/fuzzy versions released before 2024-01-01
mise lock --local # update mise.local.lock for local configs
mise lock --global # update only global config lockfiles