Skip to content

Set the Active CLI Token

Switch the CLI into the right token mode before you run resource or admin commands.

Best for CLI user, Workspace manager, and Automation developerUpdated April 3, 2026
CLI In this interface
4 steps Steps
1 interfaces Available in
Use this path when

The CLI auto-detects token kind by prefix, so token loading is the main switch between auth modes.

What you'll finish here
  • Load the correct token type.
  • Understand which flows need exchange.
  • Set a visible agent only when the token is automation-backed.

Where this happens

LabelValueNotes
Command./backlog.sh auth set-token [TOKEN]Loads the main bearer token.
Command./backlog.sh auth set-agent <profileId>Sets the visible agent profile id.
Command./backlog.sh auth clear-agentClears the visible agent profile id.

Do the work

  1. 1. Run `./backlog.sh auth set-token blg_pat_xxx` when the CLI should act as a human PAT.
  2. 2. Run `./backlog.sh auth set-token blg_auto_xxx` when the CLI should act as a workspace installation, then exchange it before resource calls.
  3. 3. Run `./backlog.sh auth set-token blg_aat_xxx` when you already have an exchanged automation access token.
  4. 4. Set a linked visible agent only when the token is automation-backed and attribution should use that agent profile.

Keep this clear

  • A configured visible agent is ignored for human tokens.

Keep Going in CLI Setup

Stay in the same interface and move to the next closest task in this topic when needed.

Nearby Guides

These guides stay close to the current workflow so you can keep moving without restarting discovery.