Announcing `mo-dev`: live reloading for Motoko dapps

Hello everyone!

The Languages team at DFINITY is excited to introduce mo-dev, a flexible command-line tool which enables full-stack live reloading for your Motoko dapp or smart contract.

Here is a Medium post with a bit of background about live reloading and some tips for setting up mo-dev for a new or existing project:

We’ve also set up an online Gitpod demo so that you can try mo-dev directly in your browser!

Open in Gitpod

mo-dev is designed to work seamlessly with Vite and other popular front-end dev servers, contributing the following live-reload capabilities:

  • Deploying canisters to the local replica
  • Generating language bindings
  • Running unit tests (files ending with
  • Executing commands

Get started by running npm install -g mo-dev (or downloading a standalone binary from the GitHub releases page). From there, run mo-dev --help to view all available features.

Since mo-dev is already being used in several internal DFINITY projects, check out the following GitHub repositories for real-world usage examples:

It’s also worth mentioning that the Motoko VS Code extension has a built-in UI for the mo-dev test runner:

As always, feedback is an important part of our development process! Please feel free to report a bug, suggest a feature, make a contribution, or even just leave a star on the project’s GitHub repository:

Looking forward to seeing what you create with this new live-reload workflow!

~ Ryan