rpk ai auth login
Run the OAuth 2.0 device authorization grant against Redpanda Cloud’s cloud-api, persist the resulting credentials to the rpai credentials file (0600), and — for new profiles — prompt to pick an ADP environment whose AI Gateway URL becomes the profile’s dataplane_url.
If the active profile’s stored credentials are still valid, login is a no-op and prints "Already logged in …". Log out first (or delete the credential entry) to force a re-auth.
Flags
| Value | Type | Description |
|---|---|---|
|
- |
help for login. |
|
- |
do not attempt to open the browser; print the URL only. |
|
string |
output format: table|wide|json|yaml|markdown (env: RPAI_FORMAT) (default "table"). |
|
- |
disable colored output (env: NO_COLOR). |
|
string |
path to rpai config (env: RPAI_CONFIG) (default "/var/lib/redpanda/.rpai/config"). |
|
string |
override the selected environment’s AI Gateway URL for this invocation. |
|
string |
rpai profile name (env: RPAI_PROFILE). |
|
- |
verbose debug logging to stderr (env: RPAI_VERBOSE). |
|
string |
static bearer token override (ambient RPAI_TOKEN is ignored under rpk ai). |