Pulse 1.0.0-beta.1 betaExact, immutable release documentation.Browse latest
Documentation platform maintainersactiveReviewed 2026-08-01Review by 2027-01-12

CLI reference#

The pulse CLI in @pulse-compute/cli@1.0.0-beta.1 is the supported project workflow. One command specification generates this page, installed help, and the shipped Bash, Zsh, and Fish completion scripts, so a public command or option cannot drift between those surfaces.

Meta invocations#

  • pulse --help | pulse -h | pulse help — Print public help.
  • pulse --version | pulse -v | pulse version — Print the installed CLI package version.
  • pulse completion <bash|zsh|fish> — Print a shell completion script generated from the public command specification.

Global options#

OptionBehavior
--help, -hPrint public CLI help and exit.
--jsonEmit machine-readable JSON. pulse dev emits one JSON event per line.
--dry-run, --planResolve and report the command plan without executing it.

Shell completion#

Completion output is generated from the same public command and option specification as help and this reference. Tooling can consume the generated machine-readable command specification.

bash#

source <(pulse completion bash)

The package also ships completions/pulse.bash.

zsh#

source <(pulse completion zsh)

The package also ships completions/_pulse.

fish#

pulse completion fish | source

The package also ships completions/pulse.fish.

pulse init#

Create a conventional .pulse workspace with an async Pulse application and dedicated test harness.

Syntax:

pulse init [directory] [--name <package-name>] [--force]

Positionals#

  • directory — Target directory. Defaults to the current directory.

Options#

OptionBehavior
--forceAllow generated files to replace entries in a non-empty target directory.
--name <package-name>Set the generated npm package name.

Examples#

pulse init ./my-pulse-app
pulse init ./edge-app --name @example/edge-app

Output#

  • Human output lists generated files and next steps.
  • With --json, emits one initialization result object.

Side effects#

  • Creates .pulse/config.ts, an async Pulse application, a dedicated test harness, package scripts, and documentation.
  • Does not install dependencies or run npm, pnpm, or any network operation.

Exit behavior#

0 on success; 2 for invalid usage, provider selection, or unsafe overwrite conditions.

pulse doctor#

Audit project shape, compilation, schemas, provider bindings, output safety, and required tools.

Syntax:

pulse doctor [directory] [--profile <name>] [--strict]

Positionals#

  • directory — Project discovery start. Defaults to the current directory.

Options#

OptionBehavior
--strictTreat doctor warnings as failed checks.
--profile <profile>Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile.

Examples#

pulse doctor ./my-pulse-app
pulse doctor ./edge-app --strict --json

Output#

  • Human output prints every check.
  • With --json, emits one completed audit object including failed and warning checks.

Side effects#

  • Reads and compiles the project.
  • Does not write the build output.

Exit behavior#

0 when the audit passes; 1 when a completed audit contains failed checks; 2–5 only when the audit command itself cannot be completed.

pulse inspect#

Report canonical compiler, schema, effect, continuation, capability, provider, and build-mode details.

Supported signatures:

pulse inspect [directory] [--profile <name>]
pulse inspect --artifact <file.json>

Positionals#

  • directory — Project discovery start. Defaults to the current directory.

Options#

OptionBehavior
--profile <profile>Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile.
--artifact <file.json>Inspect an existing JSON build or compiler artifact instead of a project.

Examples#

pulse inspect ./my-pulse-app --json
pulse inspect --artifact ./dist/pulse-build.json

Output#

  • Human output prints a compact project/compiler summary.
  • With --json, emits one inspection or artifact object.

Side effects#

  • Compiles and validates the project in memory.
  • Does not write the build output.

Exit behavior#

0 on success; 2–5 according to the emitted stable diagnostic.

pulse test#

Run configured cases through the selected provider local-conformance runtime.

Syntax:

pulse test [directory] [--profile <name>] [--case <name>]

Positionals#

  • directory — Project discovery start. Defaults to the current directory.

Options#

OptionBehavior
--profile <profile>Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile.
--case <name>Run one named project test case.

Examples#

pulse test ./my-pulse-app
pulse test ./my-pulse-app --case smoke --json

Output#

  • Human output uses TAP-like case lines and a summary.
  • With --json, emits one test-run object; expected stable errors remain inside their case results.

Side effects#

  • Compiles the project and executes configured deterministic or live fixtures.
  • Does not write the build output.

Exit behavior#

0 when all selected cases pass; 1 when the completed test run has failed cases; 2–5 when setup, compilation, runtime, or toolchain execution fails before a normal result.

pulse dev#

Start the foreground local server with the selected provider conformance runtime.

Syntax:

pulse dev [directory] [--profile <name>] [--host <host>] [--port <port>] [--watch|--no-watch] [--once]

Positionals#

  • directory — Project discovery start. Defaults to the current directory.

Options#

OptionBehavior
--onceClose the development server after the first completed request.
--watch, --no-watchEnable or disable entry and schema dependency watching. Watching is enabled by default.
--profile <profile>Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile.
--host <host>Override the development listen host.
--port <port>Override the development listen port. Use 0 to request an ephemeral port.

Examples#

pulse dev ./my-pulse-app
pulse dev ./my-pulse-app --port 0 --once --json

Output#

  • Human output reports the ready URL and reload or error messages.
  • With --json, stdout is newline-delimited JSON events: compiled, ready, reloaded, request, compile-error, and request-error. It is not one enclosing JSON document.

Side effects#

  • Binds a foreground HTTP listener.
  • Watches the entry and schema dependency graph by default.
  • Configuration-file changes require restarting the command.

Exit behavior#

0 after a normal server close; 2–5 when setup, compilation, provider, runtime, or toolchain initialization fails.

pulse compile#

Compile the canonical project into provider-neutral Pulse-owned WebAssembly.

Syntax:

pulse compile [directory] [--profile <name>] [--out <dir>] [--clean|--no-clean] [--experimental-native-size]

Positionals#

  • directory — Project discovery start. Defaults to the current directory.

Options#

OptionBehavior
--clean, --no-cleanRemove or preserve the selected output directory before writing artifacts. Cleaning is enabled by default.
--experimental-native-sizeExperimentally optimize Native Wasm for size. JavaScript build targets reject this flag.
--profile <profile>Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile.
--out <dir>Override the project-relative artifact output directory.

Examples#

pulse compile ./my-pulse-app
pulse compile ./edge-app --out ./dist --json
pulse compile ./edge-app --experimental-native-size

Output#

  • Writes pulse-compile.json, the canonical program, native plan, generated AssemblyScript, compact Wasm, WAT, and native manifest.
  • The output is provider-neutral and does not package a deployment provider runtime.
  • Experimental size builds record the exact non-default Native compiler optimization settings.
  • With --json, emits one compile result object containing exact artifact paths and native metadata.

Side effects#

  • Cleans the output directory by default.
  • Invokes the lockfile-pinned AssemblyScript compiler.
  • Refuses absolute, parent-traversal, and symbolic-link traversal outside the project root.

Exit behavior#

0 on success; 2–5 according to the emitted stable diagnostic.

pulse build#

Compile the canonical project and realize the deployment provider selected by the active project profile.

Syntax:

pulse build [directory] [--profile <name>] [--out <dir>] [--clean|--no-clean] [--experimental-native-size]

Positionals#

  • directory — Project discovery start. Defaults to the current directory.

Options#

OptionBehavior
--clean, --no-cleanRemove or preserve the selected output directory before writing artifacts. Cleaning is enabled by default.
--experimental-native-sizeExperimentally optimize Native Wasm for size. JavaScript build targets reject this flag.
--profile <profile>Select a project profile. Precedence: --profile, PULSE_PROFILE, pulse.defaultProfile.
--out <dir>Override the project-relative artifact output directory.

Examples#

pulse build ./my-pulse-app
pulse build ./edge-app --out ./dist --json
pulse build ./edge-app --experimental-native-size

Output#

  • Writes pulse-build.json, the provider-neutral native module, and the configured provider realization.
  • Fastly builds write generated AssemblyScript and direct-host-ABI native Wasm at bin/main.wasm; no JavaScript runtime image is packaged.
  • Experimental size builds record the exact non-default Native compiler optimization settings in portable, provider, and build metadata.
  • With --json, emits one build result object containing exact portable and provider artifact paths.

Side effects#

  • Cleans the output directory by default.
  • Invokes the native compiler and configured provider realization.
  • Refuses absolute, parent-traversal, and symbolic-link traversal outside the project root.

Exit behavior#

0 on success; 2–5 according to the emitted stable diagnostic.

Configuration discovery and command precedence#

Project commands start discovery from their optional positional [directory] or the current directory, then search upward for the single configuration entrypoint:

.pulse/config.ts

Profile selection follows --profile, PULSE_PROFILE, then pulse.defaultProfile. Command-line --out, --host, --port, and watch flags are invocation-local controls. Entry, provider, and target selection belong to .pulse/config.ts: pulse compile remains provider-neutral and pulse build realizes the selected provider. See Project configuration.

JSON and stream contracts#

For completed commands, --json emits one JSON object followed by a newline. pulse dev --json is deliberately different: stdout is newline-delimited JSON, with one event object per line. Event names are compiled, ready, reloaded, request, compile-error, and request-error; consumers must not wait for one enclosing JSON document.

Raw configured secret values are not included in project JSON, diagnostics, or runtime error detail fields.

Provider restrictions and build products#

Providerinspect/buildtest/devBuild result
nodeYesYesPortable Pulse Wasm plus the configured Node-native realization and pulse-build.json.
fastlyYesYes, through local conformancePortable Pulse Wasm plus generated AssemblyScript and compact direct-host-ABI bin/main.wasm.
noneCompile onlyNopulse compile emits portable Pulse Wasm; pulse build rejects the missing deployment provider.

Build output is cleaned by default. --no-clean preserves the directory, but output safety still rejects absolute, parent-traversal, and symbolic-link traversal outside the project root.

Exit classes#

ExitMeaning
0Command completed successfully.
1Completed audit/test failure where documented, or an unexpected uncatalogued internal failure.
2Usage, project configuration, provider selection, or output-safety error.
3Canonical/schema/package-lowering/provider-binding failure.
4Request, test, runtime, fetch, or continuation failure.
5External toolchain or Fastly local-execution failure.

pulse doctor completes with exit 1 when its audit contains failed checks. pulse test completes with exit 1 when a normal test run has failed cases. Setup failures use their diagnostic exit class.

Failed commands emit stable codes, categories, summaries, remediation, exit classes, and a versioned documentation URL. See Diagnostics and remediation.

Browse other documentation