Installing The CLI
cratestack-cli (the cratestack binary) validates .cstack schemas and generates Dart/TypeScript
clients and the Studio scaffold. Prebuilt binaries are published for macOS (x64, arm64), Linux
(x64, arm64), and Windows (x64) on every tagged release — most consumers do not need a Rust
toolchain to install it.
cargo-binstall (recommended for Rust users)
If you already have cargo-binstall installed:
~/.cargo/bin — no rustc/cargo build invocation. Dry-run to confirm resolution without
installing:
npm
For TypeScript/JavaScript-only workflows (no Rust toolchain, nocargo-binstall):
@cratestack/cli’s postinstall step downloads the matching platform binary from GitHub Releases
and verifies its checksum, the same model esbuild and @biomejs/biome use. See the
package README for
supported environment variables (CRATESTACK_CLI_SKIP_DOWNLOAD, CRATESTACK_CLI_BINARY_PATH) for
offline or vendored installs.
From source
With a Rust toolchain installed:cratestack workspace:
GitHub Actions
For CI workflows, theinstall-cratestack-cli composite action downloads a prebuilt binary, verifies
its checksum, and adds it to PATH — no Rust toolchain step needed in the job:
@main to a released tag or commit SHA for reproducible CI.
Supported platforms
A platform outside this table (e.g. Windows arm64, Linux musl) has no prebuilt binary yet — install
from source instead. See issue #131 for the
distribution pipeline this page describes, and open a new issue if you need another target.
How releases are built
Releases are cut through an automated, PR-based flow: the “Prepare Release” workflow bumps the version, opens a release PR, and merging that PR triggers the “Cut Release Tag” workflow to push thevX.Y.Z tag. That tag push runs .github/workflows/release-cli.yml, which cross-compiles
cratestack-cli for every target above, packages each as cratestack-cli-<target>-v<version>.{tar.gz,zip}
with a .sha256 checksum, and attaches them to the tag’s GitHub Release. cargo-binstall resolution
and the npm installer both depend on that exact naming — see
[package.metadata.binstall]
in cratestack-cli’s Cargo.toml.
just release VERSION PUSH=1 remains available as a local/manual fallback that produces the same
tag push, for when the automated PR flow isn’t usable.
Version numbers stay in sync automatically: just bump rewrites both the workspace Cargo.toml
versions and the npm package’s version field from the same source, so a crates.io publish, a
GitHub Release, and an npm publish for a given version all ship the same binary.