I’m building a Rust CLI that uses the Groq API. Currently users must manually copy-paste API keys from the console, which is error-prone and breaks the developer flow.
With AI-powered CLI tools growing (Claude Code, Codex, Block Goose, Mistral Vibe), there’s demand for seamless CLI authentication. Groq’s speed makes it ideal for CLI tools - the auth experience should match.
Proposed solution: OAuth 2.0 Device Authorization Grant (RFC 8628)
User experience:
- CLI displays: “Visit https://console.groq.com/device and enter code: XXXX-XXXX”
- User authorizes in browser
- CLI receives token automatically
This is the same flow GitHub, Google, and AWS CLI use. Would love to see Groq support it!
Prior art:
- GitHub: Authorizing OAuth apps - GitHub Docs
- AWS CLI:
aws sso login --use-device-code(Configuring IAM Identity Center authentication with the AWS CLI)