feat(cli-v3): add --no-browser flag and examples to init/login --help#3483
feat(cli-v3): add --no-browser flag and examples to init/login --help#3483
Conversation
Adds an obvious bypass for the browser auto-open during auth, the most common friction point for agentic and other non-interactive uses. Also: error loudly when init runs under non-TTY stdin without --yes (previously default-and-exited silently, leaving the project half-initialized) and surface common invocations via an Examples block in --help output.
🦋 Changeset detectedLatest commit: 8adb94f The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (28)
🧰 Additional context used📓 Path-based instructions (7)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.ts📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)
Files:
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/cli-v3/src/commands/**/*📄 CodeRabbit inference engine (packages/cli-v3/CLAUDE.md)
Files:
packages/cli-v3/src/commands/init.ts📄 CodeRabbit inference engine (packages/cli-v3/CLAUDE.md)
Files:
**/*.ts{,x}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (10)📚 Learning: 2026-03-02T12:43:34.140ZApplied to files:
📚 Learning: 2026-03-02T12:43:34.140ZApplied to files:
📚 Learning: 2026-03-02T12:43:34.140ZApplied to files:
📚 Learning: 2026-03-26T10:02:25.354ZApplied to files:
📚 Learning: 2026-03-02T12:43:34.140ZApplied to files:
📚 Learning: 2026-02-19T18:09:23.944ZApplied to files:
📚 Learning: 2025-08-14T18:35:44.370ZApplied to files:
📚 Learning: 2026-03-25T15:29:25.889ZApplied to files:
📚 Learning: 2026-03-22T13:26:12.060ZApplied to files:
📚 Learning: 2026-03-22T19:24:14.403ZApplied to files:
🔇 Additional comments (4)
WalkthroughAdds a Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
On a fresh machine where hasSeenMCPInstallPrompt is false, the prompt at init.ts:150 fired unconditionally and would hang the --yes flow that the non-TTY guard above is meant to support. Default to CLI (skip MCP) when --yes is passed.
|
ready |
|
@nicktrn ci failures |
@ericallam pre-existing, flaky run engine tests |
Closes the most common friction point hit while setting up a fresh project from an agent harness: the CLI auto-opens the user's default browser during auth and there is no supported way to skip it (the existing
isLinuxServer()path only triggers whenxdg-openis missing entirely).--no-browseronloginandinitprints the URL and waits to be visited from any browser. The flag threads through the embeddedlogin()call insideinit.While here:
initnow errors loudly when stdin is non-TTY without--yesinstead of default-and-exiting silently at the first prompt (which left the project half-initialized: deps installed, no config or example file).Examplesblock in--helprendered between the description and the arguments/options list, so--help | headsurfaces the common invocations.Other commands also call
login()embedded and would benefit from--no-browsertoo, but kept this PR scoped to the cases the friction log called out.