fix: make OAuth login URL prominent for SSH/headless users

The URL is now the primary element — displayed in a bordered box
before the browser auto-open attempt. Works for users who SSH into
remote servers where webbrowser.open() silently fails.
This commit is contained in:
teknium1
2026-03-16 23:21:22 -07:00
parent 46176c8029
commit bd3b0c712b

View File

@@ -463,17 +463,22 @@ def run_hermes_oauth_login() -> Optional[str]:
print()
print("Authorize Hermes with your Claude Pro/Max subscription.")
print()
print("Open this link in your browser:")
print("╭─ Claude Pro/Max Authorization ────────────────────╮")
print("│ │")
print("│ Open this link in your browser: │")
print("╰───────────────────────────────────────────────────╯")
print()
print(f" {auth_url}")
print()
# Try to open browser automatically (works on desktop, silently fails on headless)
# Try to open browser automatically (works on desktop, silently fails on headless/SSH)
try:
webbrowser.open(auth_url)
print(" (Browser opened automatically)")
except Exception:
pass
print()
print("After authorizing, you'll see a code. Paste it below.")
print()
try: