Repository navigation
Alias top-level auth commands - #3754
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR adds top-level ChangesLogin/Logout Alias Implementation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Greptile SummaryThis PR adds
Confidence Score: 5/5The change is additive and narrowly scoped: it wires two new top-level commands to an already-tested code path without touching auth state management, token handling, or any shared production state. The alias construction ([command] + commandArgs) is correct — sub always resolves to the alias name for the login/logout cases, the default error branch is unreachable from the alias paths, and the --help dispatch is updated consistently. Integration tests exercise the full socket round-trip for both aliases and assert the right RPC methods are called. No concurrent, actor-isolation, logging, or architectural concerns are introduced. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[cmux command] --> B{command?}
B -->|auth| C[authArgs = commandArgs]
B -->|login| D[authArgs = login + commandArgs]
B -->|logout| E[authArgs = logout + commandArgs]
C --> F[sub = authArgs.first or status]
D --> F
E --> F
F --> G{sub?}
G -->|status| H[auth.status RPC]
G -->|login| I[auth.status then auth.begin_sign_in RPC]
G -->|logout| J[auth.status then auth.sign_out RPC]
G -->|other| K[CLIError]
Reviews (1): Last reviewed commit: "Alias top-level auth commands" | Re-trigger Greptile |
Summary
cmux loginandcmux logoutthrough existing auth login/logout handlingVerification
./scripts/reload.sh --tag authaliascmux login --help,cmux logout --help,cmux --help | rg ...xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux-unit -configuration Debug -destination 'platform=macOS' -derivedDataPath /Users/lawrence/Library/Developer/Xcode/DerivedData/cmux-authalias build-for-testingNote
Low Risk
Low risk: adds CLI command aliases and help text, plus integration tests, without changing the underlying auth RPC behavior.
Overview
Adds top-level
cmux loginandcmux logoutcommands as aliases that route through the existingauth login/logoutcode path (by rewriting args so the same subcommand handler runs).Updates CLI help output to document the new aliases (including
cmux --helpand per-command help), and adds integration tests (CLIAuthAliasTests) to verify the aliases invokeauth.begin_sign_in/auth.sign_outand produce the expected stdout.Reviewed by Cursor Bugbot for commit 6e1476d. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Add top-level cmux login and cmux logout aliases that invoke the existing auth flow. This improves discoverability without changing behavior.
Written for commit 6e1476d. Summary will update on new commits.
Summary by CodeRabbit
Release Notes
loginandlogoutcommands are now available as convenient aliases forauth loginandauth logout, streamlining your CLI experience.