Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

attach / detach

gwt attach

Attach to a Zellij session. Creates the session if it doesn’t exist, then reconnects.

gwt attach [<branch>] [--all] [--session <name>]

Options

OptionDescriptionDefault
<branch>Create tab for this branch (error if branch/worktree doesn’t exist)
--allCreate missing tabs for all worktreesfalse
--session, -sSession namegwt (or session.name from config)

Behavior

  • gwt attach — reconnects to the session; no tab changes
  • gwt attach <branch> — reconnects and creates a tab for the given branch if missing; errors if the branch or worktree doesn’t exist
  • gwt attach --all — reconnects and creates missing tabs for all worktrees

Also available as

gwt session attach [<branch>] [--all] [--session <name>]

gwt detach

Remove workspace tabs from a session.

gwt detach [<branch>] [--all] [--session <name>]

Options

OptionDescriptionDefault
<branch>Close the tab for this branch
--allClose all workspace tabs for this repofalse
--session, -sSession namegwt (or session.name from config)

Behavior

  • gwt detach — closes the current workspace tab (detected via CWD)
  • gwt detach <branch> — closes the tab for the specified branch
  • gwt detach --all — closes all workspace tabs for this repo
  • The session is automatically killed when no tabs remain

Also available as

gwt session detach [<branch>] [--all] [--session <name>]