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
wt --list-profiles
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
--list-tabs,--query-state,--active-tab)Use Cases
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
wt --list-profiles