@blit-sh/bin
v0.35.0
Published
Installs the prebuilt blit binary for your platform; default export is the binary path.
Maintainers
Readme
@blit-sh/bin
The blit binary, distributed via npm. Installing @blit-sh/bin
pulls in exactly one prebuilt package for your platform
(@blit-sh/bin-<os>-<cpu>[-musl]) through optional dependencies — nothing else.
CLI
npm i -g @blit-sh/bin
blit openBundle the binary in your own tool
The default export is the absolute filesystem path to the blit executable, so
you can spawn it directly. Resolution happens on import and throws with an
actionable message if the matching prebuilt package was not installed.
ESM
import blit from "@blit-sh/bin";
import { spawn } from "node:child_process";
spawn(blit, ["open"], { stdio: "inherit" });CommonJS
const blit = require("@blit-sh/bin");
const { spawn } = require("node:child_process");
spawn(blit, ["open"], { stdio: "inherit" });Helpers
Lower-level resolution helpers are available on the @blit-sh/bin/resolve subpath
(and as named exports of the main entry):
import {
binaryPath,
binaryName,
candidatePackages,
isMusl,
} from "@blit-sh/bin";
// or: import { binaryPath } from "@blit-sh/bin/resolve";| export | description |
| --------------------- | ------------------------------------------------------- |
| default | absolute path to the blit binary (resolved at import) |
| binaryPath() | same path, computed lazily; throws if unavailable |
| binaryName() | "blit" or "blit.exe" |
| candidatePackages() | platform package names, in resolution order |
| isMusl() | true on musl-libc Linux |
Platforms
Linux x64/arm64 (glibc & musl), macOS arm64, Windows x64 — matching the binaries the blit release pipeline builds.
License
MIT
