Skip to main content

Install

Download the Monarch binaries

  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.

  2. cd ~/development
    curl -O https://d148mrbia1nlbw.cloudfront.net/macos/monarch_macos_2.1.8.zip
  1. Extract the file:

  2. unzip monarch_macos_2.1.8.zip
  1. Add the monarch binaries to your path:

  2. 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 sets up all the dependencies needed to run monarch. It also creates a few sample stories in your project.

  2. Run monarch using monarch run:

    monarch run

    The monarch run command prepares the stories in your project so they can be used by Monarch. It then launches the Monarch app where you can preview your stories.

Building from source

If you prefer to build Monarch from source, you can follow this guide which will help you set up your local and build the Monarch source code.

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:

  2. 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:

  2. echo $PATH
  1. Verify that the monarch command is available by running:

  2. monarch --version