-
macOS 14+
-
Xcode 26 (the pinned toolchain); Xcode 16.2 on Intel Macs running macOS 14 also builds the macOS app (best effort)
-
Zig (install via
brew install zig) -
Rust —
scripts/setup.shrequiresrustup, and every app build compiles the bundledcmux-cuaengine withcargo. The official installer puts both in~/.cargo/bin, which is wheresetup.shlooks:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Homebrew's
rustupformula works too, but it is keg-only and no longer shipsrustup-init, so add$(brew --prefix rustup)/bintoPATHand runrustup default stableyourself. -
On Xcode 26 the Metal compiler is a separately downloaded component, and the build fails without it. Select the intended full Xcode installation first (
DEVELOPER_DIR, if exported, overridesxcode-select), then install the component:xcodebuild -downloadComponent MetalToolchain
-
Clone the repository with submodules:
git clone --recursive https://github.com/manaflow-ai/cmux.git cd cmux -
Run the setup script:
./scripts/setup.sh
This will:
- Initialize git submodules (ghostty, homebrew-cmux)
- Install the pinned Rust toolchain
- Fetch a checksum-pinned prebuilt GhosttyKit.xcframework, falling back to building it
from source with Zig (force the source build with
CMUX_GHOSTTYKIT_NO_PREBUILT=1) - Create the necessary symlinks
-
Build the debug app:
./scripts/reload.sh --tag my-feature
The script prints the
.apppath. Cmd-click to open, or pass--launchto open automatically.
| Script | Description |
|---|---|
./scripts/setup.sh |
One-time setup (submodules + xcframework) |
./scripts/reload.sh |
Build Debug app (pass --launch to also open it) |
./scripts/reloadp.sh |
Build and launch Release app |
./scripts/reload2.sh |
Reload both Debug and Release |
./scripts/rebuild.sh |
Clean rebuild |
DEBUG builds can auto-sign-in as you and auto-attach an iOS build to your Mac with no manual steps. Each developer does a one-time setup with their own Stack account.
Run this once:
scripts/setup-team-dev.shIt prompts for your Stack email and password (the password is never echoed), verifies them against Stack, and writes ~/.secrets/cmuxterm-dev.env with chmod 600. Re-running it is safe; if you are already configured it prints the account and exits. To reset, delete ~/.secrets/cmuxterm-dev.env and run it again.
After that, every dev build signs you in automatically:
scripts/dev-setup.sh --tag <your-initials>That builds the tagged macOS DEBUG app auto-signed-in as you, enables the iOS pairing host, mints an attach ticket, and launches the iOS dev build auto-attached to your Mac. Use --surface mac for macOS only. See scripts/dev-setup.sh --help for all flags.
This is DEBUG-only and per-user. The credentials file lives outside the repo and is never committed; scripts/cmuxterm-dev.env.example is the in-repo template. Release builds never read these credentials (the auto-sign-in path is compiled out of release).
Run Biome from the repository root with:
bun run biome:checkThe root biome.json intentionally scopes biome check . to maintained web and JS/TS sources.
It excludes generated bundles, build outputs, vendored trees, and review-tool metadata such as
.greptile/.
Biome formatting and import sorting are disabled for now; do not wire this into required CI until
the remaining source lint diagnostics are paid down.
If you make changes to the ghostty submodule, rebuild the xcframework:
cd ghostty
zig build -Demit-xcframework=true -Doptimize=ReleaseFastssh cmux-vm 'cd /Users/cmux/cmux && xcodebuild -project cmux.xcodeproj -scheme cmux -configuration Debug -destination "platform=macOS" build && pkill -x "cmux DEV" || true && APP=$(find /Users/cmux/Library/Developer/Xcode/DerivedData -path "*/Build/Products/Debug/cmux DEV.app" -print -quit) && open "$APP" && for i in {1..20}; do [ -S /tmp/cmux.sock ] && break; sleep 0.5; done && python3 tests_v2/test_update_timing.py && python3 tests_v2/test_signals_auto.py && python3 tests_v2/test_ctrl_socket.py && python3 tests_v2/test_notifications.py'ssh cmux-vm 'cd /Users/cmux/cmux && xcodebuild -project cmux.xcodeproj -scheme cmux -configuration Debug -destination "platform=macOS" -only-testing:cmuxUITests test'The ghostty submodule points to manaflow-ai/ghostty, a fork of the upstream Ghostty project.
cd ghostty
git checkout -b my-feature
# make changes
git add .
git commit -m "Description of changes"
git push manaflow my-featurecd ghostty
git fetch origin
git checkout main
git merge origin/main
git push manaflow mainThen update the parent repo:
cd ..
git add ghostty
git commit -m "Update ghostty submodule"See docs/ghostty-fork.md for details on fork changes and conflict notes.
By contributing to this repository, you agree that:
- Your contributions are licensed under the project's GNU General Public License v3.0 or later (
GPL-3.0-or-later). - You grant Manaflow, Inc. a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license to use, reproduce, modify, sublicense, and distribute your contributions under any license, including a commercial license offered to third parties.