Install

Download the Monarch binaries#

info

This is the beta release of Monarch. We support Flutter development on macOS and Windows. Linux support coming soon.

  1. Make sure you have Xcode installed.
  1. Download the following bundle to get the latest release of the Monarch binaries, which include the Monarch CLI and desktop app.
cd ~/development
curl -O https://d2dpq905ksf9xw.cloudfront.net/macos/monarch_macos_1.0.4.zip

  1. Extract the file in the desired location, for example:
unzip monarch_macos_1.0.4.zip

  1. Add the monarch binaries to your path:
export PATH="$PATH:`pwd`/monarch/bin"

This command sets your PATH variable for the current terminal window only. To permanently add Monarch to your path, see Update your path.

Run Monarch#

  1. Go to one of your Flutter projects and then run monarch init. Run it inside your existing project’s root directory:
monarch init

The monarch init command will set up all the dependencies needed to run monarch. It will also create a few sample stories in your project.

  1. Run monarch using monarch run
monarch run

The monarch run command will prepare the stories in your project so they can be rendered by the Monarch desktop app. The monarch run command will launch the Monarch app so you can see your stories.

Update your path#

Follow these instructions to update your path variable permanently, which will let you run monarch from any terminal window.

  1. Open your rc file, which may be ~/.bash_profile, ~/.bashrc or ~/.zshrc.
  1. Add the following line and change [PATH_TO_MONARCH] to be the path where you unzipped Monarch:
export PATH="$PATH:[PATH_TO_MONARCH]/monarch/bin"

  1. Run source ~/. rc file to refresh the current window, or open a new terminal window to automatically source the file.
  1. Verify that the monarch/bin directory is now in your PATH by running:
echo $PATH

  1. Verify that the monarch command is available by running:
monarch --version