Skip to content

Feature Request: Add commands to query the state and metadata of tabs #19818

@adityacodepublic

Description

@adityacodepublic

Description of the new feature

Currently, there's no way to programmatically query information about open terminal tabs, their profiles, and current working directories. This limits automation scenarios and makes it difficult to build tools that need to understand the terminal state.

Current Limitations

  • No command-line arguments to list current tabs (e.g., --list-tabs, --query-state, --active-tab)
  • No way to get current working directory for each tab
  • No way to identify which profile is active in each tab

Use Cases

  • terminal management tools
  • automation scripts (scripts that need to interact with specific terminal tabs),
  • monitoring tools,
  • integration: coordinating tasks or interactions across multiple tabs/profiles etc.

This feature would bring Windows Terminal in line with other modern terminal emulators that provide automation interfaces (i.eTerm2, alacritty, etc.), enhancing the ecosystem.

Proposed technical implementation details

Add a new API interface for querying terminal state with the following capabilities:
wt --list-tabs
wt --query-tabs --detailed
wt --query-tabs --window-id --detailed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Commandlinewt.exe's commandline argumentsIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Product-TerminalThe new Windows Terminal.

    Projects

    Status

    Spec Needed ❓

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions