Skip to content

CLI

CLI reference

The pkgist binary auto-discovers a config file in the current working directory unless --config is passed. It tries pkgist.config.ts, pkgist.config.js, builder.ts, builder.js, mongez.ts, mongez.js in that order — see the configuration skill for the full discovery rule.

Commands

build [pkg...]

Build one or more standalone packages by name.

Terminal window
pkgist build @my-scope/utils
pkgist build @my-scope/utils @my-scope/cache @my-scope/events
pkgist build --all # all standalone (alias for `build:all` without families)

Family packages can’t be targeted with build — use build:family for those.

build:family <name>

Build every package in a family with a single shared version.

Terminal window
pkgist build:family atom
pkgist build:family localization

The <name> matches the name field on the family object. If you don’t remember the family names, run pkgist list to see them.

build:all

Build every standalone package and every family registered in the config.

Terminal window
pkgist build:all

Use for fleet-wide releases (LICENSE additions, dep updates, etc.). For incremental releases, prefer targeted build / build:family to avoid no-op version bumps on unchanged packages.

list

Show every registered package and family with current version + type + format info.

Terminal window
pkgist list

Output:

=== Standalone Packages ===
@my-scope/utils v2.1.0 [typescript] [esm, cjs]
root: /path/to/utils
@my-scope/cache v1.3.0 [typescript] [esm, cjs]
root: /path/to/cache
=== Families ===
Family: state
@my-scope/atom v6.0.7 [typescript] [esm, cjs]
@my-scope/react-atom v6.0.7 [react] [esm, cjs]

Use it for quick sanity checks — “what versions are currently on disk” before kicking off a release.

validate

Verify the config parses correctly and every root path exists on disk.

Terminal window
pkgist validate

Catches typos in package roots, missing directories, malformed config. Cheap to run as a pre-commit hook or CI step.

Common flags

Available on every build* command:

FlagDescription
--dry-runPrint every step (snapshot, compile, clone, git, npm publish) without writing to disk, git, or npm. Always run this before a real release to verify versions, commit messages, and clone lists
--no-publishRun everything except npm publish. Useful when you want to build + commit locally but defer publish
--no-gitSkip git add/commit/push/tag entirely, regardless of per-package commit
--concurrency <n>Override settings.concurrency. Drop to 1 to serialize builds for debugging
--config <path>Use a specific config file instead of auto-discovery. Path is relative to cwd
--verbosePrint debug-level log lines (every step, including ones normally silent on success)

Typical invocations

ScenarioCommand
Sanity-check config before any releasepkgist validate
Inventory current versionspkgist list
Preview a releasepkgist build:all --dry-run
Real release of everythingpkgist build:all
Hot-fix one packagepkgist build @scope/the-pkg
Release a synchronized grouppkgist build:family atom
Build to verify, but don’t shippkgist build:all --no-publish --no-git
Debug a failing buildpkgist build @scope/the-pkg --verbose --concurrency 1

Exit codes

  • 0 — all targeted builds succeeded (including publishes if not --no-publish)
  • non-zero — at least one package failed; the failing package(s) are logged with their wrapped error

Builds run in parallel, so a failure in one package doesn’t stop others. The final summary shows the count.

pkgist help

Terminal window
pkgist --help
pkgist build --help

The CLI is built on commander — every command supports --help for its own flags.