From zellij-control
Controls interactive CLI programs like TUI apps (htop, btop, lazygit, fzf), REPLs (python, bun), and pagers (less, bat) using Zellij terminal multiplexer. Use for keyboard-driven interactions, not non-interactive commands or editing.
npx claudepluginhub cuipengfei/prompts --plugin zellij-controlThis skill uses the workspace's default tool permissions.
```bash
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
# 获取会话名
zellij list-sessions
# 发送文本和按键(始终以 zellij 开头,便于批量授权)
zellij -s SESSION_NAME action write-chars 'command'
zellij -s SESSION_NAME action write-chars $'\n' # Enter
zellij -s SESSION_NAME action write-chars $'\x1b' # ESC
zellij -s SESSION_NAME action write-chars $'\x03' # Ctrl+C
zellij -s SESSION_NAME action write-chars $'\x04' # Ctrl+D
zellij -s SESSION_NAME action write-chars $'\t' # Tab
zellij -s SESSION_NAME action write-chars $'\x7f' # Backspace
# 方向键
zellij -s SESSION_NAME action write-chars $'\x1b[A' # 上
zellij -s SESSION_NAME action write-chars $'\x1b[B' # 下
zellij -s SESSION_NAME action write-chars $'\x1b[C' # 右
zellij -s SESSION_NAME action write-chars $'\x1b[D' # 左
# 读取屏幕(用 /dev/shm 内存文件系统,不写磁盘)
zellij -s SESSION_NAME action dump-screen /dev/shm/zj.txt && cat /dev/shm/zj.txt
zellij -s SESSION_NAME action dump-screen --full /dev/shm/zj.txt # 含回滚历史
zellij -s SESSION_NAME action new-pane # 新窗格
zellij -s SESSION_NAME action new-pane -d right # 向右
zellij -s SESSION_NAME action new-pane -d down # 向下
zellij -s SESSION_NAME action close-pane # 关闭当前窗格
zellij -s SESSION_NAME action focus-next-pane # 下一窗格
zellij -s SESSION_NAME action move-focus right # 向右移动焦点
| 工具 | 退出键 |
|---|---|
| htop, btop, lazygit, less, bat | q |
| fzf | ESC 或 Enter |
| Python REPL | Ctrl+D ($'\x04') |
| Bun REPL | .exit + Enter |
# 1. 获取会话
zellij list-sessions
# 2. 运行交互式程序
zellij -s SESSION_NAME action write-chars 'htop'
zellij -s SESSION_NAME action write-chars $'\n'
sleep 2
# 3. 读取输出
zellij -s SESSION_NAME action dump-screen /dev/shm/zj.txt && cat /dev/shm/zj.txt
# 4. 退出程序
zellij -s SESSION_NAME action write-chars 'q'
$'\n')sleep 1-3)/dev/shm/zj.txt 避免写磁盘zellij --help、zellij action --help、zellij action <cmd> --helpzellij 开头,不要用注释或变量赋值开头,否则需要逐一授权