Skip to content

feat: add dev shell tab to Zellij sessions#10

Open
piotrostr wants to merge 4 commits intomainfrom
just-setup-dev-and-teardown
Open

feat: add dev shell tab to Zellij sessions#10
piotrostr wants to merge 4 commits intomainfrom
just-setup-dev-and-teardown

Conversation

@piotrostr
Copy link
Owner

Summary

  • When launching a Claude session in a worktree, automatically creates a second Zellij tab with a dev shell
  • If a justfile with a setup recipe exists, runs just setup in that tab before dropping into a shell
  • Uses Zellij KDL layout files to define both tabs (claude and dev) at session creation time
  • The claude tab remains focused by default

Changes

  • Added create_dev_script() function that generates a script to run just setup if available
  • Added create_session_layout() function that generates Zellij KDL layout files with two tabs
  • Modified create_launcher_script() to use --layout flag instead of SHELL= approach

Test plan

  • Launch a session on a worktree that has a justfile with setup recipe
  • Verify two tabs exist in Zellij: "claude" (focused) and "dev"
  • Verify just setup ran in dev tab
  • Launch on worktree without justfile - dev tab should just be a shell
  • Test EXITED session resurrection - should recreate both tabs
  • Test plan mode vs non-plan mode - both should have dev tab

piotrostr and others added 4 commits January 26, 2026 15:59
When launching a Claude session, automatically create a second Zellij tab
with a dev shell. If a justfile with a 'setup' recipe exists, runs
'just setup' in that tab before dropping into a shell.

Uses Zellij KDL layout files to define both tabs (claude and dev) at
session creation time. The claude tab remains focused by default.

Co-Authored-By: piotrek & opus <noreply@anthropic.com>
Add --default-shell /bin/zsh to Zellij launch commands so that
manually-created panes (via C-space c) open with a regular shell
instead of inheriting from the layout's command panes.

Co-Authored-By: piotrek & opus <noreply@anthropic.com>
The --default-shell CLI flag is not available in older Zellij versions.
Setting SHELL=/bin/zsh before exec achieves the same result - new panes
created via keyboard shortcuts will use zsh instead of inheriting from
layout command panes.

Co-Authored-By: piotrek & opus <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant