TWG CLI

Global options

The following flags are available on most commands.

Core flags

Flag Short Description
--site <hostname> -s Atlassian site prefix (for example, example for example.atlassian.net). Auto-loaded from auth.conf or TWG_SITE env var
--output <format> -o Output format: text (default) or json
--user <email> -u Atlassian account email for Basic auth. Auto-loaded from auth.conf or TWG_USER env var
--scope <scope> Filter scope: me, user, team, or org
--since <period> Time window, for example 7d, 2w, or 1m
--first <n> Number of results to return
--after <cursor> Pagination cursor from a previous response
--account-id <aaid> Atlassian Account ID of the target user
--mode agent Agent mode — quieter output, hints and warnings stripped from JSON envelopes
--output-file <path> Write JSON output to a file instead of stdout; prints stdout=<path> to stdout
--yes -y Skip confirmation prompts for write operations
--version -v, -V Print the installed TWG CLI version and exit.
--help -h Display help for any command (useful for scripting and debugging)

Advanced flags

These flags are available for debugging and integration testing.

Flag Description
--api-version <version> API contract version for machine-readable responses (current: v2; reserved for future versions)
--timeout-ms <ms> Per-request HTTP timeout in milliseconds for GraphQL and REST calls. Also settable via TWG_TIMEOUT_MS

Use the site flag

The --site (-s) flag is optional when you've configured a default site via twg login or the TWG_SITE environment variable. Cross-product commands (work, goals, projects, focus-areas, org-tree) never require it.

twg jira workitem query --jql "project = PROJ"          # uses site from auth.conf
twg jira workitem query -s example --jql "..."           # explicit override
twg work query --scope me --since 7d                     # no site needed

When using multiple Atlassian sites, always pass -s explicitly so the correct site is targeted.

Filter by scope and time

--scope me                    # Your own items
--scope user --account-id X   # A specific user's items
--scope org                   # Reporting chain from a root user
--since 7d                    # Last 7 days
--since 2w                    # Last 2 weeks
--since 1m                    # Last month

Paginate results

--first 20          # Return 20 results
--after <cursor>    # Fetch the next page using the cursor from the previous response

Query languages

TWG CLI exposes product-native query languages as flags. These are not global but are surface-specific:

Flag Language Surface
--jql <query> JQL — Jira Query Language twg jira workitem query
--cql <query> CQL — Confluence Query Language twg confluence search query
--tql <query> TQL — Atlas Target Query Language twg goals, twg projects
--aql <query> AQL — Assets Query Language twg assets query
# JQL
twg jira workitem query --jql "project = PROJ AND status = 'In Progress'"

# CQL
twg confluence search query --cql "space = ENG AND type = page"

# TQL
twg goals --tql "owner = currentUser() AND status = 'AT_RISK'"

# AQL
twg assets query --aql "objectType = Server AND Status = Active"

Next steps