CI and offline use
jup can download a project's package manager before a build starts, then run entirely from its local cache. This makes package manager installation repeatable in CI, containers, and isolated environments.
#Cache the project package manager
Run this while the registry is available:
jup installjup reads the current project pin and downloads that release without changing package.json.
To prove that later commands do not use the network:
JUP_ENABLE_NETWORK=0 pnpm installA missing cache entry produces an error that names the required package manager and version.
#Use jup in CI
A typical CI job installs jup, warms its cache, and then disables network access for package manager resolution:
jup install
JUP_ENABLE_NETWORK=0 pnpm install --frozen-lockfileCache JUP_HOME between jobs if your CI service supports persistent caches. Run jup info to find its effective path.
If packageManager contains a range, commit .corepack.lock. When CI is set, jup refuses to create or update a range resolution by default. Refresh it locally with jup up, review the diff, and commit the result.
Set JUP_FROZEN_LOCKFILE=0 only when a CI job is intentionally responsible for updating .corepack.lock.
#Build a container image
Copy the files that select the package manager before copying the rest of the project:
COPY package.json ./
RUN jup install
ENV JUP_ENABLE_NETWORK=0
COPY . .
RUN pnpm installFor a range pin, include its resolution file in the first layer:
COPY package.json .corepack.lock ./
RUN jup installThe package manager remains in a reusable image layer until the pin changes.
#Cache a specific release
To cache one release without changing a project pin or global fallback:
jup install -g --cache-only pnpm@11.1.2Check the result with:
jup cache list#Prepare an offline archive
On a connected machine, create an archive:
jup pack -o package-managers.tgz pnpm@11.1.2Copy it to the isolated machine and import it:
jup install -g package-managers.tgz
jup cache listjup pack also records the packed version as that manager's global fallback. A fallback applies only when a project has no package manager pin.
#Clear cached package managers
Remove downloaded versions while keeping global fallback records and cached signing keys:
jup cache cleanRemove downloaded versions and fallback records together:
jup cache clean --allThe next command that needs a removed release must download it again. For details about what jup checks before caching a download, read Download verification.