TWG CLI

Authentication

TWG CLI stores credentials in ~/.config/twg/auth.conf and reuses them across sessions. Use this page to manage tokens, re-authenticate, or configure credentials for CI/CD.

Re-authenticate

To update your credentials at any time:

twg login

To force a full re-entry of all credentials:

twg login --force

Create a TWG API token

TWG CLI uses a single API token for TWG commands across Jira, Confluence, Rovo Search, and more. The token page is selected by the binary's default token mode: classic-token binaries open the standard Atlassian API-token page, while scoped-token binaries open the TWG-scoped token page.

Bitbucket-specific commands require a separate Bitbucket token. twg login prompts for this optional token and preserves an existing Bitbucket token unless you run twg login --force.

twg login opens your browser automatically to the token creation page. If you need to create a TWG-scoped token manually:

  1. Go to https://id.atlassian.com/manage-profile/security/api-tokens.
  2. Click Create API token with scopes and accept the pre-filled settings.
  3. Copy the token value and paste it when twg login prompts you.

Use environment variables

For CI/CD and scripted use, set the following variables instead of running twg login:

Variable Purpose
TWG_USER Atlassian account email
TWG_SITE Default site prefix
TWG_TOKEN API token generated by the login token page
TWG_BBC_TOKEN Bitbucket token for Bitbucket-specific commands

Next steps