Skip to content

meshx-org/meshx



MeshX CLI logo


Build wasm components then deploy and manage them on MeshX Cloud


License Last Commit Maintenance Status Rust Cargo

⚠️ Highly WIP - Broken builds on main are common




The meshx CLI is a terminal wrapper around MeshX Cloud, designed to simplify interacting with MeshX Cloud's services from your terminal. It streamlines Wasm component development, deployment, and management by providing direct access to MeshX Cloud features in a familiar command-line interface.

Features

  • Project Creation: Generate new WebAssembly component projects from templates
  • Multi-Language Build System: Compile components for multiple languages (Rust, Go, TypeScript)
  • Development Loop: Built-in hot-reload development server (meshx dev)
  • OCI Registry Integration: Push and pull components to/from OCI-compatible registries
  • Environment Health Checks: Built-in diagnostics and system verification
  • Configuration Management: Hierarchical configuration with global and project-level settings
  • Self-Updates: Keep wash up-to-date with the latest features and fixes

Installation

From Source

git clone https://github.com/meshx-org/meshx.git
cd meshx
cargo install --path .

Quickstart

Note: This quickstart requires the Rust toolchain and the wasm32-wasip2 target for Rust: rustup target add wasm32-wasip2

  1. Check your environment:

    meshx doctor
  2. Create a new component:

    meshx new https://github.com/wasmCloud/wash.git --subfolder examples/http-hello-world
  3. Build your component:

    meshx -C ./http-hello-world build
  4. Start a development loop

    meshx -C ./http-hello-world dev
  5. Keep meshx updated:

    meshx update

Commands

Command Description
meshx auth Authenticate with MeshX ID
meshx config View and manage meshx configuration
meshx completion Generate shell completions
meshx dev Start a development server for a Wasm component
meshx deploy Deploy a manifest to MeshX Cloud
meshx doctor Check the health of your meshx installation and environment
meshx new Create a new project from a template or git repository
meshx update Update MeshX to the latest version

Run meshx --help or meshx <command> --help for detailed usage information.

Shell Completion

Zsh

For zsh completion, please run:

mkdir -p ~/.zsh/completion
meshx completion zsh > ~/.zsh/completion/_meshx

and put the following in ~/.zshrc:

fpath=(~/.zsh/completion $fpath)

Note if you're not running a distribution like oh-my-zsh you may first have to enable autocompletion (and put in ~/.zshrc to make it persistent):

autoload -Uz compinit && compinit

Bash

To enable bash completion, run the following, or put it in ~/.bashrc or ~/.profile:

. <(meshx completion bash)

Fish

The below commands can be used for fish auto completion:

mkdir -p ~/.config/fish/completions
meshx completion fish > ~/.config/fish/completions/meshx.fish

Powershell

The below command can be referred for setting it up. Please note that the path might be different depending on your system settings.

meshx completion powershell > $env:UserProfile\\Documents\\WindowsPowerShell\\Scripts\\meshx.ps1

Regenerate Cloud OpenAPI

openapi-generator-cli generate -g rust -o crates/meshx-client -i openapi.yaml --additional-properties=packageName=meshx_client,packageVersion=<version-here>

Documentation

Attribution

This project is a derived work of the wasmCloud Shell (wash) project, originally created and maintained by the wasmCloud Maintainers. We are grateful for their foundational work that made this project possible.

License

Apache-2.0

This project maintains the same Apache 2.0 license as the original wash project. See the LICENSE file for details.

About

MeshX CLI

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Languages