Crust
CLI tooling for building and distributing standalone executables.
The @crustjs/crust package provides the crust CLI binary for building and distributing your CLI as standalone executables. It is a dev dependency — the framework API comes from @crustjs/core and @crustjs/plugins.
Install
bun add -d @crustjs/crustCLI Binary
The package includes the crust CLI, which provides:
| Command | Description |
|---|---|
crust build | Compile your CLI to standalone executables |
crust publish | Publish staged npm packages created by crust build --package |
The crust CLI is itself built with Crust (self-hosted), demonstrating the framework in action.
crust build can embed PUBLIC_* build-time constants from Bun's cwd env or from explicit --env-file inputs. Runtime env, Bun .env loading, and PUBLIC_* guidance are documented in Environment Variables.
When to Use
Install @crustjs/crust as a dev dependency when your project needs the crust build command for compiling to standalone executables. It is only needed at build time, not at runtime.
For the framework API (Crust builder, plugins, etc.), use @crustjs/core and @crustjs/plugins.
Distribution Modes
Standalone binaries (default crust build) — Output raw binaries and a resolver script. Best for:
- GitHub Releases or direct binary downloads
- Docker images with pre-installed binaries
- Internal tools distributed via custom channels
Per-OS npm distribution (crust build --package) — Create platform-specific npm packages. Best for:
- Publishing to npm with automatic platform detection
- Large CLIs where users only need one binary
- Projects already using npm/bun as distribution channel