mcpField
Z
zellij

zellij

github.com/zenobi-usDevelopment6854 installsUpdated today
Repository

About zellij

A CLI reference skill for operating running Zellij sessions. It focuses on commands for sessions, tabs, and panes, rather than keybindings or configuration.

Key features

  1. 01Create, attach, list, and remove sessions
  2. 02Create and manage tabs
  3. 03Create and arrange panes
  4. 04Launch commands in panes
  5. 05Set pane and tab working directories
  6. 06Create sized floating panes

Use cases

  1. 01Create or attach to a Zellij session
  2. 02Open a named tab for a task
  3. 03Split a pane and run a command
  4. 04Launch a floating scratch terminal

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/zenobi-us/dotfiles --skill zellij

After installing, type/zellijin Claude Code to confirm it loaded.

Bundled filesREADME.md

Details

From the project README

Zellij Reference

Overview

Quick reference for Zellij CLI commands to manipulate running sessions. Covers session management, tabs, and panes.

When to Use

  • Creating or attaching to Zellij sessions
  • Managing tabs and panes programmatically
  • Need CLI commands (not keybindings)
  • Automating Zellij operations

When NOT to use:

  • Looking for keybindings (this is CLI only)
  • Layout file syntax
  • Configuration options

Quick Reference

Sessions
TaskCommand
Create/attach sessionzellij attach --create <name> or zellij -s <name>
List sessionszellij list-sessions
Kill sessionzellij kill-session <name>
Delete sessionzellij delete-session <name>
Tabs
TaskCommand
New tabzellij action new-tab
New tab with namezellij action new-tab --name <name>
New tab with cwdzellij action new-tab --cwd <path>
New tab with layoutzellij action new-tab --layout <layout>
Close tabzellij action close-tab
Rename tabzellij action rename-tab <name>
Go to tab by namezellij action go-to-tab-name <name>
Go to tab by indexzellij action go-to-tab <index>
Panes
TaskCommand
New pane (auto)zellij action new-pane
Split rightzellij action new-pane --direction right
Split downzellij action new-pane --direction down
Floating panezellij action new-pane --floating
Floating with sizezellij action new-pane --floating --width 80% --height 60%
Pane with commandzellij action new-pane -- <command>
Close panezellij action close-pane
Rename panezellij action rename-pane <name>
Common Patterns

New tab for specific task:

zellij action new-tab --name "backend" --cwd ~/api

Split pane and run command:

zellij action new-pane --direction down -- npm run dev

New pane with guaranteed working directory:

# For interactive shell with specific directory
zellij action new-pane --cwd /path/to/dir

# For command that must run in specific directory
zellij action new-pane --cwd /path/to/dir -- sh -c 'cd /path/to/dir && your-command'

# For nvim that must start in specific directory
zellij action new-pane --cwd /path/to/worktree -- sh -c 'cd /path/to/worktree && nvim'

Floating scratch terminal:

zellij action new-pane --floating --width 90% --height 90%

Common Mistakes

❌ Using new-pane --horizontal Correct: --direction down (not --horizontal)

❌ Confusing toggle with create

  • toggle-floating-panes = show/hide existing floating panes
  • new-pane --floating = create NEW floating pane

❌ Forgetting action subcommand Wrong: zellij new-tab Right: zellij action new-tab

❌ Pane not starting in correct directory Problem: Using --cwd alone doesn't always ensure the command runs in that directory

# ❌ Wrong - nvim might not start in the right directory
zellij action new-pane --cwd /path/to/worktree -- nvim

# ✅ Correct - explicitly cd first
zellij action new-pane --cwd /path/to/worktree -- sh -c 'cd /path/to/worktree && nvim'

Notes

  • All zellij action commands work inside or outside a session
  • Use -- to separate pane command from zellij options
  • Direction options: right, left, up, down
  • Size units: bare integers or percentages (e.g., 80%)

Comments

Markdown supported