mise lock
- Usage:
mise lock [FLAGS] [TOOL]… - Effect: modifies state
- Source code:
src/cli/lock.rs
Create or refresh lockfile versions, checksums, and download URLs
Operates on the current config root, including tools declared by tasks. Existing matching locked versions are preserved unless --bump re-resolves their selectors. This command writes lockfiles without installing tools; --dry-run previews changes.
Use --platform for explicit targets. Otherwise mise uses lockfile_platforms plus the current platform when that setting is configured, existing lockfile platforms when available, or the common platform defaults for a new lockfile.
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 omitted, use lockfile_platforms, existing platforms, or common defaults--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
create or refresh the project lockfile
mise lockupdate only node and python
mise lock node pythonupdate only linux-x64 platform
mise lock --platform linux-x64show what would be updated
mise lock --dry-runre-resolve selectors like "latest" or "20" to the latest matching versions
mise lock --bumplist available updates as JSON without writing
mise lock --bump --dry-run --jsonlock latest/fuzzy versions released before 2024-01-01
mise lock --minimum-release-age 2024-01-01update mise.local.lock for local configs
mise lock --localupdate only global config lockfiles
mise lock --global