Repository navigation
Add cmux vm command aliases - #6375
lawrencecchen wants to merge 9225 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughCLI command dispatch in ChangesVM alias normalization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (20 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
left a comment
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 59e9dbc. Configure here.
Greptile SummaryAdds
Confidence Score: 5/5Safe to merge — changes are limited to CLI alias routing and documentation with no backend or protocol modifications. All changes are confined to CLI command dispatch (adding two cases to existing switch arms) and help text. Canonical commands and RPC methods are untouched. The only finding is a cosmetic inconsistency in the error message shown to No files require special attention. The test coverage gap in Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["cmux vm <subcommand>"] --> B{subcommand}
B --> |"new\ncreate"| C["vm.create RPC\n(+ optional shell drop-in)"]
B --> |"ls\nlist"| D["vm.list RPC"]
B --> |"shell / attach / connect"| E["vmOpenShell\n(legacy direct attach)"]
B --> |"ssh"| F["vmOpenShell\n(managed SSH workspace)"]
B --> |"rm / remove\ndestroy / delete"| G["vm.destroy RPC"]
B --> |"exec"| H["vm.exec RPC"]
B --> |"ssh-info"| I["vm.attach_info RPC"]
style E fill:#ffe0b2,stroke:#f57c00
style F fill:#c8e6c9,stroke:#388e3c
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["cmux vm <subcommand>"] --> B{subcommand}
B --> |"new\ncreate"| C["vm.create RPC\n(+ optional shell drop-in)"]
B --> |"ls\nlist"| D["vm.list RPC"]
B --> |"shell / attach / connect"| E["vmOpenShell\n(legacy direct attach)"]
B --> |"ssh"| F["vmOpenShell\n(managed SSH workspace)"]
B --> |"rm / remove\ndestroy / delete"| G["vm.destroy RPC"]
B --> |"exec"| H["vm.exec RPC"]
B --> |"ssh-info"| I["vm.attach_info RPC"]
style E fill:#ffe0b2,stroke:#f57c00
style F fill:#c8e6c9,stroke:#388e3c
Reviews (2): Last reviewed commit: "Merge branch 'main' into feat-vm-command..." | Re-trigger Greptile |
| "transport": "ssh", | ||
| "host": "gateway.freestyle.sh", | ||
| "port": 2222, | ||
| "username": "cmux", | ||
| "credential": [ | ||
| "kind": "password", | ||
| "value": "lease-token", | ||
| ], | ||
| ] | ||
| ) | ||
| case "workspace.create": | ||
| return self.v2Response( | ||
| id: id, | ||
| ok: true, | ||
| result: [ | ||
| "workspace_id": workspaceID, | ||
| ] | ||
| ) | ||
| case "workspace.rename": | ||
| return self.v2Response(id: id, ok: true, result: ["workspace_id": workspaceID]) | ||
| case "workspace.remote.configure": | ||
| return self.v2Response( | ||
| id: id, | ||
| ok: true, | ||
| result: [ | ||
| "workspace_id": workspaceID, | ||
| "workspace_ref": workspaceRef, | ||
| "remote": [ | ||
| "enabled": true, | ||
| "state": "connecting", | ||
| ], | ||
| ] | ||
| ) | ||
| case "workspace.select": | ||
| return self.v2Response(id: id, ok: true, result: ["workspace_id": workspaceID]) | ||
| default: | ||
| return self.v2Response( | ||
| id: id, | ||
| ok: false, | ||
| error: ["code": "unexpected", "message": "Unexpected method \(method)"] | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| var environment = ProcessInfo.processInfo.environment | ||
| environment["CMUX_SOCKET_PATH"] = socketPath | ||
| environment["CMUX_CLI_SENTRY_DISABLED"] = "1" | ||
| environment["CMUX_CLAUDE_HOOK_SENTRY_DISABLED"] = "1" | ||
|
|
||
| let result = runProcess( | ||
| executablePath: cliPath, | ||
| arguments: ["vm", "connect", vmID], | ||
| environment: environment, | ||
| timeout: 5 | ||
| ) | ||
|
|
||
| wait(for: [serverHandled], timeout: 5) | ||
| XCTAssertFalse(result.timedOut, result.stderr) | ||
| XCTAssertEqual(result.status, 0, result.stderr) | ||
| XCTAssertEqual(result.stdout, "OK workspace=\(workspaceRef) target=cmux@gateway.freestyle.sh state=connecting\n") | ||
| XCTAssertEqual( | ||
| state.commands.compactMap { self.jsonObject($0)?["method"] as? String }, | ||
| ["vm.attach_info", "workspace.create", "workspace.rename", "workspace.remote.configure", "workspace.select"] | ||
| ) | ||
| } |
There was a problem hiding this comment.
Connect-alias test asserts fewer RPC params than the base SSH test
testVMConnectAliasOpensManagedWorkspaceThroughSharedSSHPath verifies only the method sequence, not the content of the workspace.remote.configure call. The base testVMSSHOpensManagedWorkspaceThroughSharedSSHPath (line 315–326) additionally asserts destination, port, local_socket_path, skip_daemon_bootstrap, terminal_startup_command, and relay_port on that request — which are the fields that prove the SSH path is wired correctly end-to-end. Without those assertions, a regression that routes connect through the code path but forwards the wrong host/port/socket would still pass this test.
| @@ -4012,7 +4012,7 @@ struct CMUXCLI { | |||
| idFormat: idFormat | |||
| ) | |||
There was a problem hiding this comment.
Parallel
shell/attach/connect case duplicates the ssh case verbatim
Both branches call vmOpenShell with identical arguments. If ssh ever gains a new flag or behaviour change, connect/shell/attach will silently diverge. Since connect is being added as an alias for ssh, consider routing it through the ssh case via fallthrough so future changes to ssh apply automatically to all its aliases.
| case "shell", "attach", "connect": | |
| // Aliases for "ssh" — route through the same case to stay in sync. | |
| fallthrough | |
| case "ssh": | |
| let (windowOpt, vmArgs) = parseOption(rest, name: "--window") | |
| guard let vmId = vmArgs.first else { | |
| throw CLIError(message: """ | |
| Usage: cmux vm ssh <id> | |
| Find an id: | |
| cmux vm ls | |
| """) | |
| } | |
| let shortId = String(vmId.prefix(8)) | |
| try vmOpenShell( | |
| id: vmId, | |
| workspaceName: "vm:\(shortId)", | |
| windowRaw: windowOpt ?? windowId, | |
| client: client, | |
| jsonOutput: jsonOutput, | |
| idFormat: idFormat | |
| ) |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
left a comment
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CLI/cmux.swift`:
- Line 34274: The global command documentation for the vm command contains an
incomplete list of aliases in the parenthetical note. Update the text that
currently reads "accepts create/list/attach/remove aliases" to include all
documented aliases: create, list, attach, remove, shell, connect (for ssh), and
delete, destroy (for rm). This will ensure consistency between the global
command summary and the comprehensive alias lists documented in the detailed
help sections and default error messages for the vm command.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 238fd56b-7cf5-42b2-975a-c7bd04319b61
📒 Files selected for processing (3)
CLI/cmux.swiftcmuxTests/VMSSHCommandTests.swiftdocs/cli-contract.md
| auth <status|login|logout> | ||
| login | logout (aliases for auth login/logout) | ||
| vm <new|ls|rm|exec|shell|ssh> [args...] (alias: cloud) | ||
| vm <new|ls|rm|exec|ssh|ssh-info> [args...] (alias: cloud; accepts create/list/attach/remove aliases) |
There was a problem hiding this comment.
Incomplete alias list in global command documentation.
The parenthetical note says "accepts create/list/attach/remove aliases", but this omits several aliases that are documented in the detailed help (lines 14463-14468) and the default error message (lines 4129-4133):
- Missing:
shell,connect(aliases forssh) - Missing:
delete,destroy(aliases forrm)
This creates inconsistency between the comprehensive alias list in the detailed help and this brief global summary.
📝 Proposed fix for completeness
- vm <new|ls|rm|exec|ssh|ssh-info> [args...] (alias: cloud; accepts create/list/attach/remove aliases)
+ vm <new|ls|rm|exec|ssh|ssh-info> [args...] (alias: cloud; accepts create/list/shell/attach/connect/remove/delete/destroy aliases)Or for brevity while staying accurate:
- vm <new|ls|rm|exec|ssh|ssh-info> [args...] (alias: cloud; accepts create/list/attach/remove aliases)
+ vm <new|ls|rm|exec|ssh|ssh-info> [args...] (alias: cloud; see `cmux vm` for full alias list)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CLI/cmux.swift` at line 34274, The global command documentation for the vm
command contains an incomplete list of aliases in the parenthetical note. Update
the text that currently reads "accepts create/list/attach/remove aliases" to
include all documented aliases: create, list, attach, remove, shell, connect
(for ssh), and delete, destroy (for rm). This will ensure consistency between
the global command summary and the comprehensive alias lists documented in the
detailed help sections and default error messages for the vm command.
* test: cover CLI account switching * fix: allow switching accounts for CLI auth * test: assert CLI auth cookies expire * test: scope CLI auth cookie expiry assertion * test: verify expiry on the CLI account switch path
…#12667) * test: cover internal memory pressure notification side effects * fix: keep memory pressure diagnostics out of user notifications * test: restore shared pressure registrations after notification regression * test: isolate relay selector authorization failures
* test: cover recursive Codex autoresume chain * fix: keep Codex autoresume bindings across relaunches
* Guard production IROH v2 deploy against auth scope drift * fix production scope probe expected auth responses * Cover production scope probe failures and timeout bounds * Bound production probes and verify structured auth errors * Guard production deploy rollback after failed probe * Avoid extra production deploy marker dependency * Fix deploy test helper tuple typing
…2411) * test: preserve Iroh sessions through application stalls * fix: let Iroh own established connection lifetime * fix: clear cloud panel failures through the workspace API * test: cover coalesced tail of maximum-size mobile frame * fix: apply mobile size limits per frame rather than per read * test: derive mobile lane quota expectation * test: include simulator streams in mobile lane quota * test: keep mobile host connections alive while idle * fix: let native transport own idle session lifetime * test: distinguish retired transport from recovery presentation * fix: retain recovery presentation while retiring dead transports * test: cover live transport foreground recovery * fix: retain live Iroh sessions during foreground recovery * test: avoid AppKit keyWindow collision in Cloud drag fixture * test: convert Cloud hover fixture coordinates as a point * fix: disable first-frame timeout for admitted Iroh * fix: keep closed control transports bound to their session --------- Co-authored-by: austinpower1258 <austinwang115@gmail.com>
) * test: reproduce missing discovery of older Macs after v2 upgrade * test: cover legacy admission isolation from v2 authority * feat: add scoped legacy compatibility broker service * fix: preserve v2 device id in compatibility identity * test: preserve saved Macs across the v2 storage upgrade * fix: migrate saved Macs into the v2 local store * Clarify Mac compatibility with older iOS clients * Record bounded v2 connection failures in native journals * bound compatibility binding revocation during teardown * serve legacy mobile dialect from v2 mac endpoint * compose v2 and legacy device-list admission authorities * gate compatibility lifecycle on v2 enrollment * pass real refresh token to legacy compatibility broker * cancel legacy observers on v2 authority revocation * Enforce compatibility revocation across native lifecycle changes * Preserve older directory release channel values * Fix older peer identity access and isolate backend runtime test suites * await auth scope checks in compatibility token source
* Test deployment marker and migration safety * Guard production probes and DO migrations
* test: prove cloud create does not depend on guest network announce * fix: remove redundant cloud create network probe * fix: validate cloud network addresses before publication
Exercise the shared local image transfer path for both image drops and Cmd+V paste. The materialized file must remain available after the path is sent so Claude Code and Codex can read it asynchronously.
Do not delete cmux-owned image files when the local terminal path is delivered. Claude Code and Codex read that path asynchronously after sendText returns; retain the file for the existing process-lifetime cleanup instead.
* fix(ios): preserve local scroll through reconnects * fix(ios): bound reconnect scroll lease * feat(debug): add mobile reconnect soak command * fix(debug): use mac logger for reconnect soak * fix(dev): require authenticated isolated tagged launches * fix(terminal): require fresh screen state after reconnect * fix(ios): remove stale reconnect scroll lease
(cherry picked from commit 732a920)
(cherry picked from commit eb65cbf)
(cherry picked from commit 32f7528)
(cherry picked from commit 4282edc)
(cherry picked from commit 8b9d2b9)
(cherry picked from commit 8959f27)
(cherry picked from commit f2c779f)
(cherry picked from commit 0b9e38f)
Restoring `@discardableResult` on its own line took the file to 515 lines against a tracked budget of 514. Put it beside `@MainActor` instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Changelog and changelog-media entries cover the stable fixes since v0.64.24. The 11 mobile.whatsNew.pairing.* keys added by #12316 shipped English-only in both iOS catalogs; translate them into de, fr, ar, es, zh-Hant, zh-Hans, ko, and ja with scripts/localization_catalog.py merge. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Build 106, not 105: the rc feed already serves com.cmuxterm.app 0.64.25 (105) built from rc/v0.64.25, and bump-version.sh only checks the stable appcast (104). Reusing 105 from a different source tree would give Sparkle two binaries with one build number. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Release v0.64.25
fix: make tmux-compat polling backpressure deterministic
Show one compact Cloud terminal error inside its owning pane, with a square 1 px border, no shadow, Retry, and contextual Copy Error. Preserve safe failure categories and operation traces, and clean up every classified cancellation consistently. Verified the default card in a tagged app, all 22 focused Cloud tests, and the cancellation regression before and after the fix. #12609
commented
Sep 17, 2026
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
commented
Sep 19, 2026
|
Mac fleet instructions for head JOB_JSON=$(~/.local/bin/cmux-ci submit --kind cmux --command 'CMUX_FLEET_BUILD_TAG=pr-6375-01faafe5 /Users/Shared/cmux-build-fleet/recipes/cmux.sh https://github.com/manaflow-ai/cmux.git 01faafe5a60bcc29f5cb8c7239e5d319a6382293' --artifact artifacts/cmux.app.zip --workspace https://github.com/manaflow-ai/cmux/pull/6375 --source-digest 01faafe5a60bcc29f5cb8c7239e5d319a6382293 --cache-key cmux:pr-6375 --min-free-bytes 268435456000 --label cmux --label ram48)
JOB_ID=$(python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])' <<<"$JOB_JSON")
~/.local/bin/cmux-ci wait "$JOB_ID" --receipt artifacts/fleet/$JOB_ID.json
~/.local/bin/cmux-ci publish-hq "$JOB_ID"Use an existing campaign job ID if one is already posted; do not submit a duplicate. A wait timeout leaves the remote job running. Published results will include an exact-head artifact link and timing/disk receipt. This recipe validates the macOS app only, not iOS or tests. Never use maclease or put credentials in a PR comment. |
commented
Sep 26, 2026
|
Automatic catch-up: I tried to catch this branch up with
Nothing was pushed. Merge Automatic catch-up will not try this head again; a new push or |
commented
Oct 6, 2026
|
Closing; reopen if you still want it. |

Summary:
cmux vm createthrough the existingvm newimplementationconnectforvm sshandremoveforvm rm, while keeping existing aliasesVerification:
xcodebuild -project cmux.xcodeproj -scheme cmux-unit -configuration Debug -destination 'platform=macOS' -derivedDataPath /tmp/cmux-vm-aliases test -only-testing:cmuxTests/CLINotifyProcessIntegrationRegressionTests/testVMCreateAliasDispatchesThroughVMCreate -only-testing:cmuxTests/CLINotifyProcessIntegrationRegressionTests/testVMRemoveAliasDispatchesThroughVMDestroy -only-testing:cmuxTests/CLINotifyProcessIntegrationRegressionTests/testVMConnectAliasOpensManagedWorkspaceThroughSharedSSHPath\n-git diff --check\n-jq empty Resources/Localizable.xcstrings\n-cmux vm --helpfrom the tagged app shows canonical commands plus the alias block\n\nDogfood:\n- tagged build: http://127.0.0.1:17320/vmalias\nNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
CLI parsing and help-text only; aliases call existing VM create/destroy/SSH paths with contract tests covering dispatch.
Overview
Expands
cmux vm(andcloud) with familiar spellings that dispatch to the same handlers as today’s canonical verbs, and reshapes help/docs so scripts and examples steer toward the short names.Aliases:
create→new,list→ls,shell/attach/connect→ managed SSH via the sharedvmOpenShellpath (same asssh), andremove→rmalongsidedestroy/delete. Shell/attach/connect usage text now points atcmux vm ssh <id>instead ofshell.Docs & help: Top-level usage lines drop
shell/attachfrom the primary subcommand list; a separate Aliases block lists mappings and says to prefernew,ls,ssh, andrm.docs/cli-contract.mdand help probes match that layout.Tests: Integration tests assert
vm create→vm.create,vm remove→vm.destroy, andvm connect→ the same workspace RPC sequence asvm ssh.Reviewed by Cursor Bugbot for commit b81062f. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Adds familiar
cmux vmaliases (create→new,connect→ssh,remove→rm) and standardizes help/docs on canonical commands.Since the last summary the branch has absorbed many unrelated main-branch changes, so the diff is now dominated by CI, release, and review-tooling files; the vm alias behavior is unchanged. Also documents the
vm scp infocommand.New Features
create→new,list→ls,shell/attach/connect→ssh,remove/delete/destroy→rm.cmux vm --helpshows canonical commands (new,ls,rm,exec,ssh,ssh-info) plus an alias block;shell/attachare dropped from primary usage.create→vm.create,remove→vm.destroy, andconnect→the same RPC path asssh.Written for commit 01faafe. Summary will update on new commits.
Summary by CodeRabbit
vm connectas an alias for interactive SSH access (alongsideshellandattach).vm rmaliases for remove/destroy/delete.vmIdis missing and standardized unknown-command help.vm create,vm remove, andvm connectalias dispatch behavior.