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 requests. This command does not install tools; --dry-run previews changes.
mise lock TOOL@VERSION locks that exact version. When the version falls outside the configured request, such as tiny@3.0.1 with tiny = "2", mise also updates the request in mise.toml to match.
Arguments
[TOOL]…— Tools to lock, such asnode python; defaults to every configured tool and every tool a task needsUse
tool@versionto lock an exact version. If it falls outside the configured request, mise.toml is updated to match.
Flags
-g --global— Lock only the global and system config lockfilesThese are ~/.config/mise/mise.lock and the system config's lockfile. By default, only the current project's config root is locked.
-j --jobs <JOBS>— How many jobs to run in parallel; defaults to thejobssettingValues below 1 are treated as 1.
Environment Variable:
MISE_JOBS-n --dry-run— Show what would change, without writing anything-p --platform <PLATFORM>— Platforms to lock, comma-separated, such aslinux-x64,macos-arm64Defaults to the
lockfile_platformssetting plus the current platform when that setting is configured, else the platforms already in the lockfile, else a common set for a new lockfile.--bump— Re-resolve version requests against the latest available versionsBy default,
mise lockrefreshes metadata for the currently locked versions. With this flag, requests such as "latest", "lts", or prefixes such as "24" are re-resolved against the latest matching remote versions, so the lockfile advances without installing anything.--bumpnever modifies config files: exact versions resolve to themselves and stay unchanged (usemise upgrade --bumpto rewrite pins in mise.toml). If the remote versions cannot be fetched, it fails rather than keep the locked version.--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 and URL refreshes for unchanged versions produce no entries, so
mise lock --jsonprints[]when no version changed, even though it still updates the lockfile. Suppresses the human-readable output. Combine with--dry-runto detect available updates without writing the lockfile.--local— Update mise.local.lock, for tools in mise.local.toml, instead of mise.lock--minimum-release-age <AGE>— Only lock versions released before a date or at least a duration agoTakes a date such as
2024-06-01or a duration such as90dor1y. Overrides theminimum_release_agesetting and tool option. It filters only requests that are not exact, such as "24" or "latest"; exact versions such as "24.11.0" are not filtered. Existing matching lockfile entries are kept; this flag alone does not downgrade them.--upgrade— Upgrade lockfiles to the latest formatmise keeps an existing lockfile at its format version during normal updates, so collaborators on an older mise can still read it. This flag rewrites it in the newest format, which adds request bindings, dependency-graph sidecars, and packslip repository IDs. It processes every configured tool and cannot be combined with tool arguments. See https://mise.jdx.dev/dev-tools/mise-lock-reference.html#format-versions.
--sidecars— List native dependency sidecars instead of updating lockfilesBackends such as npm and pypi keep a tool's locked dependency graph in a sidecar directory next to mise.lock; see https://mise.jdx.dev/dev-tools/mise-lock-reference.html#native-dependency-sidecars. For each existing lockfile in scope, prints the sidecar directory mise keeps its dependency graphs in and every sidecar directory the lockfile references. Nothing is resolved, installed, or written. Paths are relative to the current directory when they are inside it, and absolute otherwise, such as the sidecars of a symlinked lockfile. Combine with
--jsonfor machine-readable output, or with--localand--globalto choose the lockfiles.-h --help— Print help
Examples
Create or refresh the project lockfile
mise lockRefresh only node and python
mise lock node pythonLock an exact version; mise.toml keeps a request such as "24"
mise lock node@24.11.0Lock only the linux-x64 platform
mise lock --platform linux-x64Show what would change
mise lock --dry-runRe-resolve requests such as "latest" or "24" to the latest matching versions
mise lock --bumpList available updates as JSON without writing
mise lock --bump --dry-run --jsonLock versions released before 2024-01-01 for requests that are not exact
mise lock --minimum-release-age 2024-01-01Update mise.local.lock
mise lock --localUpdate only the global lockfiles
mise lock --global