配置 paneflow.json 模式参考
paneflow.json 是按用户存储的 JSON 文件。所有键都是可选的,{}
也是有效配置。实际行为以 Rust config loader 和 runtime resolver
为准;发布的 JSON Schema
用于向编辑器暴露公共键、验证和自动补全。
本页描述 Paneflow 当前的开发版本。标记为 尚未发布 的键尚未包含在 v0.20.0 中,将随下一个版本发布。
未知的 top-level key 会在 runtime 被忽略,但编辑器会通过 schema 标记出来。有效保存会被 config watcher 重新加载。Hot reload 时,如果 JSON 无效或文件被删除,Paneflow 会保留上一份有效配置,而不是广播 defaults。启动时遇到无效文件会回退到 defaults 并写入 warning 日志。大于 1 MiB 的文件视为无效。
File locations
| Platform | Path |
|---|---|
| Linux 和 macOS | ~/.paneflow/paneflow.json |
| Windows | %USERPROFILE%\.paneflow\paneflow.json |
PANEFLOW_HOME 会移动整个目录(配置、会话、worktree、缓存、辅助二进制文件)。它必须是绝对路径;相对值会被忽略。Paneflow 使用默认的 ~/.paneflow 时,如果
~/.paneflow 中没有 paneflow.json,每次启动都会从旧位置(~/.config/paneflow、
~/Library/Application Support/paneflow、%APPDATA%\paneflow)复制它,连同
session.json、window-state.json 和 telemetry_id。旧文件保留在原处。设置到其他位置的 PANEFLOW_HOME 会跳过这次复制。
非默认的 home 会作为独立实例运行,拥有自己的会话 host、worker 和 IPC 端点(paneflow-ipc-<fingerprint>.sock;参见脚本参考),因此一个 home 的 CLI 只能访问该 home 的面板。
如果首次启动时文件不存在,Paneflow 会用全部默认值启动。在上述路径创建文件即可开始定制。
Editor schema
Add this at the top of the file for autocomplete in VS Code, Zed, JetBrains IDEs, Helix, and other JSON Schema-aware editors:
{
"$schema": "https://github.com/arthjean/paneflow/raw/main/schemas/paneflow.schema.json",
"$schemaVersion": "1.0.0"
}Top-level keys
| Key | Type | Default | Applied | Notes |
|---|---|---|---|---|
$schema | string | none | Editor only | Points editors to the published schema. Ignored by Paneflow. |
$schemaVersion | string | 无 | 启动/重新加载 | 可以省略。1.0.0 以外的版本或非字符串值会写入一条警告日志,文件仍会加载。 |
default_shell | string/null | 平台 shell 回退链 | 新终端 | 开头的 ~/ 展开为 home 目录。只有名称时,先在 PATH 中查找,然后依次查找 /opt/homebrew/bin、/usr/local/bin、/usr/bin 和 /bin;在 Windows 上,bash 解析为 Git Bash。找不到配置的 shell 时会回退到平台链,终端会说明改用了哪个 shell 启动。Unix 链:$SHELL -> /bin/sh。Windows 链:pwsh.exe -> powershell.exe -> %ComSpec% -> %SystemRoot%\System32\cmd.exe -> cmd.exe。 |
theme | string/null | Paneflow Dark | 热重载 | Paneflow 应用的主题:Paneflow、Vercel、Claude、Cursor 或 Tailwind 中某个预设的浅色或深色变体,例如 Vercel Light。查找不区分大小写。旧名称 One Dark、Vercel、Claude 和 Cursor 分别解析为 Paneflow Dark、Vercel Dark、Claude Dark 和 Cursor Dark。未知名称回退到 Paneflow Dark,并在日志中记录警告。 |
theme_mode | string/null | 由 theme 推导 | 热重载 | light、dark 或 system。手动编辑 theme_mode 不会改变主题:只有 theme 决定主题。Settings > Appearance 和命令面板会同时写入这两个键,选择当前预设的对应变体。system 跟随操作系统外观,并在外观变化时改写 theme。缺少此键或值无效时,模式跟随 theme:Light 主题视为 light,其他主题视为 dark。 |
font_family | string/null | 内置 JetBrainsMono Nerd Font | 热重载缓存 | 接受 .PaneflowMono、JetBrainsMono NF、JetBrainsMono NFM、.PaneflowSans、内嵌字体族(JetBrainsMono Nerd Font、JetBrainsMono Nerd Font Mono、Geist Mono、Lilex、Geist、IBM Plex Mono、IBM Plex Sans)或已安装的字体族。在 macOS 上,不是已安装等宽字体族的名称会回退到默认值;其他平台会把任何名称交给字体系统。 |
font_fallbacks | string array/null | GPUI 回退栈 | 热重载缓存 | 按顺序列出额外的回退字体族,用于 font_family 缺少的字形。空条目会被丢弃,空列表等同于 null。 |
font_size | number/null | 13.0 | Hot reload cache | Points, valid range 8.0 to 32.0; invalid values fall back to 13.0. |
font_weight | string/null | normal | 热重载缓存 | 取值为 thin、extra_light、light、semi_light、normal、medium、semi_bold、bold、extra_bold、black、extra_black 之一。大小写、连字符和空格均可容忍(semibold、Extra-Light)。extra_black 的渲染效果与 black 相同。无效值回退到 normal 并给出警告。 |
line_height | number/null | 1.0 | Hot reload cache | Multiplier of the font's own line height (ascent, descent, and line gap), valid range 0.8 to 2.5. The cell is rounded to whole device pixels. |
cell_width | number/null | 1.0 | Hot reload cache | Multiplier of the font's advance, valid range 0.8 to 2.0. The cell is rounded to whole device pixels. |
unfocused_pane_opacity | number/null | 1.0 | 热重载 | 工作区中有多个面板时,未获得焦点的面板的不透明度。范围 0.15 到 1.0;超出范围的值会被截取到范围内,1.0 关闭变暗效果。 |
reduce_motion | boolean/null | false | 热重载 | 减少非必要的界面动效:悬停过渡立即完成,装饰性动画渲染为静态帧。终端中的触控板滚动按整行移动,而不是逐像素跟随手势。在 Settings > Appearance 或命令面板中切换。 |
comfortable_density | boolean/null | true | 热重载 | 将工作区中的面板分隔为圆角卡片,卡片之间留有间隙。false 让面板边缘相接,以 1 px 分隔线隔开,分隔线保留 7 px 的拖动区域,且只对网格和 diff dock 的外侧角做圆角处理。仅对 Rounded 界面风格生效。在 Settings > Appearance 或命令面板中切换。 |
interface_style | string/null | classic | 热重载 | 界面的布局和形状风格。classic 让窗口边到边铺满,顶部面板和停靠面板的标签页位于标题栏中,并使用 6、8、12 和 14 px 的紧凑圆形圆角尺度。rounded 让面板以卡片形式浮在全宽标题栏下方,使用较大半径的连续曲率圆角,菜单、选择弹出框和设置卡片使用圆形圆角。旧值 paneflow 仍会选择 rounded。在 Settings > Appearance > Interface style 或命令面板中设置。 |
workspace_icon | string/null | default | 热重载 | 侧边栏中每个工作区行前面的图标,工作区折叠时显示关闭状态,显示其标签页时显示打开状态。default 是 Paneflow 的线框文件夹。standard 用展开箭头取代文件夹,折叠时向右,展开时向下。metal 是填充的玻璃文件夹,windows 是黄色渐变文件夹,windows95 是 16 色像素文件夹,pixel 是线框像素文件夹。两种像素风格在 100% 或 200% 显示缩放下最清晰。在 Settings > Appearance > Workspace icon 或命令面板中设置。 |
app_icon | string/null | glass | Windows 和 macOS 上热重载;Linux X11 上对新窗口生效 | 运行中应用的图标。glass 是安装时的紫色玻璃图标;black 和 white 在黑色或白色底板上以横条绘制标志;black-solid 和 white-solid 将其面板绘制为实心形状。16 个插画图标以另一种材质呈现同一标志:aubergine、paper、midnight-matte、polar、melon、honeydew、berry、rainbow、solarwave、neon、phosphor、holo、amethyst、blueprint、chip、nostalgia。Windows 会立即在 Alt+Tab 中显示该图标,并让你的用户配置中打开此 Paneflow 的快捷方式(包括固定到任务栏的快捷方式和开始菜单条目)指向它,任务栏按钮在下次登录后更新;macOS 在 Paneflow 运行期间将其显示在 Dock 中,X11 将其作为窗口图标。在 Linux 上,release 构建还会让你用户目录中的 Paneflow 桌面条目副本指向所选图标,因此启动器在 Wayland 上也会显示它,尽管 Wayland 会忽略窗口图标本身。在 Settings > Appearance > App icon 中设置。参见 App icon。 |
sidebar_show | object/null | status、shimmer、agents、usage、agent_logo、agent_workspace 和 agent_shimmer 开启,其余关闭 | 热重载 | 侧边栏各行在名称之外显示的内容:branch 添加检出的 git 分支,diffstat 添加其新增和删除行数,pr 在存在 PR 时把分支图标变为按 PR 状态着色的 PR 图标,indent_guide 在工作区文件夹图标下方沿其标签页行绘制一条细线。每个检出只显示一次:工作区行显示工作区自身检出的分支和计数,标签页行只有在绑定了自己的 worktree 时才显示;按状态分组时,每个标签页行都显示其检出的信息;pr 需要 gh CLI,且只对 GitHub 远程仓库生效。agents 在侧边栏底部显示 Agents 区域,列出活动空间的智能体会话,最紧急的排在最前。usage 显示套餐限额胶囊,usage.plan_limits: false 也会隐藏它。status 在工作区和标签页行上显示智能体状态:Need you、Error 和 Done 徽标、工作中矩阵、标题微光和状态提示;false 把状态留给 Agents 区域,标签页的 PR 占据空出的位置。agent_logo 和 agent_workspace 决定每个 Agents 行显示的内容:智能体的标志,以及标题后的工作区名称;行始终显示其状态。shimmer 和 agent_shimmer 分别在标签页行和 Agents 行上为工作中智能体的标题添加动画:标题变为灰色,一条亮带从上面扫过;false 让标题保持静止和原有颜色。agent_all_spaces(默认关闭)让 Agents 区域列出所有空间的智能体,而不仅是活动空间的,每个状态组中活动空间的智能体排在最前,来自其他空间的行会在工作区之后注明该空间。agent_logo、agent_workspace、agent_shimmer 和 agent_all_spaces 通过 Agents 标题右侧的 Customize agent rows 按钮切换,其他键通过导轨的 Customize sidebar 菜单切换;按状态分组时,该菜单会隐藏 agents 和 indent_guide 开关。不是布尔值的子键取其自身默认值,不是对象的 sidebar_show 取全部默认值。 |
sidebar_group_by | string/null | folder | 热重载 | Workspaces 侧边栏如何对行分组。folder 将每个工作区列为文件夹行,其标签页位于其下。status 将活动空间所有工作区的标签页按状态标题列出,顺序为 Need you、Error、Done、Working、Idle,每个标签页在标题后注明其工作区;标签页采用其中最紧急的智能体的状态,没有运行智能体时为 Idle。按状态分组会隐藏 Agents 区域(否则列表会重复),并在侧边栏标题中添加 New tab 按钮,询问标签页在哪个工作区中打开。在 Customize sidebar > Group by 或命令面板中设置。 |
worktrees | object/null | 见下文 | 热重载 | Paneflow 为分支创建的 git worktree 存放在哪里、如何清理:dir、auto_remove、keep_limit、for_new_branches。Settings > Worktrees 编辑同样的键。 |
window_decorations | string/null | client | 启动时,以及新分离的面板窗口 | client 绘制 Paneflow 窗口装饰;server 交给操作系统合成器。其他任何值都视为 client。主窗口在启动时读取它;之后分离出的面板窗口读取当前值。 |
background_style | string/null | "themed" | 热重载 | 尚未发布。 窗口背景的外观。"themed" 用纯色主题颜色绘制应用。"blended" 请求系统模糊窗口背后的内容,并在其上绘制一层主题遮罩。缺少此键时,Paneflow 会根据下面的旧键推断它,因此旧版本保存的配置会保持原有外观;未知值解析为 "themed"。在 Settings > Appearance > Background style 或命令面板中设置,这也会移除旧键。 |
window_backdrop | string/null | auto | Startup | v0.20.0 之后已弃用,由 background_style 取代。auto、mica、blurred、acrylic、transparent、opaque 或 off。在 Windows 上,配置中设置的 blurred 和 acrylic 会解析为 auto;只有 PANEFLOW_WINDOW_BACKDROP 能在那里应用模糊。缺少 background_style 时,opaque 或 off(以及 macOS 上的 transparent)会把样式解析为 Themed。在 Linux 上,模糊跟随 Blended 背景样式。Settings 和命令面板保存 background_style 时会移除此键。仅在 Windows 上,PANEFLOW_WINDOW_BACKDROP 会在单次启动中覆盖它;macOS 和 Linux 忽略该变量。 |
windows_terminal_material | boolean/null | false | Window/terminal render | v0.20.0 之后已弃用,由 background_style 取代。仅在缺少 background_style 时读取:任一 Windows 键为 true 时,在 Windows 上把样式解析为 Blended。Settings 和命令面板保存 background_style 时会移除此键。在其他平台上忽略。 |
windows_chrome_material | boolean/null | false | Window/chrome render | v0.20.0 之后已弃用,由 background_style 取代。仅在缺少 background_style 时读取:任一 Windows 键为 true 时,在 Windows 上把样式解析为 Blended。Settings 和命令面板保存 background_style 时会移除此键。在其他平台上忽略。 |
windows_material_veil | boolean/null | false | Window/chrome render | v0.20.0 之后已弃用,由 background_style 取代,且不再读取。Settings 和命令面板保存 background_style 时会移除此键。 |
macos_chrome_material | boolean/null | false | Window/chrome render | v0.20.0 之后已弃用,由 background_style 取代。仅在缺少 background_style 时读取:true 在 macOS 上把样式解析为 Blended。Settings 和命令面板保存 background_style 时会移除此键。在其他平台上忽略。 |
linux_terminal_material | boolean/null | false | Window/terminal render | v0.20.0 之后已弃用,由 background_style 取代。仅在缺少 background_style 时读取:任一 Linux 键为 true 时,在 Linux 上把样式解析为 Blended。Settings 和命令面板保存 background_style 时会移除此键。在其他平台上忽略。 |
linux_chrome_material | boolean/null | false | Window/chrome render | v0.20.0 之后已弃用,由 background_style 取代。仅在缺少 background_style 时读取:任一 Linux 键为 true 时,在 Linux 上把样式解析为 Blended。Settings 和命令面板保存 background_style 时会移除此键。在其他平台上忽略。 |
option_as_meta | boolean/null | true on Linux and Windows, false on macOS | Hot reload | Sends Alt/Option as ESC-prefix Meta. On macOS, true makes Option plus a letter send Meta instead of composing a character; keep false when Option should type Unicode characters. A config reload applies it to open terminals. |
shell_integration | boolean/null | true | New terminal | Enables Paneflow shell snippets for OSC 7 CWD and OSC 133 command marks. |
editor | object/null | 默认值见下文 | 热重载 | 代码编辑器和停靠面板的文件查看器如何显示文件:minimap、scrollbar、word_wrap、markdown_rendered、csv_table 和 semantic_tokens(尚未发布)。见 editor。 |
language_servers | object | 内置 rust-analyzer 和 zls | 下次打开文件时 | 尚未发布。 用于语义高亮的语言服务器,按服务器 id 组织。见 language_servers。 |
automation | object/null | 全部关闭 | 热重载 | 智能体回合结束后运行的后台工作:tab_auto_naming 通过一个能做总结的 CLI,把会话最近的交流总结为 2 到 5 个词的标签名:会话自身的智能体是 claude -p、codex exec、opencode run 或 pi --print 之一时使用它,否则使用其中第一个已安装的。Claude Code 以 --model haiku(或 ANTHROPIC_SMALL_FAST_MODEL)运行,Claude Code、Codex 和 Pi 运行时禁用工具;OpenCode 以 --pure 运行。只为包含单个 surface 的标签页命名。每个会话每三分钟最多尝试一次,从上次尝试起计算,且仅在对话增长时执行;同一时间只运行一个总结,时限为 60 秒。你输入的名字永远不会被替换;"Reset name" 将标签页恢复为该名字。 |
submit_paste_delay_ms | integer/null | 70 | IPC 发送时 | paneflow send --submit 在 bracketed paste 和 Enter 之间的最短延迟。范围 10 到 5000;超出范围的值会被截取到范围内并给出警告。会话主机只在启动时读取一次,因此更改要在主机重启后才会作用于托管会话。 |
external_editor | string/null | auto | 下次打开时 | 打开文件链接(包括终端中的文件链接)的编辑器:auto、system、zed、cursor、webstorm、code 或 visual_studio。auto 依次使用 $VISUAL、$EDITOR(跳过 vim、nvim、hx、emacs 或 nano 等终端编辑器)、PATH 中找到的第一个 code、cursor、zed、subl、code-insiders 或 webstorm,最后使用操作系统的默认打开方式。system 始终使用操作系统的默认打开方式。visual_studio 运行 devenv。指定的编辑器不在 PATH 中或无法启动时回退到 auto,旧值 windsurf 也是如此。 |
shortcuts | object | {} | Hot reload | Maps keystrokes to action names. See shortcuts and actions. |
terminal | object/null | defaults below | Mixed | Namespaced terminal renderer and PTY settings. |
commands | array | [] | Settings/运行 | 命令面板中的 shell 命令,以及 Settings > Workspaces 中的工作区模板。见 commands。 |
agent_profiles | array | [] | 热重载 | 自定义启动项,以额外的环境变量和参数运行内置智能体,例如通过 CLAUDE_CONFIG_DIR 使用第二个 Claude Code 账号。Settings > Agents 编辑同一列表:智能体设置中的 New preset 添加一个条目,Add account 写入指向某个账号文件夹的条目。 |
spaces | array | [] | 热重载 | 命名的工作区分组,最多 9 个。侧边栏只列出活动空间的工作区。见 spaces。 |
claude_code_bypass_permissions | boolean/null | false | Next Claude launch | Adds --permission-mode bypassPermissions to the Claude Code launcher. High-risk opt-in. |
ipc | object/null | 两个 gate 均关闭 | 保存后的下一个请求 | 尚未发布。 在面板中运行的进程所需的 IPC 写入 gate:scripting 和 orchestration。见 ipc。 |
ai_unrestricted | boolean/null | false | Per IPC call | 为面板中的调用方和 Paneflow 之外的调用方打开两个 IPC gate,即 ipc.scripting 和 ipc.orchestration,让受信任的 conductor 可以向其他面板提交文本。ipc 部分格式错误时,它无法为面板重新打开这些 gate,Paneflow 无法识别的调用方仍会被拒绝。见 ipc。 |
ai_injection_fence | boolean/null | true | 每次读取调用时 | 默认把 surface.read 和 surface.search 的输出包裹在不可信输出围栏中。调用中的 fenced 参数会覆盖此设置。 |
on_quit | ask, keep, stop, null | ask | 退出时 | 托管会话运行期间退出时的行为:ask 打开退出对话框,keep 让所有会话继续运行,stop 停止所有会话并关闭主机。没有活动会话时,应用直接退出并关闭空闲的主机。有活动会话时为安装更新而重启,即使在 keep 下也会询问;只有 stop 会跳过对话框。对话框中的记住选项会写入此键。无效值视为 ask。 |
agent_prompts | native, paneflow, null | native | 下一个智能体提问时 | 尚未发布。 编码智能体自身的问题和权限请求在哪里回答:native 将它们留在智能体的终端中,paneflow 把 Claude Code 的问题以及 Claude Code 和 Codex 的权限请求显示为 Paneflow 提示,并提供返回终端的方式。Codex 的问题从不会被拦截。 |
agent_panel | object/null | defaults below | Agents UI | Agents-view notification preferences. |
agents | object/null | 默认值见下文 | 恢复时和下次启动时 | 智能体对话恢复、CLI 更新方式、默认账号、Claude Code session id 预分配,以及按智能体设置的授权和沙箱。见 agents。 |
usage | object/null | defaults below | Next integration refresh | Subscription usage: whether Paneflow relays Claude Code plan limits. |
telemetry | object/null | { "enabled": null } | 热重载 | 桌面遥测同意设置。把 PANEFLOW_NO_TELEMETRY、DO_NOT_TRACK 或 NO_TELEMETRY 设为任意值(即使是 0)都会关闭遥测,无论此键如何设置。 |
Agent launcher buttons
每个按钮键都是 boolean/null。null、省略或非布尔值会自动检测 CLI
二进制文件。false 隐藏按钮。true 在智能体支持的平台上强制显示按钮。
在 Windows 上,面板调色板、New pane 菜单和欢迎界面只提供下表中标记为
Windows 的智能体,并隐藏基于其他智能体的 agent_profiles 条目。
| 键 | 智能体 | 平台 |
|---|---|---|
claude_code_button_visible | Claude Code | Linux、macOS、Windows |
codex_button_visible | Codex | Linux、macOS、Windows |
opencode_button_visible | OpenCode | Linux、macOS |
pi_button_visible | Pi | Linux、macOS |
hermes_agent_button_visible | Hermes Agent | Linux、macOS |
grok_button_visible | Grok | Linux、macOS |
amp_button_visible | Amp | Linux、macOS、Windows |
gemini_button_visible | Gemini | Linux、macOS、Windows |
copilot_button_visible | Copilot | Linux、macOS、Windows |
factory_button_visible | Factory | Linux、macOS |
openclaw_button_visible | Openclaw | Linux、macOS |
muse_button_visible | Muse Code | Linux、macOS |
fx_button_visible | fx | Linux、macOS |
terminal
| Key | Type | Default | Applied | Notes |
|---|---|---|---|---|
terminal.ligatures | boolean/null | true | Hot reload cache | Enables programming ligatures when the active font supports them. |
terminal.integrated_glyphs | boolean/null | true | Hot reload | Draws built-in block glyphs as filled quads. |
terminal.color_emoji | boolean/null | true | Hot reload | Uses the platform color-emoji path. |
terminal.cursor_color | string/null | theme cursor | Hot reload/new terminal | #RRGGBB, RRGGBB, #RGB, or RGB. |
terminal.scrollbar | boolean/null | true | New terminal view | Overlay scrollbar shown while scrolling or hovering the right edge of a pane. |
terminal.scrollback_lines | integer/null | 10000 | 新终端 | 范围 100 到 100000;超出范围的值会被截取到范围内并给出警告。智能体终端上限为 10000,缓存的终端上限为 1000。 |
terminal.cursor_shape | string/null | block | 新终端视图 | vintage、block、beam、underline、double_underline 或 hollow。也接受别名 filled_box、bar、underscore、double_underscore 和 empty_box。未知值视为 block,并给出警告。 |
terminal.osc52_clipboard | string/null | copy | 创建终端视图时 | 自 v0.17.5 起可用。 copy 允许获得焦点的终端通过 OSC 52 写入系统剪贴板;off 拒绝所有 OSC 52 写入;未知值视为 copy。通过 OSC 52 读取剪贴板始终被拒绝。现有终端视图会保留原设置,直到重新创建。 |
terminal.open_links_in | string/null | dock | 立即生效 | 自 v0.20.0 起可用。 点击 src/main.rs:12 这类代码路径时在哪里打开:dock 在 Files 停靠面板中打开文件并定位到该行,external_editor 在外部编辑器中打开。点击时按住 Shift 会改用另一种方式。Markdown 路径仍在面板中打开。未知值视为 dock。 |
terminal.xt_checksum_report | boolean/null | false | 会话启动时 | 自 v0.17.7 起可用。 响应 DECRQCRA 校验和请求(CSI Pi ; Pg ; Pt ; Pl ; Pb ; Pr * y),vttest 和 esctest 等一致性测试套件依赖这些响应。默认关闭,因为正在运行的程序可以逐个单元格计算屏幕校验和,从而读回屏幕上的全部内容,包括其他程序的输出。关闭时,XTCHECKSUM(CSI Ps # y)也会被忽略。会话主机每次启动会话时读取该值。 |
terminal.xt_checksum_extension | integer/null | 0 | 会话启动时 | 自 v0.17.7 起可用。 DECRQCRA 校验和的计算方式,使用 XTCHECKSUM 和 xterm checksumExtension 的位:1 保持结果为正,2 不计单元格的显示属性,4 计入空白,8 把从未写入的单元格算作空格,16 使用完整码位而不是 DEC 8 位值。0 即真实 DEC 终端的计算方式。范围为 0 到 31。超出范围的值,例如 32、-1、1.5 或 "4",只会丢弃这一个键:它回退为 0,并输出一条注明键名和范围的警告,文件中的其他设置在启动和重新加载时照常生效。完全重置(ESC c)会恢复为该值。 |
terminal.cursor_blink | string/null | terminal_controlled | 新终端视图 | on、off 或 terminal_controlled。未知值视为 terminal_controlled,并给出警告。 |
terminal.env | object/null | 无 | 新终端 | 注入每个新终端的环境变量。surface 自身的 env 优先。值按原样传递:不展开 ~,也不展开 $NAME,这与 agent_profiles.*.env 不同。Paneflow 为每个终端设置的键(TERM、COLORTERM、TERM_PROGRAM、TERM_PROGRAM_VERSION、SHLVL、ZDOTDIR、PANEFLOW_ORIG_ZDOTDIR、PANEFLOW_WORKSPACE_ID、PANEFLOW_SURFACE_ID、PANEFLOW_SOCKET_PATH、PANEFLOW_BIN_DIR)会被忽略并记录一次日志;无效的名称,以及会改变程序加载方式或智能体运行方式的键(LD_*、DYLD_*、智能体会话标记、Paneflow 的恢复令牌)同样如此。在 Windows 上,名称会转为大写。只有当 LANG、LC_ALL 和 LC_CTYPE 都未设置时,LANG 才默认为 en_US.UTF-8。 |
terminal.scroll_multiplier | number/null | 1.0 | New terminal view | Range 0.1 to 10.0. Ignored in mouse-reporting and alternate-screen scroll paths. |
terminal.minimum_contrast | number/null | 自动(60) | 热重载 | 在程序选择的颜色(truecolor 以及调色板索引 16 到 255)上,强制文本与其单元格背景之间的最低 APCA 亮度对比度(Lc)。主题的 16 种 ANSI 颜色、前景色和背景色永远不会被校正。未设置表示自动,在所有主题上都是 60;0 关闭校正;负值或非数值表示自动。范围 0 到 90;更高的值按 90 计算。 |
terminal.program_resume | object/null | mode: ask,无受信任程序 | 下次恢复时 | 尚未发布。 终端的托管会话未能保留时(例如重启电脑后),Paneflow 如何处理当时在该终端中运行的程序。mode 为 ask(提供重新启动选项,受信任程序除外,它们会立即重启)、auto(重启所有程序)或 off(不提供任何选项)。trusted_programs 列出纯程序名,例如 htop,与记录的命令的第一个词比较;含路径分隔符的名称、空名称、.、.. 或 C: 这类驱动器前缀会被忽略并给出警告,重复项会被丢弃。无效的 mode 视为 ask,不是对象的配置块视为 ask 且没有受信任程序。会话结束时仍在启动中的程序只会提供重新启动选项。智能体 CLI 通过其自身的恢复命令重启;agents.restore_conversations: false 时只提供选项。 |
editor
| Key | Type | Default | Applied | Notes |
|---|---|---|---|---|
editor.minimap | boolean/null | false | 热重载 | 在编辑器右边缘绘制文件的小地图。从编辑器的控制菜单切换,选择应用于每个打开的文件。 |
editor.scrollbar | boolean/null | true | 热重载 | 绘制编辑器的垂直滚动条。从编辑器的控制菜单切换,选择应用于每个打开的文件。 |
editor.word_wrap | boolean/null | false | 下次打开文件时 | 打开文件时按编辑器宽度折行,在能容纳的最后一个空格处换行。编辑器控制菜单顶部的 Word Wrap 只改变当前标签页。Up、Down、Page Up 和 Page Down 按可见行移动。 |
editor.markdown_rendered | boolean/null | false | 下次打开文件时 | 在停靠面板中以渲染形式而不是源码显示不超过 10 MiB 的 Markdown 文件。文件标题中的 Show rendered markdown 和 Show markdown source 会切换当前标签页,并为之后打开的文件保存该选择;其他已打开的标签页保持原视图。在指定行打开的文件始终显示源码,更大的文件会显示 "File too large to render" 提示。 |
editor.csv_table | boolean/null | true | 下次打开文件时 | 在停靠面板中将不超过 10 MiB 的 .csv 和 .tsv 文件显示为只读表格,而不是源码。文件标题中的 Show source 和 Show table 会切换当前标签页,并为之后打开的文件保存该选择;其他已打开的标签页保持原视图。false 将其作为可编辑文本打开。 |
editor.semantic_tokens | boolean/null | false | 热重载 | 尚未发布。 在语法颜色之上,用 language_servers 中语言服务器的语义 token 为代码着色。在 Settings > Editor > Semantic highlighting 中切换。 |
agent_panel
| Key | Type | Default | Notes |
|---|---|---|---|
agent_panel.notify_when_agent_waiting | string/null | Never | PrimaryScreen 或 Never。也接受 AllScreens,其行为与 PrimaryScreen 相同;其他任何值视为 Never,并给出警告。也控制终端程序通过 OSC 9 或 OSC 777 发送的桌面通知。 |
agents
agents 中除下面四个设置之外的任何键都表示一个智能体配置:agent_profiles
名称、claude_code 这类智能体标签、claude 这类智能体命令,或 claude-code
这类 runtime slug,比较时不区分大小写。它包含该智能体的 grants、sandbox 和
sandbox_unix_scope。
| Key | Type | Default | Notes |
|---|---|---|---|
agents.restore_conversations | boolean/null | true | When a pane's hosted session did not survive, for instance after a reboot, Paneflow opens a shell in the recorded folder and types the runtime's resume command for the conversation last started in that pane. Set to false to only reopen the shell. |
agents.update_methods | object | {} | How Settings › Agents updates each agent's CLI, keyed by runtime slug such as claude-code or codex. auto (or no entry) uses the tool that installed it; self runs the agent's own updater; npm, bun, pnpm and yarn install its npm package globally with that tool; script reruns its official installer, through PowerShell on Windows and curl elsewhere. Choosing a tool other than the one that installed the CLI installs a second copy, and the copy first on PATH is the one that runs. |
agents.default_accounts | object | {} | 尚未发布。 每个新面板启动时使用的账号,按 runtime slug(claude-code、codex 或 grok)组织:一个配置目录,可以是绝对路径或以 ~ 开头,作为 CLAUDE_CONFIG_DIR、CODEX_HOME 或 GROK_HOME 传给面板。设置了自己目录的空间优先,已打开的面板保留其账号。未列出的智能体使用其自身的默认目录。隐式空间 Default 的工作区同样会获得这些目录。 |
agents.claude_preassign_session_id | boolean/null | false | The Claude Code shim adds --session-id <uuid> to a fresh interactive claude launch, so Paneflow knows the conversation before any hook arrives. Read by panes started after the change. |
agents.<profile>.grants | array | 无 | 尚未发布。 为运行该智能体的面板设置的常驻授权,每项为 {"rights": [...], "scope": ...},rights 取自 write、spawn 和 layout,scope 为 workspace(默认)或 instance。任一条目无效时,该配置的所有授权都会被丢弃,并给出警告。参见 智能体如何获得 grant? |
agents.<profile>.sandbox | string | 无 | 尚未发布。 "paneflow" 让该智能体的面板在 Paneflow 的沙箱中运行,仅限 Linux。在其他平台上,或使用其他任何值时,该配置不会启动,Paneflow 会说明原因。参见 如何为智能体的面板启用沙箱? |
agents.<profile>.sandbox_unix_scope | boolean | false | 尚未发布。 在内核的 Landlock 支持时,同时在沙箱中限制路径名 Unix 套接字。不是布尔值的值会让该配置无法启动。 |
usage
| Key | Type | Default | Notes |
|---|---|---|---|
usage.plan_limits | boolean/null | true | Paneflow installs its status line relay, paneflow-ai-hook StatusLine, in each Claude Code config directory whose settings.json has no statusLine, so the plan limits Claude Code hands its status line reach Paneflow. A status line of your own is never changed. false removes the relay at the next integration refresh. No credential is read. |
usage.sidebar_agents | array/null | null | The agents whose plan limits the sidebar capsule and its bubble show, by runtime slug: claude-code, codex. null shows every agent, and an empty list hides the capsule. Settings › Usage always lists every account. Set from Settings › Usage › Sidebar. |
worktrees
当你从「New pane」调色板、标签页的上下文菜单或 paneflow up 打开一个分支时,Paneflow
会创建一个 git worktree。检出目录内不会写入任何东西:所有权标记位于该 worktree
自己的 git dir(主仓库中的 .git/worktrees/<name>/),因此 git status 保持干净,标记也随 worktree 一起消失。Settings > Worktrees 编辑同样的键,并列出
Paneflow 管理的 worktree。
在调色板中留空分支名会在所选基础上创建一个 detached 检出,命名为
<base>-<sha7>;之后可通过标签页右键菜单中的「Create branch here…」把它变成分支,未提交的更改会保留。
仓库根目录下的 .worktreeinclude 文件列出要复制到每个新 worktree 的文件和目录(通常是 git 忽略的文件),每行一个相对根目录的路径,# 为注释,目录末尾的 /
可选。绝对路径和含 .. 的路径会被跳过。没有该文件时,Paneflow 会复制顶层的
.env* 以及存在的 AGENTS.override.md;有该文件时,只复制其中列出的内容。
worktree 中已存在的文件绝不会被覆盖。
无论自动还是手动,删除受管 worktree 之前,Paneflow 都会把它的未提交更改保存为主仓库 refs/paneflow/snapshots/ 下的一个快照提交:已跟踪文件的修改、新文件,以及当时所在的分支。Settings > Worktrees 列出这些快照;Restore 会在同一分支上重建 worktree 并让这些更改保持未提交状态,Delete 则丢弃该 ref。干净的 worktree
不会留下快照。
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
worktrees.dir | string/null | ~/.paneflow/worktrees | 受管 worktree 的根目录。每个仓库对应一个 <repo>-<hash> 子目录,每个分支在其下对应一个目录。所有平台默认均为 ~/.paneflow/worktrees(Windows 上为 %USERPROFILE%\.paneflow\worktrees)。~ 展开为 home 目录;展开后仍为相对路径的值会被忽略,改用默认值。在旧根目录(包括旧的相邻目录 <repo>.worktrees/)下创建的 worktree 仍在原处正常工作。 |
worktrees.auto_remove | boolean/null | true | 关闭 workspace 时删除受管 worktree,并把超出 keep_limit 的最旧 worktree 清理掉。未提交的更改会先保存为快照,分支绝不会被删除。false 会保留每个 worktree,直到你在 Settings > Worktrees 或标签页菜单中删除它。 |
worktrees.keep_limit | integer/null | 15 | auto_remove 开启时保留的受管 worktree 数量;超出后,最旧的 worktree 会被删除。被打开的标签页或活动会话使用的 worktree 永远不会被清理。范围 0 到 200;更高的值按 200 计算。 |
worktrees.for_new_branches | boolean/null | true | New branch 表单中 Worktree 开关的默认状态。true 为该分支创建 worktree;false 则把 workspace 的检出切换到该分支,pane 在仓库根目录打开。开关会改写此键;当有 agent 正在该检出中工作时,切换会被拒绝。 |
{
"worktrees": {
"dir": "~/worktrees",
"auto_remove": true,
"keep_limit": 15
}
}ipc
尚未发布。 ipc 包含两个写入 gate,在面板中运行的进程必须先通过它们,才能向另一个面板输入内容或启动程序。每个 gate 都会在你保存文件后的下一个请求生效。未知键会被忽略。格式错误的部分(不是对象,或包含不是 true 或 false 的值)会连同其键记录到日志,并为每个面板关闭两个 gate,即使开启了 ai_unrestricted 也是如此。窗口和后台进程始终通过这些 gate;Paneflow 无法识别的调用方永远无法通过。Paneflow 之外的进程在 ai_unrestricted 开启或该 gate 打开时通过。关于为单个面板打开 gate 的
grant,参见 如何安全写入?。
在 Paneflow 进程上设置的环境变量 PANEFLOW_IPC_SCRIPTING=1 和
PANEFLOW_IPC_ORCHESTRATION=1 仍会为 Paneflow 之外的进程打开对应的 gate;对面板而言,只有在 paneflow.json 没有 ipc 部分时才生效。依赖它们的面板会收到一次性的弃用提示:从下一个版本起,它们对面板不再生效。
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
ipc.scripting | boolean/null | false | 打开文本和按键写入:surface.send_text、surface.send_keystroke 和 session.input。包含 ipc.orchestration。 |
ipc.orchestration | boolean/null | false | 允许请求启动命令、prompt 或字符串环境变量,或应用其 surface 带有 session 或 scrollback 的布局,并允许 --scope all 访问所有工作区。 |
language_servers
尚未发布。 开启 editor.semantic_tokens 后,在 Files 停靠面板中打开文件会启动处理其扩展名的语言服务器:每个服务器和 Files 停靠面板根目录对应一个进程,该根目录下所有打开的文件共享它,最后一个文件关闭时它会停止。位于 Files 停靠面板根目录之外的文件不会获得服务器。内置两个服务器:用于 .rs 文件的 rust-analyzer,以及用于 .zig
和 .zon 文件的 zls。扩展名匹配不区分大小写。多个已启用的服务器处理同一扩展名时,内置服务器优先,其次是按字母顺序排在最前的 id。
语言服务器可能会运行它打开的项目,例如其构建脚本和过程宏。某个服务器第一次要为某个根目录启动时,编辑器会显示一条注明两者的横幅来询问,只有点击 Start 后才会启动服务器。答复保存在 ~/.paneflow/language-server-trust.json
(Windows 上为 %USERPROFILE%\.paneflow\language-server-trust.json)中,从不保存在仓库里;Not now 会在 Paneflow 重启后再次询问。Settings > Editor 中的
Forget language server permissions 会清空该文件。
Paneflow 从不下载服务器。只有名称的 command 会在 PATH 的绝对目录中查找(跳过相对或空的条目),绝对路径按原样使用,相对路径会被拒绝。找不到的服务器不会启动;安装到 Paneflow 的 PATH 中的某个目录后,下一个打开的文件会启动它,之后才加入
PATH 的目录需要重启 Paneflow。退出或违反协议的服务器会重启一次;第二次失败后保持停止,直到它服务的最后一个文件关闭,或你点击编辑器横幅中的 Restart。
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
language_servers.<id>.command | string | 内置值 | 要运行的程序:在 PATH 中找到的名称,或绝对路径。非内置 id 必填。 |
language_servers.<id>.args | string array | [] | 传给程序的参数。 |
language_servers.<id>.extensions | string array | 内置值 | 该服务器处理的文件扩展名,不带点。非内置 id 必填。 |
language_servers.<id>.language_id | string | 内置值 | 打开文档时发送的 LSP languageId。非内置 id 必填。 |
language_servers.<id>.enabled | boolean | true | false 阻止服务器启动。 |
language_servers.<id>.initialization_options | any | 无 | 作为服务器 initialize 请求中的 initializationOptions 发送。 |
language_servers.<id>.settings | any | 无 | 返回给服务器的 workspace/configuration 请求:项所指的 section 是此对象的键时,得到该键的值,其他项得到整个对象。 |
使用内置 id 的条目只替换它设置的字段。其他 id 会添加一个服务器。例如 gopls 只有在其 semanticTokens 设置开启时才发送语义 token:
{
"editor": { "semantic_tokens": true },
"language_servers": {
"rust-analyzer": { "command": "/opt/rust-analyzer/bin/rust-analyzer" },
"gopls": {
"command": "gopls",
"extensions": ["go"],
"language_id": "go",
"settings": { "semanticTokens": true }
}
}
}格式错误的条目(包括含有未知字段的条目)会被跳过并记录一行日志,其他条目仍会加载。不是对象的 language_servers 值会被忽略并给出警告。
agent_profiles
agent_profiles 是一个列表。每个条目都会添加一个启动项,以额外的环境变量和参数运行某个内置智能体。这些配置会与内置智能体一起出现在 pane 调色板中,并沿用基础智能体的状态跟踪、hooks 和会话。
Settings > Agents 编辑同一列表:智能体设置中的 New preset 添加一个条目,Add account 写入指向某个账号文件夹的条目。
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
agent_profiles.*.name | string | 必填 | 启动器中显示的标签。 |
agent_profiles.*.agent | string | 必填 | 基础智能体的标签:claude_code、codex、opencode、pi、hermes、grok、amp、gemini、copilot、factory、openclaw、muse 或 fx。 |
agent_profiles.*.env | object | {} | 设置在智能体进程上的环境变量。值为 ~ 或以 ~/(Windows 上为 ~\)开头时会展开为 home 目录,值中任意位置的 $NAME、${NAME} 或 %NAME% 会从 Paneflow 自身的环境中取该变量。不指向任何名称的 $ 或 % 保持原样;环境未定义的名称会被 Settings 编辑器拒绝,在手写配置中则整个值保持不变并在日志中记录警告。 |
agent_profiles.*.args | string array | [] | 追加在基础智能体自身参数之后的额外参数。每个 token 必须是普通单词:字母、数字、-、_、.、=。 |
智能体标签未知、名称为空、env 键不是变量名或包含不安全 token 的条目会被跳过并给出警告;其他配置仍会加载。
{
"agent_profiles": [
{
"name": "Claude perso",
"agent": "claude_code",
"env": { "CLAUDE_CONFIG_DIR": "~/.claude-perso" },
"args": ["--model", "opus"]
}
]
}spaces
spaces 是一个命名工作区分组的列表,类似 Arc 中的空间。每个工作区属于一个空间,侧边栏和 Cmd/Ctrl+1 到 Cmd/Ctrl+9 只作用于活动空间的工作区。不属于任何空间的工作区归入名为 Default 的隐式空间。没有 spaces 条目时,一切照旧。每个工作区属于哪个空间、哪个空间处于活动状态,记录在
session.json 中,而不是这里。
| 键 | 类型 | 默认值 | 说明 |
|---|---|---|---|
spaces.*.id | string | 必填 | 小写、带连字符的 UUID,session.json 用它来引用该空间。重命名空间时请保留它。 |
spaces.*.name | string | 必填 | 空间显示的名称,去除首尾空白后为 1 到 32 个字符,且不区分大小写时不得重复。Default 为保留名称。 |
spaces.*.color | string | 无 | red、green、yellow、blue、magenta 或 cyan:空间没有图片时在其圆形图标中绘制的渐变色系,在所有主题中都相同。其他任何值都会让空间没有颜色。 |
spaces.*.avatar | string | 无 | 空间图片在 Paneflow home 下 avatars/ 中的文件名,是由 Settings > Spaces 写入的 96 像素正方形 PNG。图片会在侧边栏和 Settings 中取代颜色的渐变。不匹配 ^[A-Za-z0-9][A-Za-z0-9.-]{0,91}\.png$ 的值会被忽略,并在日志中记录警告。 |
spaces.*.env | object | {} | 设置在该空间各工作区中每个终端上的变量,对更改之后打开的终端生效。优先级从低到高:terminal.env、agents.default_accounts 目录、spaces.*.env、agent_profiles.*.env、surface 的 env。~/ 展开为 home 目录,$NAME 从 Paneflow 的环境中取值。 |
id 缺失或格式错误、id 已被使用、名称为空、重复、保留或过长的条目,以及第九个有效条目之后的任何条目,都会被跳过并在日志中记录警告;其他空间仍会加载。不是数组的 spaces 值会按空列表加载。Paneflow 运行期间,如果一次编辑删除了某个空间,其工作区会移到 Default;如果被删除的空间正处于活动状态,
Default 会成为活动空间。
env 中的键如果不是合法的变量名、以 PANEFLOW_ 开头、属于 Paneflow 为每个终端设置的变量(TERM、COLORTERM、TERM_PROGRAM、TERM_PROGRAM_VERSION、
SHLVL、ZDOTDIR),或会改变程序的加载方式或智能体的运行方式(LD_*、
DYLD_*、继承的智能体会话标记,例如 CLAUDECODE,以及 Paneflow 的恢复令牌),就会被忽略并在日志中记录警告;非字符串值同样如此。CLAUDE_CONFIG_DIR、CODEX_HOME 和
GH_CONFIG_DIR 在展开后必须是绝对路径,否则同样会被忽略;目录不存在时,
Paneflow 会在该空间的终端启动前创建它,在 Linux 和 macOS 上权限为 0700。如果 $NAME 指向 Paneflow 环境中未设置的变量,该值保持不展开,并在日志中记录警告。在 Windows 上,终端和子进程收到的变量名会转为大写;paneflow.json
保留你输入时的大小写。
Paneflow 为该空间的工作区运行的自有子进程(pull request 徽标使用的 gh、
git、空间处于活动状态时的克隆,以及为标签页命名的 claude -p 或
codex exec)只会收到该空间的以下变量:
GIT_AUTHOR_NAME、GIT_AUTHOR_EMAIL、GIT_COMMITTER_NAME、
GIT_COMMITTER_EMAIL、GIT_CONFIG_GLOBAL、GIT_SSH_COMMAND、
SSH_AUTH_SOCK、GH_CONFIG_DIR、GH_TOKEN、GITHUB_TOKEN、
CLAUDE_CONFIG_DIR、CODEX_HOME、ANTHROPIC_API_KEY 和
OPENAI_API_KEY。git 使用哪个空间,取决于哪个工作区的文件夹、仓库或
worktree 最贴近地包含 git 的运行目录。为标签页命名的 Codex 进程保留自己的一份简短变量列表。属于 Default 的工作区运行这些进程时使用 Paneflow 的环境,外加 agents.default_accounts 目录。
gh 优先使用 GH_TOKEN 和 GITHUB_TOKEN,而不是 GH_CONFIG_DIR 中存储的账号;Claude Code 优先使用 ANTHROPIC_API_KEY、ANTHROPIC_AUTH_TOKEN 和
CLAUDE_CODE_OAUTH_TOKEN,而不是 CLAUDE_CONFIG_DIR 中存储的登录信息。因此,依赖配置目录的空间应重新定义 Paneflow 环境导出的这些变量。只有当
git 的凭据助手是 gh auth git-credential 时,通过 HTTPS 的 git push 才会遵循 GH_CONFIG_DIR;通过 SSH 时,请改为设置 GIT_SSH_COMMAND。这些值以明文存储:优先使用配置目录,而不是令牌。
{
"spaces": [
{
"id": "3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"name": "Work",
"env": {
"CLAUDE_CONFIG_DIR": "~/.claude-work",
"CODEX_HOME": "~/.codex-work",
"GH_CONFIG_DIR": "~/.config/gh-work",
"GIT_AUTHOR_EMAIL": "me@work.example",
"GIT_COMMITTER_EMAIL": "me@work.example"
}
}
]
}{
"spaces": [
{ "id": "3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f", "name": "Work", "color": "blue" },
{ "id": "9b8a7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d", "name": "Personal" }
]
}commands
commands 条目同时支撑 shell 命令(列在命令面板中)和 Settings > Workspaces
的工作区模板。命令条目必须有 name;workspace 和 command 互斥。违反这些规则或 command 为空的条目会被跳过并给出警告;文件的其余部分仍会加载。
| Key | Type | Default | Notes |
|---|---|---|---|
commands[].name | string | required | Display name. Must not be blank. |
commands[].description | string/null | none | Human-readable description. |
commands[].keywords | string array | [] | Fuzzy-search keywords. |
commands[].workspace | object/null | none | Workspace template. |
commands[].command | string/null | 无 | Shell 命令字符串。 |
Workspace template keys:
| Key | Type | Default | Notes |
|---|---|---|---|
commands[].workspace.name | string/null | command name | Workspace display name. |
commands[].workspace.cwd | string | 必填 | 工作区打开时所在的项目目录。~ 展开为 home 目录。没有它的模板无法运行("project path is required")。 |
commands[].workspace.layout_preset | string/null | even_h | 模板中面板的排列方式:even_h、even_v、main_vertical 或 tiled。其他任何值视为 even_h。 |
commands[].workspace.color | string/null | 无 | 随模板保存;当前应用不使用它。 |
commands[].workspace.layout | object/null | 无 | 模板的面板,以布局树表示。运行模板时会按顺序读取其 surface,每个 surface 打开一个面板,按 layout_preset 排列:树中的分屏、方向和比例不会被使用。没有 surface 的模板无法运行。Settings > Workspaces 会根据预设重写该树。 |
布局键。同一棵树也描述 Paneflow 保存在 session.json 中的布局,在那里分屏和比例会生效。其中任何内容都不会被拒绝:不合规范的值会被修正。
| Key | Type | Notes |
|---|---|---|
commands[].workspace.layout.type | string | pane or split. |
commands[].workspace.layout.surfaces | array | pane 节点的 surface,最多 64 个。没有 surface 的面板会得到一个终端。只有第一个 focus: true 的 surface 保留焦点。 |
commands[].workspace.layout.direction | string | split 的方向:horizontal 或 vertical。其他任何值视为 horizontal。 |
commands[].workspace.layout.ratio | number/null | 旧版二分分屏比例,截取到 0.1 到 0.9。存在 ratios 或分屏有两个以上子节点时忽略。 |
commands[].workspace.layout.ratios | number array/null | N 叉布局中每个子节点的比例。每个比例至少为 0.01,列表会被缩放到总和为 1.0;长度与子节点数不符的列表会得到均分。 |
commands[].workspace.layout.children | array | split 的子节点,最多 32 个。只有一个子节点的分屏会被该子节点取代,没有子节点的分屏会被移除。一棵树最多包含 32 个面板。 |
面板内的 surface 键。模板读取 name、custom_name、cwd、command、agent、
prompt、env 和 focus;其他键由 Paneflow 在保存会话时写入。
| Key | Type | Default | Notes |
|---|---|---|---|
commands[].workspace.layout.surfaces[].surface_type | string/null | terminal | terminal 或 markdown。保存的 markdown surface 会重新打开 path 处的文件,没有 path 时会被丢弃。模板始终打开终端。 |
commands[].workspace.layout.surfaces[].name | string/null | 自动推导 | Surface 标签页名称。模板优先使用它,其次是 custom_name。 |
commands[].workspace.layout.surfaces[].custom_name | string/null | none | User-assigned name that survives restart. |
commands[].workspace.layout.surfaces[].command | string/null | shell | 创建 surface 时运行的命令。在模板中不能与 agent 同时使用("pane N has both agent and command")。 |
commands[].workspace.layout.surfaces[].prompt | string/null | none | Prompt to prefill after launching an agent command. |
commands[].workspace.layout.surfaces[].cwd | string/null | workspace cwd | Per-surface working directory. Relative paths resolve against workspace cwd. |
commands[].workspace.layout.surfaces[].path | string/null | none | File opened by a markdown surface. Ignored by terminal surfaces. |
commands[].workspace.layout.surfaces[].env | object/null | none | Extra environment variables. Wins over terminal.env on collision. |
commands[].workspace.layout.surfaces[].focus | boolean/null | false | Gives this surface initial focus. |
commands[].workspace.layout.surfaces[].scrollback | string/null | none | Saved plain-text scrollback restored with the surface. |
commands[].workspace.layout.surfaces[].agent | string/null | 无 | 智能体标签,例如 claude_code。模板会启动该智能体,它必须在 Settings > Agents 中启用。在保存的会话中,表示该 surface 中最后检测到的智能体 CLI。 |
commands[].workspace.layout.surfaces[].font_size | number/null | 全局 font_size | 按 surface 覆盖字号,截取到 8.0 到 32.0。 |
commands[].workspace.layout.surfaces[].session | string/null | none | UUID of the persistent host session the terminal reattaches to on restore. Written by Paneflow. |
commands[].workspace.layout.surfaces[].agent_session | object/null | 无 | 该 surface 中最后启动的智能体对话:runtime(catalog id)、id(provider session id;为空表示最新的对话)和 cwd。托管会话未能保留时,Paneflow 会重新打开它。由 Paneflow 写入。 |
telemetry
| Key | Type | Default | Notes |
|---|---|---|---|
telemetry.enabled | boolean/null | null | null means unanswered, true means opted in, false means opted out. |
Complete example
{
"$schema": "https://github.com/arthjean/paneflow/raw/main/schemas/paneflow.schema.json",
"$schemaVersion": "1.0.0",
"theme": "Paneflow Dark",
"font_family": "JetBrainsMono Nerd Font",
"font_size": 13,
"line_height": 1.0,
"cell_width": 1.0,
"terminal": {
"ligatures": true,
"scrollback_lines": 10000,
"cursor_shape": "block"
},
"agent_panel": {
"notify_when_agent_waiting": "PrimaryScreen"
},
"commands": [
{
"name": "API + Claude",
"description": "Open the API project with Claude and tests",
"workspace": {
"name": "API",
"cwd": "~/projects/api",
"layout_preset": "even_h",
"layout": {
"type": "pane",
"surfaces": [
{
"name": "Claude",
"agent": "claude_code",
"prompt": "Review the API changes"
},
{
"name": "Tests",
"command": "cargo test"
}
]
}
}
}
]
}