Skip to content

Add 'wsh tab create' (and 'wsh workspace create') for scriptable tab/workspace setup #3285

@mackenzieclark

Description

@mackenzieclark

Summary

There's no way to create a tab from wsh. Spinning up many tabs at once (e.g. one tab per repo for a dev workflow) is therefore all manual UI clicks. Same gap exists for workspaces — wsh workspace only has list.

Current state

  • pkg/wcore/workspace.go:223 defines CreateTab(ctx, workspaceId, tabName, activateTab, isInitialLaunch) and pkg/service/workspaceservice/workspaceservice.go:149 exposes it as WorkspaceService.CreateTab. Both are reachable from the Electron service bridge — i.e. the FE can call it, but wsh cannot.
  • cmd/wsh/cmd/wshcmd-workspace.go currently only has a list subcommand. There's no wshcmd-tab.go at all.
  • wsh blocks list, wsh createblock, wsh deleteblock, etc. exist for blocks — tabs and workspaces are conspicuously missing the same surface.

Use case

I want to scaffold ~20 tabs at Wave first launch, one per repo I work in, each with a terminal block pre-configured with connection=wsl://<distro> and cmd:cwd=<repo path>. Lazy-spawn already works (terminal blocks don't run until their tab is rendered), and meta persists across restarts. The only missing piece is the initial creation — which today means 20 rounds of Cmd+T → rename → paste setmeta.

Request

Please add at minimum:

wsh tab create [--workspace <id>] [--name <name>] [--activate] [--meta key=value ...]
wsh tab list [--workspace <id>]
wsh tab delete <tabid>
wsh tab rename <tabid> <name>

wsh workspace create [--name <name>] [--icon <icon>] [--color <color>]
wsh workspace delete <workspaceid>
wsh workspace rename <workspaceid> <name>

tab create --meta would be especially useful — it'd let a single command create the tab and set the initial block's meta (e.g. connection + cwd) so it spawns directly in the right shell on the right path, no follow-up setmeta needed.

A nice-to-have follow-on would be a tab/workspace template preset in the config (presets/tab.json?) so users can define tab@repo:my-project once and wsh tab create --preset @repo:my-project to instantiate. But the bare CRUD commands above unblock the scripting use case.

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