Set up TWG CLI

This experience is currently in beta.

Set up Teamwork Graph (TWG) CLI in three steps: install, authenticate, and add agent skills. By the end, your AI coding agent will have full access to your Atlassian data — Jira issues, Confluence pages, Bitbucket repos, and more — so you can query and manage your work in plain English, no command syntax required.

Before you begin

  • You need macOS (arm64 or x64), Linux (x64), or Windows (arm64 or x64).

  • You need an Atlassian account with access to the products you want to use.

  • You need an AI coding agent installed on your computer. For a list of supported agents, see What is TWG CLI?

Step 1: Install an AI coding agent

TWG CLI works with any AI coding agent. If you do not have one installed, follow the setup instructions from your chosen agent's documentation before continuing.

Step 2: Install TWG CLI

macOS and Linux

Run the install script:

curl -fsSL https://teamwork-graph.atlassian.com/cli/install | bash

The installer detects your platform, verifies the download checksum, installs the binary in ~/.local/bin, asks for first-time consent, installs TWG agent skills, refreshes command help, and starts authentication.

When consent is required, answer yes, continue, or no. Then:

  • The installer opens the token page. Generate a token in the browser, copy it, then press Enter — the installer reads it from the OS clipboard. If clipboard access is unavailable, it falls back to a masked paste prompt.

  • If a Bitbucket token is not already configured, setup offers the same clipboard-confirmed flow for the optional Bitbucket token.

  • If the binary is using classic API-token mode, the installer also asks for your Atlassian account email, as classic tokens cannot identify the account on their own.

  • If you use a clipboard history manager, clear it after setup.

If you are running in an agent session, follow the hosted instructions at https://teamwork-graph.atlassian.com/cli/AGENTS.md for consent and token handoff instead.

The installer completes setup automatically. To repair setup later:

twg setup

To install a specific version:

curl -fsSL https://teamwork-graph.atlassian.com/cli/install | bash -s -- --version 0.9.1

If ~/.local/bin is not in your PATH, the installer prints the exact line to add to your shell profile.

Homebrew (macOS)

brew tap atlassian/twg brew install twg twg setup

Windows

Windows: SmartScreen may warn about the installer — choose More info → Run anyway. Pre-release builds may not yet use a production code signature; that is expected until generally available signed binaries ship.

Install — PowerShell

irm https://teamwork-graph.atlassian.com/cli/install.ps1 | iex

Install — Command Prompt (cmd)

curl is built into Windows 10 1803 and later. If you're on an older version, use the PowerShell method above instead.

powershell -ExecutionPolicy Bypass -Command "irm https://teamwork-graph.atlassian.com/cli/install.ps1 | iex"

The Windows installer performs the same setup as macOS and Linux: binary install, checksum verification, skill install, help refresh, and token login.

Install using your coding agent

You can ask your coding agent to install TWG CLI for you. Copy the following prompt and paste it into your agent:

Install and set up TWG CLI for me using the official agent instructions at https://teamwork-graph.atlassian.com/cli/AGENTS.md

Your agent downloads the installer, verifies the checksum, installs the binary, and completes authentication and skill setup automatically. Skip to Verify setup.

Step 3: Authenticate

Run the following command and follow the prompts:

twg login

You'll be asked for:

Prompt

What to enter

Email

Your Atlassian account email. Required for classic API tokens; scoped-token login may infer it.

Token

The token from the page that twg login opens automatically.

Bitbucket token

Optional. Required only for Bitbucket-specific commands.

Site

Your Atlassian site name (for example, example for example.atlassian.net). May be auto-selected.

Credentials are saved to ~/.twg/auth.conf and reused each time. To update them at any time, run twg login --force.

Create an API token manually

twg login opens your browser automatically to the token creation page. If you need to create a 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.

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

Use environment variables (CI/CD)

For CI/CD pipelines 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

Never pass tokens as CLI flags. TWG CLI only accepts credentials interactively or via environment variables.

Verify setup

Run:

twg doctor

This checks authentication, connectivity, and build info. It works the same on macOS, Linux, PowerShell, and cmd.

Try it

Your AI coding agent can now access your Atlassian data across Jira, Confluence, Bitbucket, and more. Describe what you want in plain language and your agent handles the rest:

  • "Summarize the work I did this week"

  • "What are my open Jira issues?"

  • "Create a Confluence page about our Q2 goals"

  • "Show the current sprint for my team"

See Agent examples for more prompts to try.

Quick start video

Introduction to Teamwork Graph CLI — walks through installation, authentication, and using the agent skill to query work across Atlassian products.

Update

macOS/Linux — use the built-in updater:

twg update

macOS (Homebrew):

brew update && brew upgrade twg

Windows (PowerShell or cmd) — re-run the install command from the Windows section above.

twg update and the installers refresh installed skill files automatically when they can detect existing TWG skill installs.

Feedback

To share feedback or report an issue, use the CLI:

twg feedback --summary "short title"

Or submit feedback using the TWG CLI feedback form.

Outcome

You've successfully installed and configured TWG CLI. Your AI coding agent now has connected access to your Atlassian data across Jira, Confluence, Bitbucket, and more. Describe what you want to your agent in plain English and it handles the rest.

 

Still need help?

The Atlassian Community is here for you.