Skip to main content

Lock File

jnc automatically generates and maintains a pixi.lock file in your workspace. The lock file records the exact versions and hashes of every package resolved for each environment and platform, ensuring fully reproducible builds.

How it works

  1. When you run jnc add, jnc install, or any command that modifies dependencies, jnc solves the environment and writes the results to pixi.lock.
  2. The lock file contains the exact version, build string, and content hash for every package.
  3. On subsequent installs, jnc reads the lock file and installs the exact same packages — no re-solving required.

Committing the lock file

Always commit pixi.lock to version control. This ensures that every developer and CI system gets the same environment.
pixi.toml     # Source of truth for dependency constraints
pixi.lock     # Exact resolved versions (auto-generated)

Updating the lock file

Update all dependencies

jnc update
Re-solves all dependencies within the constraints defined in pixi.toml and updates the lock file.

Update specific packages

jnc update numpy pandas

Upgrade with loosened constraints

jnc upgrade numpy
This loosens the version constraint in the manifest and re-solves.

Frozen and locked modes

Frozen

Install exactly what’s in the lock file, even if the manifest has changed:
jnc install --frozen

Locked

Install from the lock file, but abort if the lock file is out of date with the manifest:
jnc install --locked
This is useful in CI to catch lock file drift.

Lock file for multiple platforms

The lock file contains solutions for every platform listed in your manifest:
[project]
platforms = ["linux-aarch64"]
The linux-aarch64 platform is solved and recorded in pixi.lock, targeting NVIDIA Jetson (JetPack 6) devices. Additional platforms may be supported in the future.