Wasm Shell (wash) CLI
Wasm Shell (wash) is the comprehensive command-line tool for developing, building, and publishing WebAssembly components.
The CLI provides an intuitive developer experience for the modern Wasm ecosystem, from project scaffolding to building and pushing components to OCI registries.
The Wasm Shell CLI is available on GitHub as part of the open source wasmCloud project, hosted by the Cloud Native Computing Foundation (CNCF).
Install wash
- macOS and Linux
- Windows
- Source
curl -fsSL https://raw.githubusercontent.com/wasmcloud/wash/refs/heads/main/install.sh | bashOn a successful installation, the script will return:
[INFO] Next steps:
1. Add /path/to to your PATH if not already included
2. Run 'wash --help' to see available commands
3. Run 'wash doctor' to verify your environment
4. Run 'wash new' to create your first WebAssembly componentAdd wash to your PATH with the filepath listed in Step 1, replacing /path/to with your local filepath:
export PATH="$PATH:/path/to/wash"iwr -useb https://raw.githubusercontent.com/wasmcloud/wash/refs/heads/main/install.ps1 | iexNext steps:
1. Add /path/to to your PATH if not already included
2. Run 'wash --help' to see available commands
3. Run 'wash doctor' to verify your environment
4. Run 'wash new' to create your first WebAssembly componentTo add wash to your PATH by updating your PowerShell profile, add the filepath for wash returned above to your profile, replacing /path/to with your local filepath:
notepad $PROFILE$env:Path += ";C:\path\to\wash"You will need cargo to install from source.
git clone https://github.com/wasmcloud/wash.git
cd wash
cargo install --path .Pre-built binaries for macOS, Linux, and Windows are available on GitHub.
What does wash do?
This quick command tour requires the Rust toolchain and the wasm32-wasip2 target for Rust: rustup target add wasm32-wasip2
Check your environment for component development dependencies:
wash doctorCreate a new component:
wash new https://github.com/wasmCloud/wash.git --subfolder examples/http-hello-worldBuild a component project into a WebAssembly binary:
wash -C ./http-hello-world buildStart a component development loop:
wash -C ./http-hello-world devUpdate wash:
wash updateNext steps
- Explore the
washCLI's Command Reference. - Read the Developer Guide to create a WebAssembly component.