wasmer publish CLI

wasmer publish allows publishing a Wasmer container to the registry.


Create a package

Creating a package is very simple, just run:

wasmer init

Publish a package to Wasmer

Once you set up the values in your wasmer.toml manifest, publishing a package to Wasmer is as simple as running the following command:

wasmer publish

This command will create your Wasmer package, and publish it to the Wasmer registry.


Note: You must login to wasmer to use the publish command.

Dry run

If you want to check that everything is running properly before publishing, you can run --dry-run:

wasmer publish --dry-run

This will not upload the package to the registry.


You can set the configuration for the registry very easily.

registry.url: Registry URL


wasmer config get registry.url


wasmer config set registry.url


This is the help output from the Wasmer CLI for wasmer publish --help:

Usage: wasmer publish [OPTIONS] [PACKAGE_PATH]

          Directory containing the `wasmer.toml`, or a custom *.toml manifest file.

          Defaults to current working directory.

      --registry <REGISTRY>
          Registry to publish to

          Run the publish logic without sending anything to the registry server

          Run the publish command without any output

      --package-name <PACKAGE_NAME>
          Override the package of the uploaded package in the wasmer.toml

      --version <VERSION>
          Override the package version of the uploaded package in the wasmer.toml

      --token <TOKEN>
          Override the token (by default, it will use the current logged in user)

          Skip validation of the uploaded package

  -h, --help
          Print help (see a summary with '-h')