These tests/ files import the v1 socket client and are not referenced by any workflow, script, or test. CI runs only three v1 socket e2e files (test_cli_socket_autodiscovery, test_multi_workspace_focus, test_workspace_churn_up_arrow_lag), which are kept. 28 of the deleted files have an identically-named successor in tests_v2/; the rest were runnable only via the manual cmux-vm run-tests-v1.sh glob. Also updates CONTRIBUTING.md's VM test command to the tests_v2 paths (it referenced tests/test_update_timing.py, which no longer existed) and drops a deleted-file mention from docs/agent-browser-port-spec.md.
4.7 KiB
Contributing to cmux
Prerequisites
- macOS 14+
- Xcode 15+
- Zig (install via
brew install zig)
Getting Started
-
Clone the repository with submodules:
git clone --recursive https://github.com/manaflow-ai/cmux.git cd cmux -
Run the setup script:
./scripts/setup.shThis will:
- Initialize git submodules (ghostty, homebrew-cmux)
- Build the GhosttyKit.xcframework from source
- Create the necessary symlinks
-
Build the debug app:
./scripts/reload.sh --tag my-featureThe script prints the
.apppath. Cmd-click to open, or pass--launchto open automatically.
Development Scripts
| 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 |
Team dogfood setup
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.sh
It 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).
Web and JS Tooling
Run Biome from the repository root with:
bun run biome:check
The 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.
Rebuilding GhosttyKit
If you make changes to the ghostty submodule, rebuild the xcframework:
cd ghostty
zig build -Demit-xcframework=true -Doptimize=ReleaseFast
Running Tests
Basic tests (run on VM)
ssh 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'
UI tests (run on VM)
ssh cmux-vm 'cd /Users/cmux/cmux && xcodebuild -project cmux.xcodeproj -scheme cmux -configuration Debug -destination "platform=macOS" -only-testing:cmuxUITests test'
Ghostty Submodule
The ghostty submodule points to manaflow-ai/ghostty, a fork of the upstream Ghostty project.
Making changes to ghostty
cd ghostty
git checkout -b my-feature
# make changes
git add .
git commit -m "Description of changes"
git push manaflow my-feature
Keeping the fork updated
cd ghostty
git fetch origin
git checkout main
git merge origin/main
git push manaflow main
Then 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.
License
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.