Pat Management
Manage Personal Access Tokens (PAT) securely stored in your operating system's keychain.
Usage
gpx pat <subcommand> <profile_name>
Subcommands
| Subcommand | Description |
|---|---|
set | Interactively set or rotate a PAT for a profile |
clear | Securely remove a stored PAT from your operating system keychain |
Options
| Option | Description |
|---|---|
--pat <token> | Pass the token directly to bypass interactive prompts |
Examples
Set a PAT interactively
You can set a PAT token interactively. gpx will prompt you to securely enter your Personal Access Token.
gpx pat set freelance
Set a PAT non-interactively
gpx pat set freelance --pat "github_pat_11ABC..."
Clear a stored PAT
To securely remove a stored PAT from your operating system credential manager (or local secure file on Windows):
gpx pat clear freelance
What happens behind the scenes
When you set a PAT, gpx validates it against the GitHub API. If valid, it stores it securely using:
- macOS: Keychain Access (
securityCLI) - Linux: Secret Service API / GNOME Keyring (
secret-tool) - Windows: Secure per-profile JSON file (
~/.gpx/credentials/)
When you clear a PAT, gpx asks the respective OS credential manager (or deletes the file on Windows) to delete the secret permanently.
Related commands
gpx add- Create a new profile (including PAT profiles).gpx doctor- Diagnose if your PAT authentication is working properly.