Zellij
$ zellij 社区开源 中风险Zellij 是基于 Rust 构建的现代终端工作区与复用器,具备直观的键位提示、KDL 声明式布局、浮动窗格及 WebAssembly 插件。其 CLI 支持无交互列出会话(list-sessions)、导出 KDL 布局(action dump-layout)以及通过 --session 对指定会话执行自动化动作。
brew install zellij 会话状态查询与 zellij action 自动化指令直接与本地套接字交互,无需 MCP 中转。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
支持 list-sessions --no-formatting、attach --create-background 与 zellij action ... 自动化控制,但仅输出纯文本/KDL 而无 --json。
- Supports
--create-backgrounddetached sessions andactionsubcommands - Lacks
--jsonoutput onlist-sessionsandactionqueries
查询指令只读安全,但 action write-chars、close-pane 与 kill-session 会直接操作活跃工作区。
- Requires explicit
--sessiontargeting to avoid hitting unintended sessions
单 Rust 二进制,支持 macOS、Linux 与 Windows,可通过 Homebrew、cargo install --locked zellij 与 GitHub Releases 安装。
- Cross-platform binary with zero runtime dependencies
声明式 KDL 布局加上 dump-screen/dump-layout 动作便于快速复现多窗格开发环境。
- KDL layouts and WebAssembly plugin extensibility
非常活跃的 MIT 开源 Rust 项目(zellij-org/zellij),版本迭代迅速。
- Strong upstream velocity and active community
zellij.dev/documentation/ 详尽文档覆盖了 CLI actions、KDL 布局与插件接口。
- Dedicated CLI action reference on zellij.dev
安全边界、鉴权与放权指南
无需凭据;使用本地会话套接字,配置位于 ~/.config/zellij/config.kdl。
100% 免费、离线、开源(MIT)。
# Zellij Agent Rules - NEVER run bare `zellij` or `zellij attach` without `--create-background` in agent shells—it opens a full-screen TUI. - Always pass `--no-formatting` to `list-sessions` and target explicit `--session <name>` on `zellij action` calls.
Agent 高频安全命令配方
只读查询(安全推荐)
zellij list-sessions --short --no-formatting
使用 --short 与 --no-formatting 干净打印活跃会话名称,不进入 TUI。
zellij --session dev action dump-layout
只读输出会话 dev 的 KDL 布局定义树。
受控写入与预演
zellij attach --create-background dev
通过 --create-background 在后台启动 dev 会话,不占用当前 TTY。
核心优势
- + 原生提供
attach --create-background、list-sessions --no-formatting与zellij action远程指令。 - + 声明式 KDL 布局便于一键拉起标准化的多窗格工作区。
注意事项与踩坑点
- ! 不支持
--json输出,仅返回纯文本或 KDL 格式。 - ! 未加
--create-background或action直接运行zellij会进入交互全屏 TUI 并阻塞。