@packall/cli
v0.5.4
Published
Bundle npm packages and their full dependency closure into tarballs you can import into a registry behind a restricted network.
Maintainers
Readme
@packall/cli
Bundle npm packages and their complete dependency closure into tarballs that can be carried across an air gap and imported into a restricted registry.
Install
npm install -g @packall/cliThe package installs both packall and npmb as command names. For a one-off run:
npx @packall/cli [email protected]Common commands
# Bundle one package and everything it needs
packall [email protected]
# Bundle several roots with a shared, deduplicated download
packall [email protected] [email protected] lodash
# Preview resolution without downloading
packall --dry-run --file package.json
# Bundle a package.json, including development dependencies by default
packall --file package.json
# Bundle only production dependencies
packall --file package.json --prod
# Reproduce the exact versions recorded by a lockfile
packall --file pnpm-lock.yamlInput can be package specs, a package.json, npm/pnpm/bun lockfile, or a text file with
one spec per line. Use --out to choose the output directory, --layout to choose
per-spec, single, dir, or flat, and --json for machine-readable output.
The registry options cover .npmrc credentials and per-scope registries, --timeout,
transient-only --retries, --concurrency, and --rewrite-tarball-host. Integrity is
verified by default; --no-verify is an explicit opt-out.
Main options
| Option | Purpose |
| ----------------- | -------------------------------------------------------- |
| --file PATH | Read a package.json, lockfile, or spec list. |
| --prod | Exclude devDependencies when reading a package.json. |
| --lockfile MODE | Detect, disable, require, or select a lockfile. |
| --out DIR | Choose the output directory. |
| --layout KIND | Write per-spec, single, dir, or flat output. |
| --all-versions | Bundle every published version matching a range. |
| --platform LIST | Restrict optional dependencies to selected platforms. |
| --registry URL | Override the registry selected from .npmrc. |
| --dry-run | Resolve and report without downloading. |
| --force | Replace existing output files. |
| --yes | Never prompt; use defaults. |
Every flag and its default is listed in the options reference.
For workflows, see the packall documentation, and for the
programmatic API, the @packall/cli API reference.
License
MIT
