Skip to content

[Feature]: CLI Command to Focus/Switch Tabs #2738

@dlecan

Description

@dlecan

Feature description

Problem / Use Case

I'm using Claude Code (AI coding assistant) which sends notifications when tasks complete. I need to programmatically focus/switch to a specific Wave Terminal tab from these external notifications.

Current limitation, as far I know: wsh has no command to control tab navigation/focus from CLI, making it impossible to automatically bring the relevant tab to foreground when external events occur.

Real-world scenario:

  1. Claude Code is working in background on tab "Project-Dev"
  2. Task completes, notification fires
  3. Need to execute: wsh tab focus --name "Project-Dev" to automatically switch to that tab
  4. Currently: No way to do this - must manually click the tab

Proposed Solution

Add tab control commands to wsh:

# Focus tab by name/pattern
wsh tab focus --name "pattern"
wsh tab focus --title "pattern"

# Focus tab by ID
wsh tab focus --id <tab_id>

# List tabs (to get IDs/names)
wsh tab list

# Optional: Switch by index
wsh tab switch --index 3

Example Usage

# From notification script
wsh tab focus --name "dev-server"

# From external automation
wsh tab list | grep "production" | wsh tab focus --id $(...)

# Integration with other tools
tmux display-message "Build complete" && wsh tab focus --name "build-output"

Benefits

  • External tool integration: Notifications, CI/CD, monitoring tools can bring relevant tabs to focus
  • Automation: Scripted workflows can control Wave UI navigation
  • Developer productivity: Seamless integration with AI assistants (Claude Code, Cursor, etc.)
  • Consistency: Matches capabilities of Kitty (kitten @ focus-tab), WezTerm, and other modern terminals

Additional Context

  • Kitty terminal has similar: kitten @ focus-tab --match title:pattern

Implementation Suggestion

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions