Skip to content

[Feature]: wsh CLI command to rename tabs #3196

@ElazarPimentel

Description

@ElazarPimentel

Feature description

Problem / Use Case

There is no wsh CLI command to rename a tab programmatically. The UpdateTabNameCommand RPC exists server-side (wshserver.go) but is not exposed through wsh.

wsh setmeta -b tab name="foo" sets metadata on the tab object but does not update the displayed tab title, since the tab name is a first-class struct field (tab.Name) updated via wstore.UpdateTabName(), not metadata.

The only way to rename a tab currently is via the right-click context menu.

Proposed Solution

# Rename current tab
wsh tab rename "my-project"

# Rename by tab ID
wsh tab rename --id <tab_id> "my-project"

Benefits

  • Automation: Scripts can label tabs based on what's running (e.g. project name, environment)
  • External tool integration: AI assistants, tmux-like workflows, notification scripts can set meaningful tab names
  • Consistency: Related to [Feature]: CLI Command to Focus/Switch Tabs #2738 (CLI tab focus/switch/list) - tab management should be fully scriptable
  • Parity: The RPC already exists internally, just needs CLI exposure

Additional Context

  • WAVETERM_TABID env var is already available in each terminal block
  • UpdateTabNameCommand in pkg/wshrpc/wshserver/wshserver.go handles the rename logic
  • wstore.UpdateTabName in pkg/wstore/wstore.go persists the change

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions