---
title: reed prefetch
description: The one command that touches the network. Run it once per machine.
---

```sh
reed prefetch
```

Populates the local caches that let `build` and `dev` run with no network access. This is
**the only command in the Reed CLI that is expected to reach the network**, and it is
never invoked implicitly by another command.

**Prerequisites:** network access, and a Corepack-resolvable package manager.

## No `--dir`

`prefetch` rejects an explicit `--dir`. Its caches are machine-wide, not per project —
accepting a project path would imply a per-project store that does not exist. One
prefetch serves every Reed project on the machine.

## What it populates

<ParamField name="REED_STORE_DIR" type="env" default="~/.reed/pnpm-store">
  The pinned dependency store that offline installs read from.
</ParamField>

<ParamField name="COREPACK_HOME / REED_COREPACK_HOME" type="env">
  Corepack's own cache of the pinned package-manager binary — a distinct cache from the
  store above.
</ParamField>

**Both matter.** A CI job that restores only one of them still builds on a networked
runner while quietly fetching the other over the network. See
[Offline builds in CI](/docs/ship/ci-offline).

## When to re-run it

Once per machine, and again when Reed bumps its pinned package-manager version. A stale
or missing prefetch makes the next `build` fail fast with a Reed-specific diagnostic
rather than silently reaching the network.

## One platform at a time

The offline guarantee covers exactly the platform, architecture and libc that `prefetch`
ran on. Linux distinguishes glibc from musl, so a standard CI image and an Alpine runner
are two separate targets. Run `prefetch` on each combination your pipeline uses.
