@packlet/cli
v0.3.3
Published
Umbrella CLI for packlet utilities (gpr, validate, list-artifacts).
Readme
📦️ @packlet/cli
@packlet/cli provides the implementation behind the packlet command-line interface. It exposes the build, packaging, validation, and artifact utilities used across the Packlet toolchain.
Most users should install the higher-level packlet package, which bundles this CLI with defaults and additional conveniences. Use @packlet/cli directly only when you specifically need the standalone CLI internals.
Installation
# bun
bun add -D @packlet/cli
# npm
npm install -D @packlet/cliUsage
When installed as a development dependency, the packlet binary becomes available through your package manager:
npx packlet --helpYou may also invoke the commands via npm scripts:
{
"scripts": {
"build": "packlet build",
"gpr": "packlet gpr --root .",
"validate": "packlet validate --root .",
"list-artifacts": "packlet list-artifacts --artifacts .artifacts"
}
}The behavior matches the public packlet package, including configuration resolution and defaults.
Commands overview
The CLI offers four primary commands:
packlet build— Bundles the package (ESM by default, optional CJS) and generates declaration files.packlet gpr— Produces a GitHub Packages–compatible scoped variant and emits.tgzartifacts.packlet validate— Verifies that required output files exist indist/.packlet list-artifacts— Enumerates.tgzfiles in an artifacts directory.
All commands use the shared configuration model from @packlet/core, respecting overrides from CLI flags, environment variables, and package.json.packlet.
When to use @packlet/cli
Install and use @packlet/cli directly if:
- You are embedding the Packlet CLI within another system and require only the CLI implementation.
- You maintain a wrapper or custom workflow that should not depend on the higher-level
packletmeta-package.
For typical development workflows, the packlet package remains the recommended entry point.
License
MIT © KazViz
