feat(auth): add 'auth token' command to securely output access token#635
Merged
Conversation
Add a new 'qovery auth token' subcommand that prints a valid access token for use by external tools (e.g. Qovery AI Skill) that need to make direct API calls. The token is automatically refreshed if expired. Supports three output modes: - Default: raw token value only (pipe-friendly for shell substitution) - --authorization-header: full 'Bearer <token>' header value - --json: structured JSON with token, type, expiration, and API URL
benjaminch
approved these changes
May 7, 2026
For security, 'qovery auth token' no longer prints the token by default. Running without --print or --json now shows help text with available flags. This prevents accidental token leakage during screen sharing or in recorded terminal sessions.
fabienfleureau
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
qovery auth tokensubcommand that outputs a valid, auto-refreshed access token for use by external tools (e.g. Qovery AI Skill) that need to make direct Qovery API calls~/.qovery/context.jsondirectly to extract the JWT token--authorization-headerfor the full header, and--jsonfor structured output including expiration and API URLMotivation
The Qovery AI Skill increasingly needs to interact with the Qovery API directly for operations not yet available in the CLI. Currently, it reads the JWT from
~/.qovery/context.json, which:This command provides a clean, programmatic interface that handles token refresh automatically.
Usage
Security
GetAccessToken()which calls the API)$()substitution~/.qovery/context.jsonpermissions remain0600Files Changed
cmd/auth_token.goNo existing code was modified. The existing
qovery authcommand continues to work unchanged.