Remote-control zellij sessions for interactive CLIs by sending keystrokes and scraping pane output.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install zellij或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install zellij⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/zellij/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: zellij description: Remote-control zellij sessions for interactive CLIs by sending keystrokes and scraping pane output. homepage: https://zellij.dev metadata: {"moltbot":{"emoji":"🪟","os":["darwin","linux"],"requires":{"bins":["zellij","jq"]},"install":[{"id":"brew","kind":"brew","formula":"zellij","bins":["zellij"],"label":"Install Zellij (brew)"},{"id":"cargo","kind":"cargo","crate":"zellij","bins":["zellij"],"label":"Install Zellij (Cargo)"}]}} ---
Use zellij only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks.
DATA_DIR="${CLAWDBOT_ZELLIJ_DATA_DIR:-${TMPDIR:-/tmp}/moltbot-zellij-data}"
mkdir -p "$DATA_DIR"
SESSION=moltbot-python
zellij --data-dir "$DATA_DIR" new-session --session "$SESSION" --layout "default" --detach
zellij --data-dir "$DATA_DIR" run --session "$SESSION" --name repl -- python3 -q
zellij --data-dir "$DATA_DIR" pipe --session "$SESSION" --pane-id 0
After starting a session, always print monitor commands:
To monitor:
zellij --data-dir "$DATA_DIR" attach --session "$SESSION"
zellij --data-dir "$DATA_DIR" pipe --session "$SESSION" --pane-id 0
CLAWDBOT_ZELLIJ_DATA_DIR (default ${TMPDIR:-/tmp}/moltbot-zellij-data).pane-id (numeric) to target specific panes.zellij --data-dir "$DATA_DIR" list-sessions --long or use list-panes.sh.zellij --data-dir "$DATA_DIR" list-sessions.{baseDir}/scripts/find-sessions.sh --all (uses CLAWDBOT_ZELLIJ_DATA_DIR).zellij action to send keystrokes: zellij --data-dir "$DATA_DIR" action --session "$SESSION" write-chars --chars "$cmd".zellij --data-dir "$DATA_DIR" action --session "$SESSION" write 2 (Ctrl+C).zellij --data-dir "$DATA_DIR" pipe --session "$SESSION" --pane-id 0.{baseDir}/scripts/wait-for-text.sh -s "$SESSION" -p 0 -p 'pattern'.Ctrl+p d (zellij default detach).python3 -q.PYTHON_BASIC_REPL=1.darwin/linux and requires zellij on PATH.zellij excels at running multiple coding agents in parallel:
DATA_DIR="${TMPDIR:-/tmp}/codex-army-data"
# Create multiple sessions
for i in 1 2 3 4 5; do
zellij --data-dir "$DATA_DIR" new-session --session "agent-$i" --layout "compact" --detach
done
# Launch agents in different workdirs
zellij --data-dir "$DATA_DIR" action --session "agent-1" write-chars --chars "cd /tmp/project1 && codex --yolo 'Fix bug X'\n"
zellij --data-dir "$DATA_DIR" action --session "agent-2" write-chars --chars "cd /tmp/project2 && codex --yolo 'Fix bug Y'\n"
# Poll for completion (check if prompt returned)
for sess in agent-1 agent-2; do
pane_id=$(zellij --data-dir "$DATA_DIR" list-sessions --long | grep "\"$sess\"" | jq -r '.tabs[0].panes[0].id')
if zellij --data-dir "$DATA_DIR" pipe --session "$sess" --pane-id "$pane_id" | grep -q "❯"; then
echo "$sess: DONE"
else
echo "$sess: Running..."
fi
done
# Get full output from completed session
zellij --data-dir "$DATA_DIR" pipe --session "agent-1" --pane-id 0
Tips:
pnpm install first before running codex in fresh clones❯ or $) to detect completion--yolo or --full-auto for non-interactive fixeszellij --data-dir "$DATA_DIR" delete-session --session "$SESSION".{baseDir}/scripts/cleanup-sessions.sh "$DATA_DIR".| Task | tmux | zellij | |------|------|--------| | List sessions | list-sessions | list-sessions | | Create session | new-session -d | new-session --detach | | Attach | attach -t | attach --session | | Send keys | send-keys | action write-chars | | Capture pane | capture-pane | pipe | | Kill session | kill-session | delete-session | | Detach | Ctrl+b d | Ctrl+p d |
{baseDir}/scripts/wait-for-text.sh polls a pane for a regex (or fixed string) with a timeout.
{baseDir}/scripts/wait-for-text.sh -s session -p pane-id -r 'pattern' [-F] [-T 20] [-i 0.5]
-s/--session session name (required)-p/--pane-id pane ID (required)-r/--pattern regex to match (required); add -F for fixed string-T timeout seconds (integer, default 15)-i poll interval seconds (default 0.5){baseDir}/scripts/find-panes.sh lists panes for a given session.
{baseDir}/scripts/find-panes.sh -s session [-d data-dir]
-s/--session session name (required)-d/--data-dir zellij data dir (uses CLAWDBOT_ZELLIJ_DATA_DIR if not specified)安装 Zellij Terminal Workspace 后,可以对 AI 说这些话来触发它
Help me get started with Zellij Terminal Workspace
Explains what Zellij Terminal Workspace does, walks through the setup, and runs a quick demo based on your current project
Use Zellij Terminal Workspace to remote-control zellij sessions for interactive CLIs by sending keys...
Invokes Zellij Terminal Workspace with the right parameters and returns the result directly in the conversation
What can I do with Zellij Terminal Workspace in my data & analytics workflow?
Lists the top use cases for Zellij Terminal Workspace, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/zellij/ 目录(个人级,所有项目可用),或 .claude/skills/zellij/(项目级)。重启 AI 客户端后,用 /zellij 主动调用,或让 AI 根据上下文自动发现并使用。
Zellij Terminal Workspace 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Zellij Terminal Workspace 可免费安装使用。请查阅仓库了解许可证信息。
Remote-control zellij sessions for interactive CLIs by sending keystrokes and scraping pane output.
Zellij Terminal Workspace 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my data & analytics tasks using Zellij Terminal Workspace
Identifies repetitive steps in your workflow and sets up Zellij Terminal Workspace to handle them automatically