重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/zenobi-us/dotfiles --skill zellijZellij CLI 命令快速参考,用于操作正在运行的会话。涵盖会话管理、标签页和窗格。
不适用场景:
| 任务 | 命令 |
|---|---|
| 创建/附加会话 | zellij attach --create <name> 或 zellij -s <name> |
| 列出会话 | zellij list-sessions |
| 终止会话 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
zellij kill-session <name>| 删除会话 | zellij delete-session <name> |
| 任务 | 命令 |
|---|---|
| 新建标签页 | zellij action new-tab |
| 新建带名称的标签页 | zellij action new-tab --name <name> |
| 新建指定工作目录的标签页 | zellij action new-tab --cwd <path> |
| 新建使用布局的标签页 | zellij action new-tab --layout <layout> |
| 关闭标签页 | zellij action close-tab |
| 重命名标签页 | zellij action rename-tab <name> |
| 按名称切换到标签页 | zellij action go-to-tab-name <name> |
| 按索引切换到标签页 | zellij action go-to-tab <index> |
| 任务 | 命令 |
|---|---|
| 新建窗格(自动) | zellij action new-pane |
| 向右分割 | zellij action new-pane --direction right |
| 向下分割 | zellij action new-pane --direction down |
| 浮动窗格 | zellij action new-pane --floating |
| 指定大小的浮动窗格 | zellij action new-pane --floating --width 80% --height 60% |
| 带命令的窗格 | zellij action new-pane -- <command> |
| 关闭窗格 | zellij action close-pane |
| 重命名窗格 | zellij action rename-pane <name> |
为特定任务新建标签页:
zellij action new-tab --name "backend" --cwd ~/api
分割窗格并运行命令:
zellij action new-pane --direction down -- npm run dev
确保工作目录的新窗格:
# 用于在特定目录下的交互式 shell
zellij action new-pane --cwd /path/to/dir
# 用于必须在特定目录下运行的命令
zellij action new-pane --cwd /path/to/dir -- sh -c 'cd /path/to/dir && your-command'
# 用于必须在特定工作树目录下启动的 nvim
zellij action new-pane --cwd /path/to/worktree -- sh -c 'cd /path/to/worktree && nvim'
浮动临时终端:
zellij action new-pane --floating --width 90% --height 90%
❌ 使用new-pane --horizontal 正确用法:--direction down(不是 --horizontal)
❌ 混淆切换与创建
toggle-floating-panes = 显示/隐藏现有的浮动窗格new-pane --floating = 创建新的浮动窗格❌ 忘记action 子命令 错误:zellij new-tab 正确:zellij action new-tab
❌ 窗格未在正确的目录下启动 问题:单独使用 --cwd 并不总能确保命令在该目录下运行
# ❌ 错误 - nvim 可能不会在正确的目录下启动
zellij action new-pane --cwd /path/to/worktree -- nvim
# ✅ 正确 - 先显式 cd
zellij action new-pane --cwd /path/to/worktree -- sh -c 'cd /path/to/worktree && nvim'
zellij action 命令在会话内部或外部均可工作-- 将窗格命令与 zellij 选项分隔开right, left, up, down80%)每周安装量
51
代码仓库
GitHub 星标数
44
首次出现
2026年1月24日
安全审计
已安装于
opencode49
codex48
gemini-cli47
github-copilot45
amp45
kimi-cli45
Quick reference for Zellij CLI commands to manipulate running sessions. Covers session management, tabs, and panes.
When NOT to use:
| Task | Command |
|---|---|
| Create/attach session | zellij attach --create <name> or zellij -s <name> |
| List sessions | zellij list-sessions |
| Kill session | zellij kill-session <name> |
| Delete session | zellij delete-session <name> |
| Task | Command |
|---|---|
| New tab | zellij action new-tab |
| New tab with name | zellij action new-tab --name <name> |
| New tab with cwd | zellij action new-tab --cwd <path> |
| New tab with layout | zellij action new-tab --layout <layout> |
| Close tab | zellij action close-tab |
| Rename tab | zellij action rename-tab <name> |
| Task | Command |
|---|---|
| New pane (auto) | zellij action new-pane |
| Split right | zellij action new-pane --direction right |
| Split down | zellij action new-pane --direction down |
| Floating pane | zellij action new-pane --floating |
| Floating with size | zellij action new-pane --floating --width 80% --height 60% |
| Pane with command | zellij action new-pane -- <command> |
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%
❌ Usingnew-pane --horizontal Correct: --direction down (not --horizontal)
❌ Confusing toggle with create
toggle-floating-panes = show/hide existing floating panesnew-pane --floating = create NEW floating pane❌ Forgettingaction 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'
zellij action commands work inside or outside a session-- to separate pane command from zellij optionsright, left, up, down80%)Weekly Installs
51
Repository
GitHub Stars
44
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode49
codex48
gemini-cli47
github-copilot45
amp45
kimi-cli45
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
125,600 周安装
| Go to tab by name | zellij action go-to-tab-name <name> |
| Go to tab by index | zellij action go-to-tab <index> |
| Close pane | zellij action close-pane |
| Rename pane | zellij action rename-pane <name> |