You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: codexbar config login --provider for Copilot, Grok and Kiro (CLI parity with macOS 0.80.0) #987
I searched existing issues and did not find a duplicate.
Problem or use case
We build VibeTV, a small desk display that shows AI usage limits (background in #640). Our companion app runs the console CLI (codexbar.exe) headlessly, so it can only do what the CLI can do.
When a provider is enabled but signed out, we want to offer one "Sign in to " button that starts the provider's normal sign-in. For three providers that sign-in already exists in Win-CodexBar, but only inside the desktop app:
Copilot:CopilotDeviceFlow (rust/src/providers/copilot/device_flow.rs), started from apps/desktop-tauri/src-tauri/src/commands/system.rs.
Grok: the account login in rust/src/providers/grok/accounts/login.rs (grok login --oauth --leader-socket).
Kiro:login::run_kiro_login (rust/src/login.rs).
An embedding app cannot reach any of them. The fallbacks are worse: gh auth login for Copilot needs GitHub CLI and an interactive terminal, and calling grok login directly skips your account and home handling.
Proposed solution
A CLI command that runs the existing flow, with the same name and shape as the macOS CLI. CodexBar 0.80.0 ships codexbar config login --provider copilot (steipete#4717, docs/cli-configuration.md):
Copilot: print the verification URL and user code (with --json: newline-delimited events, never the access token or the polling device code), poll until approval, denial, expiry or Ctrl-C, then save the account and enable the provider, as the macOS command does.
Grok and Kiro: run the existing login (browser opens as today), report the outcome, and save it where the desktop app saves it. If the Grok CLI is missing, return a typed "missing binary" result instead of free text, so a caller can point to the Grok Build download.
Exit code 0 only after the credential is saved; non-zero for denied, expired, cancelled, missing binary.
Each provider could be a separate small PR. Copilot first, since macOS already defines the contract. We are glad to send them if you agree with the direction, and we would follow your preferred shape if it differs.
Affected area
CLI
Provider-specific behavior
Config file / settings persistence
Alternatives considered
A sign-in implementation in our own app. We would rather not duplicate provider auth that already lives in Win-CodexBar.
gh auth login for Copilot. It requires GitHub CLI and a visible terminal, which a packaged app cannot rely on.
Copilot.codexbar config login --provider copilot [--json] is already ported from steipete#4717. It's in review and should land in the next release. It uses the macOS command name and the JSON field names (verificationURI, userCode, expiresIn). It never prints the access token or the polling device code. It follows GitHub's slow_down backoff, and it saves the account the same way the desktop sign-in does. Before it merges, we'll also make it enable the provider after a successful login, as macOS does, and document distinct exit codes for denied, expired and cancelled.
Grok and Kiro. These are Windows-only for now (macOS 0.80.0 has only Copilot). We'll add them under the same command, reusing the existing desktop flows so account and home handling stay the same. Exit 0 only after the credential is saved, a typed "missing binary" result for Grok, and the same --json event names as Copilot.
No PR needed from your side. We'll link the PRs here when they're up. If your companion app relies on specific exit code values, tell us here before we fix them.
This shipped: Copilot in #1001, and Grok and Kiro in #1013. codexbar config login --provider <copilot|grok|kiro> [--json] now works from the console CLI. It uses the macOS 0.80.0 command name and JSON field names.
Copilot: runs the GitHub device flow. It prints verificationURI, userCode and expiresIn, and never prints the access token or the polling device code. It follows slow_down backoff, saves the account the same way the desktop sign-in does, and enables the provider when sign-in succeeds.
Grok: runs the existing account login with CodexBar's account and home handling, and enables the provider when sign-in succeeds.
Kiro: runs the existing Kiro login and enables the provider when sign-in succeeds. A follow-up (Keep Kiro login tests from opening a browser #1056) makes it open the sign-in link without blocking the CLI.
It will be in the next release. Closing as completed. If anything doesn't fit VibeTV's headless flow, please reopen and tell us.
Activity
Finesssee commentedon Oct 23, 2026
Thanks, this is a good fit, and we're taking it.
Copilot.
codexbar config login --provider copilot [--json]is already ported from steipete#4717. It's in review and should land in the next release. It uses the macOS command name and the JSON field names (verificationURI,userCode,expiresIn). It never prints the access token or the polling device code. It follows GitHub'sslow_downbackoff, and it saves the account the same way the desktop sign-in does. Before it merges, we'll also make it enable the provider after a successful login, as macOS does, and document distinct exit codes for denied, expired and cancelled.Grok and Kiro. These are Windows-only for now (macOS 0.80.0 has only Copilot). We'll add them under the same command, reusing the existing desktop flows so account and home handling stay the same. Exit 0 only after the credential is saved, a typed "missing binary" result for Grok, and the same
--jsonevent names as Copilot.No PR needed from your side. We'll link the PRs here when they're up. If your companion app relies on specific exit code values, tell us here before we fix them.
Finesssee commentedon Nov 2, 2026
This shipped: Copilot in #1001, and Grok and Kiro in #1013.
codexbar config login --provider <copilot|grok|kiro> [--json]now works from the console CLI. It uses the macOS 0.80.0 command name and JSON field names.verificationURI,userCodeandexpiresIn, and never prints the access token or the polling device code. It followsslow_downbackoff, saves the account the same way the desktop sign-in does, and enables the provider when sign-in succeeds.It will be in the next release. Closing as completed. If anything doesn't fit VibeTV's headless flow, please reopen and tell us.