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:
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
Binaries are built by.github/workflows/release-cli.yml, triggered by the vX.Y.Z tag push that
just release VERSION produces (with PUSH=1). The workflow 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.
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.