@polyplug/cli
v0.1.3
Published
polyplugc — the polyplug code-generator CLI (prebuilt binary, fully offline)
Readme
@polyplug/cli
polyplugc — the polyplug code-generator CLI, distributed as an npm package with a prebuilt binary embedded per-platform. Fully offline — no download at install time or runtime.
Install
# npm
npm install -g @polyplug/cli
# bun
bunx @polyplug/cli generate --help
# deno
deno install -A npm:@polyplug/cliUsage
polyplugc generate --bundle bundle.toml --lang rust --out src/generated
polyplugc validate --bundle-dir plugins/
polyplugc --helpSupported platforms
| Platform | Architecture | Package |
|----------------|-------------|-------------------------------|
| Linux | x64 | @polyplug/cli-linux-x64 |
| macOS | ARM64 | @polyplug/cli-darwin-arm64 |
| Windows | x64 | @polyplug/cli-win32-x64 |
The binary for the current platform is embedded in its optional package. On install, npm/bun/deno selects only the right package — nothing is downloaded at runtime.
If your platform is not listed, build from source:
cargo install polyplugcor download a prebuilt release from https://github.com/polyplug/polyplug/releases.
How it works
Follows the esbuild / biome pattern:
@polyplug/cliis the main package; it declaresoptionalDependencieson one package per supported platform.- Each platform package (
@polyplug/cli-linux-x64, etc.) ships the binary for that platform. - The
bin/polyplugc.mjsshim resolves the installed platform package at runtime andspawnSyncs the binary withstdio: "inherit", forwarding the exit code exactly. - There is zero network I/O anywhere in this package.
License
MIT
