Install with npm
The @slicevm/cli package ships the native slice binary for your platform through npm optionalDependencies, the same approach used by esbuild and Biome. npm downloads only the binary that matches your OS and CPU.
Run without installing
Section titled “Run without installing”npx @slicevm/cli run ./index.tsnpx @slicevm/cli doctorAdd to a project
Section titled “Add to a project”npm install --save-dev @slicevm/clinpx slice run ./src/index.ts --metricsSupported platforms
Section titled “Supported platforms”| Platform | Package |
|---|---|
| Linux x64 (glibc) | @slicevm/cli-linux-x64-gnu |
| macOS Apple Silicon | @slicevm/cli-darwin-arm64 |
| macOS Intel | @slicevm/cli-darwin-x64 |
| Windows x64 | @slicevm/cli-win32-x64-msvc |
io_uring and Intel MPK features are Linux only. On macOS and Windows the runtime uses portable fallbacks; slice doctor reports what is active.
Using your own binary
Section titled “Using your own binary”Set SLICE_BINARY_PATH to an absolute path to skip the npm binary, for example a local cargo build --release output:
SLICE_BINARY_PATH=$HOME/src/slice/target/release/slice npx @slicevm/cli --helpTroubleshooting
Section titled “Troubleshooting”- “no prebuilt binary for this platform”: your package manager skipped optional dependencies. Reinstall without
--no-optional/--omit=optional. - Alpine Linux: musl builds are not published yet. Use a glibc base image or build from source.
Other Slice packages
Section titled “Other Slice packages”| Package | For |
|---|---|
@slicevm/mcp |
MCP server for AI editors: local by default, hosted Slice Cloud with SLICE_API_KEY (0.14.1 or later). |
@slicevm/sdk |
Sandbox SDK: run untrusted code locally or on Slice Cloud from TypeScript. |