Personal Access Tokens#
Personal Access Tokens (PATs) let you authenticate the CLI without an interactive browser flow.
What PATs are for#
Use a PAT when you want to:
- publish from CI
- install from private namespaces in headless environments
- authenticate local scripts without running
agentpm login
Current publish scope#
The preferred publish scope is:
packages:publish
That scope can publish both:
- tool packages
- agent packages
Existing PATs with:
tools:publish
are still temporarily accepted for tool packages only.
Using a PAT with the CLI#
Per command#
agentpm publish --token "$AGENTPM_TOKEN"Environment variable#
export AGENTPM_TOKEN="..."
agentpm publishPersist locally with login#
agentpm login --pasteScope examples#
Current example:
packages:publish
If you use device flow and want to request scopes explicitly:
agentpm login --scope packages:publishBest practices#
- use
packages:publishfor all new publish tokens - prefer env vars or command flags in CI
- prefer
agentpm loginfor local development - rotate or revoke PATs if they are ever exposed