---
title: "wash Commands — CLI Reference | wasmCloud"
description: "Complete command reference for the wash CLI — every subcommand, flag, and option for developing and publishing WebAssembly components on wasmCloud."
canonical: "https://wasmcloud.com/docs/wash/commands/"
---

Version: v2

# Wasm Shell CLI Command Reference

## Commands

- [`wash build`↴](https://wasmcloud.com/docs/wash/commands/#wash-build) - Build a Wasm component
- [`wash completion`↴](https://wasmcloud.com/docs/wash/commands/#wash-completion) - Generate shell completions
- [`wash config`↴](https://wasmcloud.com/docs/wash/commands/#wash-config) - View configuration for `wash`
- [`wash dev`↴](https://wasmcloud.com/docs/wash/commands/#wash-dev) - Start a development server for a Wasm component
- [`wash host`↴](https://wasmcloud.com/docs/wash/commands/#wash-host) - Act as a wasmCloud host
- [`wash inspect`↴](https://wasmcloud.com/docs/wash/commands/#wash-inspect) - Inspect a Wasm component's embedded WIT
- [`wash new`↴](https://wasmcloud.com/docs/wash/commands/#wash-new) - Create a new project from a Git repository
- [`wash oci`↴](https://wasmcloud.com/docs/wash/commands/#wash-oci) - Push or pull Wasm components to/from an OCI registry
  - [`wash oci push`↴](https://wasmcloud.com/docs/wash/commands/#wash-oci-push)
  - [`wash oci pull`↴](https://wasmcloud.com/docs/wash/commands/#wash-oci-pull)
- [`wash update`↴](https://wasmcloud.com/docs/wash/commands/#wash-update) - Update `wash` to the latest version
- [`wash wit`↴](https://wasmcloud.com/docs/wash/commands/#wash-wit) - Manage WIT dependencies
  - [`wash wit add`](https://wasmcloud.com/docs/wash/commands/#wash-wit-add)
  - [`wash wit build`](https://wasmcloud.com/docs/wash/commands/#wash-wit-build)
  - [`wash wit clean`](https://wasmcloud.com/docs/wash/commands/#wash-wit-clean)
  - [`wash wit fetch`](https://wasmcloud.com/docs/wash/commands/#wash-wit-fetch)
  - [`wash wit remove`](https://wasmcloud.com/docs/wash/commands/#wash-wit-remove)
  - [`wash wit update`](https://wasmcloud.com/docs/wash/commands/#wash-wit-update)

###### **Options:**

- `-C <PROJECT_PATH>` - Path to the project to run a command against (when outside a project directory)
- `-h`, `--help` - Print help
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--meters <METERS>` — What to measure about guest execution (since 2.9.0): `off` (alias `none`), `duration` (invocation counts, failures, wall-clock duration), or `fuel` (adds an exact instruction-proportional work count, at the cost of a compiled-in counter) \[default: `duration`; deprecated alias `--enable-meters` = `fuel`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (text or json) \[default: text\]
- `--verbose` - Enable verbose output
- `-V`, `--version` - Print version

## Directory Context

The `wash` CLI uses automatic project detection similar to `git` and other GNU tools. This allows you to run `wash` commands from anywhere within your project without specifying the project path.

shell

```shell
~/myproject$ wash dev
~/myproject/wit$ wash build
~/myproject/src$ wash build
```

When you're **outside** a project directory, you can use the `-C` flag to specify the project path. This is useful in CI environments and situations where users can't change directories prior to calling `wash`.

From your home directory, targeting a project in `/tmp`:

shell

```shell
wash -C /tmp/myproject build
```

## `wash build`

Compile a project to a WebAssembly component artifact—i.e., a WebAssembly (`.wasm`) binary that conforms to the WebAssembly Component Model.

**Usage:** `wash build [OPTIONS]`

###### **Options:**

- `-C <PROJECT_PATH>` - Path to the project to build (when outside a project directory)
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (text or json) \[default: text\]
- `--skip-fetch` - Skip fetching WIT dependencies, useful for offline builds
- `--user-config <USER_CONFIG>` - Path to user configuration file.
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash completion`

Generate shell completions.

**Usage:** `wash completion [OPTIONS] <SHELL>`

- `<SHELL>` - The shell to generate completions for \[possible values: `bash`, `elvish`, `fish`, `powershell`, `zsh`\]

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (text or json) \[default: text\]
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash config`

View configuration for wash.

**Usage:** `wash config [OPTIONS] <COMMAND>`

**Subcommands**:

- `init` - Initialize a new configuration file for wash
- `info` - Print the current version and local directories used by wash
- `show` - Print the current configuration file for wash
- `cleanup` - Remove the wash cache and/or data directories
- `validate` - Check the current configuration for hard errors

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: text\]
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash config init`

Initialize a new configuration file for wash. Writes to the project-local `.wash/` directory.

**Usage:** `wash config init [OPTIONS]`

###### **Options:**

- `--force` - Overwrite existing configuration
- `--format <CONFIG_FORMAT>` - Serialization format for the generated file (`yaml`, `yml`, `json`, or `toml`) \[default: `yaml`\]
- `--example` - Populate every section with illustrative example values
- `--global` - Deprecated and has no effect; the command always writes to the project-local `.wash/` directory
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--user-config <USER_CONFIG>` - Path to user configuration file.
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash config info`

Print the current version and local directories used by wash.

**Usage:** `wash config info [OPTIONS]`

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--user-config <USER_CONFIG>` - Path to user configuration file.
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash config show`

Print the current configuration file for wash.

**Usage:** `wash config show [OPTIONS]`

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--user-config <USER_CONFIG>` - Path to user configuration file.
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash config cleanup`

Remove the wash cache and/or data directories. Useful for reclaiming disk space or recovering from a corrupted cache.

**Usage:** `wash config cleanup [OPTIONS]`

###### **Options:**

- `--cache` - Remove only the wash cache directory
- `--data` - Remove only the wash data directory
- `--all` - Remove both the cache and data directories
- `--dry-run` - Print what would be removed (with per-directory sizes) without deleting anything
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--user-config <USER_CONFIG>` - Path to user configuration file.
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash config validate`

Check the loaded configuration for hard errors before you run anything against it. Validation covers socket-address syntax, `redis://`/`nats://`/`postgres://` URL schemes, paired TLS cert and key files, WebGPU availability on Windows, non-empty build commands, well-formed WIT registry URLs, and local WIT source paths that actually exist on disk. Remote sources (HTTP, Git, OCI) are skipped. Errors are collected from every section before the command returns, so every issue surfaces in one pass.

**Usage:** `wash config validate [OPTIONS]`

###### **Options:**

- `--file <FILE>` - Validate a specific config file instead of the merged project config
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--user-config <USER_CONFIG>` - Path to user configuration file.
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash dev`

Start a development server for a Wasm component.

Reload loops and restarts reuse an already-compiled component instead of recompiling it: components are cached by a digest of their bytes (since 2.9.0), so an unchanged component reloads without a compile.

**Usage:** `wash dev [OPTIONS]`

###### **Options:**

- `-C <PROJECT_PATH>` - Path to the project to build (when outside a project directory)
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (trace, debug, info, warn, error) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (text or json) \[default: `text`\]
- `--user-config <USER_CONFIG>` - Path to user configuration file.
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash host`

Run a cluster-connected wasmCloud host ([washlet](https://wasmcloud.com/docs/runtime/washlet/)) that joins the operator mesh via NATS.

**Usage:** `wash host [OPTIONS]`

> **Duration spelling changed in 2.12.3**
>
> Since 2.12.3 every flag and configuration value below that takes a duration parses [Jiff's friendly format](https://docs.rs/jiff/latest/jiff/fmt/friendly/index.html) rather than humantime. The spellings in ordinary use — `30s`, `500ms`, `1m30s`, `1.5h`, a bare `0` — are unchanged, but the parser is stricter: units must run largest to smallest with no repeats, and a fraction may appear only on the last unit. So `30m1h` becomes `1h30m`, `1h1h` becomes `2h`, and `1.5h30m` becomes `2h`. Months and years are refused outright, since they need a calendar date to mean anything, and so is a fractional day such as `0.5d` — write `12h`. Days and weeks are fixed multiples of 24 hours. A value the parser refuses fails host startup rather than falling back to a default.
>
> This covers the flags on this page and the `wash.toml` values that feed them. It does not cover the host's `*_SECS` environment overrides, which take whole seconds and warn-and-default on an unparseable value.

###### **Options:**

- `--allow-insecure-registries` - Allow insecure OCI registries
- `--allowed-host-path <PATH>` - A directory a workload's `hostPath` volume may lie within; repeatable and comma-delimited (`WASH_ALLOWED_HOST_PATHS`; since 2.11.0) \[default: none, which permits no `hostPath` volume\]
- `--core-instances <N>` - Core instances (WebAssembly core modules, several per component) the pooling allocator admits (`WASH_CORE_INSTANCES`; since 2.8.0) \[default: sixteen per memory of `--max-memories` since 2.12.0; wasmtime's own 1000 before it\]. Set alone it also pins `--max-memories` to this count, with a startup warning; prefer `--max-memories`
- `--data-nats-creds <PATH>` / `--scheduler-nats-creds <PATH>` - NATS credentials file for the data or control plane connection, reread on every reconnect (`WASH_DATA_NATS_CREDS`, `WASH_SCHEDULER_NATS_CREDS`; since 2.12.0)
- `--data-nats-jwt-as-token` / `--scheduler-nats-jwt-as-token` - Also send the credentials file's user JWT as the connection token, for an auth callout on a NATS server without trusted operators (`WASH_DATA_NATS_JWT_AS_TOKEN`, `WASH_SCHEDULER_NATS_JWT_AS_TOKEN`; since 2.12.0). Requires the matching `--*-creds`
- `--data-nats-nkey <PATH>` / `--scheduler-nats-nkey <PATH>` - NATS nkey seed file, reread on every reconnect (`WASH_DATA_NATS_NKEY`, `WASH_SCHEDULER_NATS_NKEY`; since 2.12.0)
- `--data-nats-token-file <PATH>` / `--scheduler-nats-token-file <PATH>` - File holding a NATS auth token, reread on every reconnect (`WASH_DATA_NATS_TOKEN_FILE`, `WASH_SCHEDULER_NATS_TOKEN_FILE`; since 2.12.0)
- `--data-nats-url <DATA_NATS_URL>` - NATS URL for data plane communications \[default: `nats://localhost:4222`\]
- `--data-nats-user <NAME>` / `--scheduler-nats-user <NAME>` - NATS username; requires the matching `--*-password-file` (`WASH_DATA_NATS_USER`, `WASH_SCHEDULER_NATS_USER`; since 2.12.0)
- `--data-nats-password-file <PATH>` / `--scheduler-nats-password-file <PATH>` - File holding the password for the username, reread on every reconnect (`WASH_DATA_NATS_PASSWORD_FILE`, `WASH_SCHEDULER_NATS_PASSWORD_FILE`; since 2.12.0)
- `--default-heap-memory <SIZE>` - Ceiling on any single guest linear memory (`WASH_DEFAULT_HEAP_MEMORY`; since 2.8.0) \[default: unset, wasmtime's own 4 GiB\]
- `--deny-private-ranges` - Screen private address ranges in the socket address policy (flag only, no environment variable; since 2.10.0) \[default: off\]
- `--deny-special-ranges` - Screen special address ranges (link-local including cloud metadata endpoints, multicast, documentation) in the socket address policy (flag only, no environment variable; since 2.10.0) \[default: on\]
- `--drain-delay <DURATION>` - How long the host keeps serving after a shutdown signal, with readiness already failing, before it stops (`WASH_DRAIN_DELAY`; since 2.9.0) \[default: `0s`; the Helm chart sets `5s`\]
- `--guest-memory-mode <MODE>` - `enforce` refuses guest memory growth past the budget; `count` records what enforcement would refuse; `growth` (since 2.12.0) enforces but leaves up to 2 MiB of each memory's first allocation uncharged (`WASH_GUEST_MEMORY_MODE`; since 2.9.0) \[default: `enforce` since 2.11.0, `count` before it; a blank value reads as unset and enforces\]
- `--host-group <HOST_GROUP>` - The host group label to assign to the host \[default: `default`\]
- `--host-id <HOST_ID>` - The ID the host uses in its NATS control subjects (`WASH_HOST_ID`; since 2.12.1) \[default: a UUIDv7 minted at startup, so it is time-ordered rather than opaque; since 2.12.2 its random bits are seeded from OS entropy, so two hosts initializing on the same clock tick no longer risk minting the same ID\]. 1–128 ASCII letters, digits, `_`, or `-`, since it forms one subject token, and validated before anything connects. It must be unique among the hosts sharing a control plane, and should not be reused by a *later* host process: the operator may ignore heartbeats from a removed host's ID for an hour or more. Set it to match a NATS credential issued for one host ID
- `--hostcall-fuel <SIZE>` - Roughly the most bytes a guest may copy to the host in one call, and the most the host reads from one future or stream; past it the call traps (`WASH_HOSTCALL_FUEL`; since 2.12.0) \[default: unset, wasmtime's own 128 MiB\]. Unrelated to `--meters fuel`
- `--host-name <HOST_NAME>` - The host name to assign to the host
- `--http-addr <HTTP_ADDR>` - The address on which the HTTP server will listen
- `--http-client-ca-path <PATH>` - PEM bundle of additional CAs to trust on components' outbound HTTPS; repeatable (`WASH_HTTP_CLIENT_CA_PATHS`)
- `--http-client-cert-path <PATH>` - PEM client certificate chain presented on outbound HTTPS when a peer requests one; requires `--http-client-key-path` (`WASH_HTTP_CLIENT_CERT_PATH`; since 2.10.0)
- `--http-client-identity-refresh <DURATION>` - Re-read the client identity on an interval for rotation, with fail-closed expiry checks (`WASH_HTTP_CLIENT_IDENTITY_REFRESH`; since 2.10.0) \[default: read once\]
- `--http-client-key-path <PATH>` - PEM private key for the client certificate; requires `--http-client-cert-path` (`WASH_HTTP_CLIENT_KEY_PATH`; since 2.10.0)
- `--http-client-trust-roots <MODE>` - Base trust store for outbound HTTPS: `webpki`, `webpki-and-native`, `native`, or `extra-only` (`WASH_HTTP_CLIENT_TRUST_ROOTS`) \[default: `webpki`\]
- `--http-local-routing` - Serve outgoing HTTP in process when its hostname matches a co-located workload's `localRoute` declaration (`WASH_HTTP_LOCAL_ROUTING`; since 2.10.0) \[default: off\]. See [Workload security](https://wasmcloud.com/docs/kubernetes-operator/workload-security/#same-host-local-routing)
- `--ip-name-lookup-grant-lifetime <DURATION>` - How long an address a workload resolved stays connectable through the name that resolved it; `0s` turns name entries off for sockets entirely (`WASH_IP_NAME_LOOKUP_GRANT_LIFETIME`; since 2.11.0) \[default: unset, meaning no expiry\]
- `--max-concurrent-starts <N>` - Workload starts (image pull plus compile) the host admits at once (`WASH_MAX_CONCURRENT_STARTS`; since 2.9.0) \[default: CPUs minus one, clamped between 1 and 4\]
- `--max-guest-memory <SIZE>` - Guest memory budget across every workload (`WASH_HOST_MAX_GUEST_MEMORY`; since 2.8.0) \[default: three quarters of the cgroup or physical memory limit\]
- `--max-http-ingress-connections <N>` - Connections the host's HTTP listener holds open; past the ceiling, connections are accepted and immediately closed (`WASH_MAX_HTTP_INGRESS_CONNECTIONS`; since 2.9.0) \[default: a quarter of the descriptor limit, floor 256\]. Unlike the per-workload quotas, an over-large value is clamped rather than refused
- `--max-initial-guest-memory <SIZE>` - Under `--guest-memory-mode growth`, the most initial guest memory the host leaves uncharged across all its instances (`WASH_HOST_MAX_INITIAL_GUEST_MEMORY`; since 2.12.0) \[default: four times `--max-guest-memory`\]. Ignored, and warned about, in the other modes
- `--max-memories <N>` - Guest linear memories the pooling allocator keeps room for, and the count that sizes the pool (`WASH_MAX_MEMORIES`; since 2.12.0) \[default: derived from the machine — half the usable address space and at most 90% of `vm.max_map_count`, floor 1000; 9,829 on a default Linux node\]
- `--max-oci-component-size <MAX_OCI_COMPONENT_SIZE>` - Raise or lower the limit on a component this host pulls from an OCI registry, for workloads and host plugins alike, e.g. `512MiB` (`WASH_HOST_MAX_OCI_COMPONENT_SIZE`; since 2.13.0). Unset, the limit is 256 MiB, which has applied since 2.12.3; before 2.13.0 there was no way to change it. A pull holds the whole component in memory, so this bounds what one registry can make the host allocate. `Ki`/`Mi`/`Gi` are binary; a bare `k`/`M`/`G` is decimal, so `512M` is 512,000,000 bytes rather than 512 MiB. It governs `wash host` only — `wash dev`, `wash oci`, and `wash inspect` keep the 256 MiB limit
- `--max-process-memory <SIZE>` - Ceiling on the whole host process's memory footprint, past which guest memory growth and new workload starts are refused; `off` disables it (`WASH_HOST_MAX_PROCESS_MEMORY`; since 2.11.0) \[default: 90% of the cgroup memory limit, or of physical memory where there is no cgroup\]. Enforced even under `--guest-memory-mode count`. Since 2.12.2 a host that cannot detect capacity fails to start unless an explicit size or `off` is given, rather than running unguarded. On Linux the footprint it measures also counts the process's page tables from 2.12.2 (`VmPTE`, plus `VmPMD` where the kernel still reports it, on 4.0 through 4.14), so a dense warm pool reads higher than it did on 2.12.1 and can cross a threshold that previously looked clear
- `--memory-guard-size <SIZE>` - Unmapped guard after each guest memory's reservation, never accessible to a guest (`WASH_HOST_MEMORY_GUARD_SIZE`; since 2.12.0) \[default: unset, wasmtime's own 32 MiB\]. A smaller guard protects fewer constant offsets; see the [security note](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/helm-values/#runtimeresourcesmemoryreservation-and-runtimeresourcesmemoryguardsize)
- `--memory-reservation <SIZE>` - Address space reserved for each guest linear memory, the memory plus the room it may grow into (`WASH_HOST_MEMORY_RESERVATION`; since 2.12.0) \[default: unset, wasmtime's own 4 GiB\]. Lowering it fits more warm instances in the address space and moves an isolation boundary; see the [security note](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/helm-values/#runtimeresourcesmemoryreservation-and-runtimeresourcesmemoryguardsize)
- `--nats-connect-timeout <DURATION>` - How long a starting host waits for NATS before failing (flag only, no environment variable; since 2.9.0) \[default: `0s`; the Helm chart sets `60s`\]
- `--nats-ignore-discovered-servers` - Restrict host and workload NATS connections to their configured URLs rather than following cluster-advertised addresses (flag only, no environment variable; since 2.12.0) \[default: off; the Helm chart sets it on\]. Set it when each URL is a load-balanced address such as a Kubernetes Service; a single-server URL then loses discovery-based failover. Connections that require TLS (a TLS CA, a client certificate, or TLS-first) ignore advertised servers regardless, since 2.12.1
- `--probe-addr <ADDR>` - Serve `/livez` and `/readyz` health endpoints on this address (`WASH_PROBE_ADDR`; since 2.9.0) \[default: disabled; the Helm chart serves probes on port 8081\]
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--registry-pull-timeout <REGISTRY_PULL_TIMEOUT>` - Timeout for pulling artifacts from OCI registries \[default: `30s`\]
- `--reserved-host-path <PATH>` - An additional path no `hostPath` volume may expose, on top of the paths the host reserves automatically; repeatable and comma-delimited (`WASH_RESERVED_HOST_PATHS`; since 2.11.0)
- `--scheduler-nats-url <SCHEDULER_NATS_URL>` - NATS URL for control plane communications \[default: `nats://localhost:4222`\]
- `--scratch-root <PATH>` - Where ephemeral volumes live (`WASH_SCRATCH_ROOT`; since 2.11.0) \[default: `wasmcloud/scratch` under the user's cache directory since 2.13.0 — `$XDG_CACHE_HOME` or `~/.cache` on Linux *and* macOS, `%LOCALAPPDATA%` on Windows; `wasmcloud-scratch` under the system temp directory before it\]. The move is deliberate: a shared temp root let another user on the machine reach a workload's scratch. On Unix the root must be a real directory, not a symlink, owned by the user the host runs as and with no group or other permissions. Pick a parent directory other users cannot modify: the host does not check the parent, so a writable one lets another user swap the root. A refused root does not stop the host — it logs the refusal and then fails any workload declaring an `emptyDir` volume with `emptyDir volumes are unavailable`. Scratch left by an earlier release under the old root is not migrated or cleaned up — remove it yourself once the old hosts have stopped
- `--set-max-memories-from-memory-precommit-limit` - On a platform that precommits the pool's stack and table mappings (Windows, 32-bit targets, Linux with strict overcommit accounting or a finite `RLIMIT_DATA`), size an unset `--max-memories` against a quarter of the commit limit instead of holding at the 1000 floor (`WASH_SET_MAX_MEMORIES_FROM_MEMORY_PRECOMMIT_LIMIT`; since 2.12.0) \[default: off\]. No effect elsewhere, or when `--max-memories` or `--core-instances` is set
- `--socket-egress <MODE>` - What a socket address-policy violation costs: `enforce` refuses the connection, `count` records a would-deny counter and allows it (flag only, no environment variable; since 2.10.0) \[default: `enforce` since 2.11.0, `count` before it\]
- `--strict-process-memory` - Require detectable memory capacity and a process threshold below it, explicit or derived, and reject `off` (`WASH_HOST_STRICT_PROCESS_MEMORY`; since 2.12.2) \[default: off\]. This validates configuration; a hard memory boundary still needs an OS or container limit
- `--tls-ca-path <PATH>` - CA bundle for mutual TLS on the host's HTTP server; requires `--tls-cert-path`. **Since 2.13.0 setting it requires every client to present a certificate the bundle issued**, and the host verifies it. Before 2.13.0 the bundle was read and then ignored — the flag existed, logged that client verification was "not yet implemented", and accepted anonymous clients — so provision certificates for every caller before upgrading, or drop the flag to keep server-only TLS
- `--tls-cert-path <PATH>` - PEM certificate chain the HTTP server presents; requires `--tls-key-path`
- `--tls-key-path <PATH>` - PEM private key for the serving certificate; requires `--tls-cert-path`
- `--tls-reload-interval <TLS_RELOAD_INTERVAL>` - Re-read the serving certificate, key and CA on this interval, minimum `1s` (`WASH_TLS_RELOAD_INTERVAL`; since 2.13.0; requires `--tls-cert-path`) \[default: read once at startup\]. New connections pick up changed files; existing connections keep the configuration they started with. Publish certificate, key and CA together in one atomic update, as a Kubernetes Secret volume does. A file set that fails to load is logged and the previous configuration kept, and the serving certificate and the client CA reload independently, each keeping its own last valid configuration. Removing a trust anchor closes established connections at once, including in-flight HTTP/1.1 requests and HTTP/2 streams, while adding anchors, reordering a bundle, or refreshing the same anchors leaves them alone. A deleted or emptied CA file rejects every client after two consecutive reloads observe it; a malformed one keeps the previous CA trusted
- `--user-config <USER_CONFIG>` - Path to user configuration file.
- `--verbose` - Enable verbose output
- `--wasi-webgpu` - Enable WASI WebGPU support
- `--wasm-proposal <NAME>` - Enable a top-level Wasm proposal on the engine. Comma-separated and repeatable. Recognized values: `component-model-async`, `component-model-map`, `gc`, `exception-handling`, `wide-arithmetic`, `threads`, `tail-call`. Also readable from `WASH_WASM_PROPOSALS` (since 2.5.0)
- `--wasmcloud-nats-url <URL>` - Default NATS address for the `wasmcloud:nats` plugin's per-workload connections (`WASH_WASMCLOUD_NATS_URL`; since 2.9.0) \[default: the data NATS URL\]
- `-h`, `--help` - Print help

## `wash inspect`

Inspect a Wasm component's embedded WIT.

**Usage:** `wash inspect [OPTIONS] <COMPONENT_REFERENCE>`

- `<COMPONENT_REFERENCE>` - Inspect a component by its reference, which can be a local file path, project directory, or remote OCI reference. If omitted or pointing to a directory, attempts to build and inspect a component from that directory.

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash new`

Create a new project from a Git repository.

**Usage:** `wash new [OPTIONS] <GIT>`

- `<GIT>` - Git repository URL to use as project template.

###### **Options:**

- `-C <PROJECT_PATH>` - Target path for project
- `--git-ref <GIT>` - Git reference (branch, tag, or commit) to checkout
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--name` - Project name and local directory to create \[default: repository/subfolder name\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--subfolder <SUBFOLDER>` - Subdirectory within the git repository to use (only valid with `<GIT>`)
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash oci`

Push or pull Wasm components to or from an OCI registry.

**Usage:**: `wash oci [OPTIONS] <COMMAND>`

**Subcommands**:

- `pull` - Pull a component artifact from an OCI registry.
- `push` - Push a component artifact to an OCI registry.

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash oci pull`

Pull a component artifact from an OCI registry.

**Usage:** `wash oci pull [OPTIONS] <REFERENCE> <COMPONENT_PATH>`

- `<REFERENCE>` - The OCI reference to pull.
- `<COMPONENT_PATH>` - The path to write the pulled component to \[default: `component.wasm`\]

###### **Options:**

- `-C <PROJECT_PATH>` - Target path for pulled artifact
- `--insecure` - Allow HTTP protocol \[default: `false`\]
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash oci push`

Push a component artifact to an OCI registry.

**Usage:** `wash oci push [OPTIONS] <REFERENCE> <COMPONENT_PATH>`

- `<REFERENCE>` - The OCI reference to push.
- `<COMPONENT_PATH>` - The path to the component to push.

###### **Options:**

- `--insecure` - Allow HTTP protocol \[default: `false`\]
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash update`

Update wash to the latest version.

**Usage:** `wash update [OPTIONS]`

###### **Options:**

- `-d`, `--dry-run` - Check for updates without applying them
- `-f`, `--force` - Force update even if already on the latest version
- `--git <GIT>` - Point at a different repository for updates \[default: `wasmCloud/wasmCloud`\]
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--major` - Allow major version updates (breaking changes)
- `--minor` - Allow minor version updates (new features, no breaking changes)
- `--patch` - Allow only patch updates (bug fixes only)
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--token <TOKEN>` - GitHub token for private repository access. Can also be set via `GITHUB_TOKEN`, `GH_TOKEN`, or `GITHUB_ACCESS_TOKEN` environment variables \[env: `WASH_GITHUB_TOKEN=`\].
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash wit`

Manage WIT dependencies.

**Usage**: `wash wit [OPTIONS] <COMMAND>`

**Subcommands**:

- `add` - Add a new WIT dependency
- `build` - Build a WIT package into a Wasm binary
- `clean` - Remove fetched dependencies at `wit/deps/`
- `fetch` - Fetch WIT dependencies, reading from `wit/world.wit` imports
- `remove` - Remove a WIT dependency
- `update` - Update dependencies to latest compatible versions

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `-h`, `--help` - Print help

## `wash wit add`

Add a WIT interface to the world's imports.

**Usage**: `wash wit add [OPTIONS] <PACKAGE>`

**Arguments**: `<Package>` - Interface to import (e.g., `wasi:keyvalue/store` or `wasi:keyvalue/store@0.2.0-draft`). As of wasmCloud 2.8.0, the reference is validated before `wit/world.wit` is modified; passing a package on its own (e.g., `wasi:keyvalue`) lists its interfaces instead of writing anything.

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `--wit-dir <WIT_DIR>` - Path to the WIT directory
- `-h`, `--help` - Print help

## `wash wit build`

Build a WIT package into a Wasm binary.

**Usage**: `wash wit build [OPTIONS]`

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--output-file <OUTPUT_FILE>` - Output file path for the built Wasm package
- `--verbose` - Enable verbose output
- `--wit-dir <WIT_DIR>` - Path to the WIT directory
- `-h`, `--help` - Print help

## `wash wit clean`

Remove fetched dependencies at `wit/deps/`.

**Usage**: `wash wit clean [OPTIONS]`

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `--wit-dir <WIT_DIR>` - Path to the WIT directory
- `-h`, `--help` - Print help

## `wash wit fetch`

Fetch WIT dependencies, reading from `wit/world.wit` imports.

**Usage**: `wash wit fetch [OPTIONS]`

###### **Options:**

- `--clean` - Remove existing dependencies before fetching
- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `--wit-dir <WIT_DIR>` - Path to the WIT directory
- `-h`, `--help` - Print help

## `wash wit remove`

Remove a WIT dependency.

**Usage**: `wash wit remove [OPTIONS] <PACKAGE>`

**Arguments**: `<Package>` - Interface (e.g., `wasi:keyvalue/store`) or package (e.g., `wasi:keyvalue`) to remove. A package removes every import it contributes to the world. As of wasmCloud 2.8.0, removal also drops the package from `wit/deps/` and re-fetches so the lock file no longer pins it.

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `--wit-dir <WIT_DIR>` - Path to the WIT directory
- `-h`, `--help` - Print help

## `wash wit update`

Update dependencies to latest compatible versions. As of wasmCloud 2.8.0, the command reports which packages moved and accepts the same interface references as `add` and `remove`.

**Usage**: `wash wit update [OPTIONS] <PACKAGE>`

**Arguments**: `<Package>` - Specific package to update (e.g., `wasi:http`). If not specified, updates all packages.

###### **Options:**

- `-l`, `--log-level <LOG_LEVEL>` — Set the log level (`trace`, `debug`, `info`, `warn`, `error`) \[default: `info`\]
- `--non-interactive` - Run in non-interactive mode (skip terminal checks for host exec). Automatically enabled when stdin is not a TTY
- `-o`, `--output <OUTPUT_FORMAT>` — Specify output format (`text` or `json`) \[default: `text`\]
- `--verbose` - Enable verbose output
- `--wit-dir <WIT_DIR>` - Path to the WIT directory
- `-h`, `--help` - Print help

Last updated on **Dec 3, 2026** by **Eric Gregory**
