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.
- macOS
- Windows
- Make sure you have Xcode installed.
- 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.7.8.zip
- Extract the file in the desired location, for example:
unzip monarch_macos_1.7.8.zip
- Add the monarch binaries to your path:
export PATH="$PATH:`pwd`/monarch/bin"
- Make sure you have Visual Studio 2022 with the “Desktop development with C++” workload installed, including all of its default components. (Note: Visual Studio is different than Visual Studio Code).
- Download the following bundle to get the latest release of the Monarch binaries, which include the Monarch CLI and desktop app.
- Extract the file in the desired location, for example:
cd development
tar -x -f monarch_windows_1.7.8.zip
- Add the monarch binaries to your path:
set PATH=%PATH%;C:\path\to\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
- 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.
- 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.
Update your path
Follow these instructions to update your path variable permanently, which will
let you run monarch
from any terminal window.
- macOS
- Windows
- Open your
rc
file, which may be ~/.bash_profile, ~/.bashrc or ~/.zshrc.
- 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"
- Run
source ~/. rc file
to refresh the current window, or open a new terminal window to automatically source the file.
- Verify that the monarch/bin directory is now in your PATH by running:
echo $PATH
- Verify that the monarch command is available by running:
monarch --version
- From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
- Under User variables, look for an entry called Path, then append the full path of
monarch\bin
using;
as a separator from existing values.