setup_macos.md
May 5, 2026 ยท View on GitHub
Setup on macOS
Prerequisites
Anthem is developed with the Flutter framework. You can see instructions for installing Flutter for macOS here.
Homebrew is recommended for installing CocoaPods and the C++ tooling used by Anthem. You can get Homebrew here. To install CocoaPods, LLVM 22, and Ninja with Homebrew, you can use the following command:
brew install cocoapods llvm@22 ninja cmake
In addition to Flutter, Anthem needs the following:
- CMake: Required to build the C++ components of Anthem. Download and install CMake from here.
- LLVM 22: Required for
clang-formatandclang-tidy. SetANTHEM_LLVM_BINto the LLVM 22bindirectory if those tools are not exposed as the defaultclang,clang-format, andclang-tidyonPATH. - Ninja: Required if you want to mirror the CI clang tooling setup locally.
If needed, point the Anthem CLI at the Homebrew LLVM 22 tools:
export ANTHEM_LLVM_BIN="$(brew --prefix llvm@22)/bin"
Instructions
- Clone this repository.
- Navigate to the local clone folder.
- Run
git submodule initandgit submodule update. - Run
flutter pub getin the repository root. - Run
dart run anthem:cli codegen generateto create or update generated code. - Run
dart run anthem:cli engine build --debug. This will build the engine executable. - Use the following commands to format and lint engine C++ code:
dart run anthem:cli engine formatdart run anthem:cli engine lint
- (Optional) Open the project in your preferred IDE, such as Visual Studio Code.
- To keep the generated code updated with the source, you have two options:
- Open a new terminal session and run
dart run anthem:cli codegen generate --root-only --watch. This will run Dart-related code generation, and keep the generated files up-to-date as you develop. - Run
dart run anthem:cli codegen generate --root-onlymanually after modifying the model or the IPC messages. This method is a bit more surgical during update, and as a result, C++ build times may be faster when updating generated code with this method.
- Note: you may need to clean and re-run code generation in order to re-generate the files for the IPC messages if they are changed, since they sometimes don't re-generate automatically. There is a note that prints when running the codegen command above which has more info about this.
- Open a new terminal session and run
- Use
flutter runto run Anthem, or start Anthem via your IDE.