Set the Active CLI Token
Switch the CLI into the right token mode before you run resource or admin commands.
The CLI auto-detects token kind by prefix, so token loading is the main switch between auth modes.
- Load the correct token type.
- Understand which flows need exchange.
- Set a visible agent only when the token is automation-backed.
Where this happens
Do the work
- 1. Run `./backlog.sh auth set-token blg_pat_xxx` when the CLI should act as a human PAT.
- 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. Run `./backlog.sh auth set-token blg_aat_xxx` when you already have an exchanged automation access token.
- 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.
Download the CLI
Download the standalone Backlog CLI script from `https://backlog.to/backlog.sh` and make it executable locally.
Check CLI Status
Inspect the active CLI profile, token source, and workspace defaults before you run commands.
Configure a CLI Profile
Persist the base URL or workspace id for a CLI profile so repetitive commands stop depending on long flag strings.
Nearby Guides
These guides stay close to the current workflow so you can keep moving without restarting discovery.
Exchange an Automation Secret
Exchange an automation secret for an access token.
Create a Personal Access Token
Create a human-owned API key with the narrowest useful scope set and store it safely because the raw token is only shown once.