跳到内容
PaneflowPaneflow

paneflow.json 模式参考

paneflow.json 的每个键、类型、默认值、应用时机和 runtime notes。

paneflow.json 是按用户存储的 JSON 文件。所有键都是可选的,{} 也是有效配置。实际行为以 Rust config loader 和 runtime resolver 为准;发布的 JSON Schema 用于向编辑器暴露公共键、验证和自动补全。

未知的 top-level key 会在 runtime 被忽略,但编辑器会通过 schema 标记出来。有效保存会被 config watcher 重新加载。Hot reload 时,如果 JSON 无效,Paneflow 会保留上一份有效配置,而不是广播 defaults。启动时 遇到无效文件会回退到 defaults 并写入 warning 日志。

File locations

PlatformPath
Linux 和 macOS~/.paneflow/paneflow.json
Windows%USERPROFILE%\.paneflow\paneflow.json

PANEFLOW_HOME 会移动整个目录(配置、会话、worktree、缓存、辅助二进制文件)。 位于旧位置(~/.config/paneflow、~/Library/Application Support/paneflow、 %APPDATA%\paneflow)的配置会在首次启动时复制到 ~/.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:

paneflow.json
{
"$schema": "https://github.com/arthjean/paneflow/raw/main/schemas/paneflow.schema.json",
"$schemaVersion": "1.0.0"
}

Top-level keys

KeyTypeDefaultAppliedNotes
$schemastringnoneEditor onlyPoints editors to the published schema. Ignored by Paneflow.
$schemaVersionstring1.0.0Startup/reloadUnknown versions warn but do not block loading.
default_shellstring/nullPlatform shell fallbackNew terminalUnix: configured -> $SHELL -> /bin/sh. Windows: configured -> pwsh.exe -> powershell.exe -> %ComSpec% -> C:\Windows\System32\cmd.exe -> cmd.exe.
themestring/nullPaneflow DarkHot reloadThe light or dark variant of one preset: Paneflow, Vercel, Claude, Cursor, Tailwind. Pre-preset names (One Dark, PaneFlow Light, Vercel, Claude, Cursor) still resolve. Runtime lookup is case-insensitive.
theme_modestring/nulldarkHot reloadlight and dark force the matching bundled theme; system follows the OS window appearance.
font_familystring/nullbundled JetBrainsMono Nerd FontHot reload cacheAccepts .PaneflowMono, JetBrainsMono NF, JetBrainsMono NFM, .PaneflowSans, embedded font names, or installed monospace families.
font_fallbacksstring array/nullGPUI fallback stackHot reload cacheOrdered extra fallback families for glyphs missing from font_family.
font_sizenumber/null13.0Hot reload cachePoints, valid range 8.0 to 32.0; invalid values fall back to 13.0.
font_weightstring/nullnormalHot reload cacheOne of thin, extra_light, light, semi_light, normal, medium, semi_bold, bold, extra_bold, black, extra_black.
line_heightnumber/null1.0Hot reload cacheMultiplier 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_widthnumber/null1.0Hot reload cacheMultiplier of the font's advance, valid range 0.8 to 2.0. The cell is rounded to whole device pixels.
unfocused_pane_opacitynumber/null1.0Hot reloadOpacity of panes that do not hold focus, when a workspace has more than one pane. Range 0.15 to 1.0; 1.0 disables the dim.
reduce_motionboolean/nullfalseHot reloadMinimizes non-essential interface motion: hover transitions settle instantly and decorative animations render a static frame. Trackpad scrolling in a terminal moves by whole lines instead of following the gesture by the pixel.
sidebar_showobject/nullall offHot reloadWhat a session tab row shows beyond its name: branch adds its git branch, diffstat adds its insertion and deletion counts, pr turns the branch icon into a pull-request glyph colored by the request's state when one exists, indent_guide draws a hairline under a workspace's folder icon down its tab rows. The first two read the tab's bound worktree, or its workspace's checkout when the tab is unbound; pr needs the gh CLI and answers for GitHub remotes only. Toggled from the rail's Customize Sidebar menu.
worktreesobject/null见下文热重载Paneflow 为分支创建的 git worktree 存放在哪里、如何清理:dir、auto_remove、keep_limit、for_new_branches。Settings > Worktrees 编辑同样的键。
window_decorationsstring/nullclientStartupclient draws Paneflow chrome; server delegates to the OS compositor.
window_backdropstring/nullautoStartupauto, mica, blurred, acrylic, transparent, opaque, or off. On Windows, blurred and acrylic set in the config resolve to auto; only PANEFLOW_WINDOW_BACKDROP applies blur there. PANEFLOW_WINDOW_BACKDROP overrides for one launch.
windows_terminal_materialboolean/nullfalseWindow/terminal renderWindows-only terminal background material toggle. The Blended interface style sets it to true, Themed to false. Ignored on other platforms.
windows_chrome_materialboolean/nullfalseWindow/chrome renderWindows-only native material in the primary navigation card. The Blended interface style sets it to true, Themed to false. Ignored on other platforms.
macos_chrome_materialboolean/nullfalseWindow/chrome rendermacOS-only native Sidebar material in the primary navigation card. The Blended interface style sets it to true, Themed to false. Ignored on other platforms.
linux_terminal_materialboolean/nullfalseWindow/terminal renderLinux-only translucent terminal card over the window veil, so a compositor blur shows through. The Blended interface style sets it to true, Themed to false. Ignored on other platforms.
linux_chrome_materialboolean/nullfalseWindow/chrome renderLinux-only translucent veil behind the sidebar and the title bar, so a compositor blur shows through. The Blended interface style sets it to true, Themed to false. Ignored on other platforms.
option_as_metaboolean/nulltrue on Linux and Windows, false on macOSHot reloadSends 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_integrationboolean/nulltrueNew terminalEnables Paneflow shell snippets for OSC 7 CWD and OSC 133 command marks.
editorobject/nullminimap 关,scrollbar 开热重载代码编辑器在文本旁绘制的内容:minimap 在右边缘添加小地图,scrollbar 保留垂直滚动条。从编辑器的控制菜单切换,选择应用于每个打开的文件。
automationobject/null全部关闭热重载智能体回合结束后运行的后台工作:tab_auto_naming 通过智能体自身的 CLI(claude -p、codex exec、opencode run、pi --print)在禁用工具的情况下,把会话最近的交流总结为 2 到 5 个词的标签名,每个会话每三分钟最多一次,且仅在对话增长时执行。你输入的名字永远不会被替换;"Reset name" 将标签页恢复为该名字。
submit_paste_delay_msinteger/null70IPC sendFloor delay between bracketed paste and Enter for paneflow send --submit. Range 10 to 5000.
external_editorstring/nullautoNext open actionEditor that opens file links, including terminal file links: auto, system, zed, cursor, windsurf, code, or visual_studio. auto uses $VISUAL, then $EDITOR, then the first known editor on PATH; system always uses the OS opener. A named editor that is not on PATH falls back to auto.
shortcutsobject{}Hot reloadMaps keystrokes to action names. See shortcuts and actions.
terminalobject/nulldefaults belowMixedNamespaced terminal renderer and PTY settings.
commandsarray[]Settings/RunCommand palette entries and workspace templates.
agent_profilesarray[]热重载自定义启动项,以额外的环境变量和参数运行内置智能体,例如通过 CLAUDE_CONFIG_DIR 使用第二个 Claude Code 账号。Settings > Agents > Profiles 编辑同一列表。
claude_code_bypass_permissionsboolean/nullfalseNext Claude launchAdds --permission-mode bypassPermissions to the Claude Code launcher. High-risk opt-in.
ai_unrestrictedboolean/nullfalsePer IPC callAllows trusted conductors to submit to peer panes without PANEFLOW_IPC_SCRIPTING.
ai_injection_fenceboolean/nulltruePer read callWraps surface.read output in an untrusted-output fence by default.
on_quitask, keep, stop, nullaskAt quitWhat quitting does while hosted sessions run: ask opens the quit dialog, keep leaves every session running, stop stops them all and shuts the host down. With no live session the app exits and shuts the idle host down.
sidebar_ended_sessions0, 3, 5, 10, null5Next sidebar renderHow many ended sessions a workspace previews in the sidebar before the rest collapse under one "N more ended sessions" row. Nothing is pruned; the cap only controls the preview.
agent_panelobject/nulldefaults belowAgents UIAgents-view notification preferences.
agentsobject/nulldefaults belowRestore and next launchAgent conversation restore and Claude Code session-id preassignment.
telemetryobject/null{ "enabled": null }Startup/consentDesktop telemetry consent. PANEFLOW_NO_TELEMETRY=1 overrides it.

Agent launcher buttons

Each button key is boolean/null. null or omission auto-detects the CLI binary. false hides the button. true forces it visible.

On Windows, the pane palette, the New pane menu, and the welcome screen offer only Claude Code, Codex, Amp, Gemini, and Copilot, the runtimes that declare Windows support, and hide agent_profiles entries based on the others. Linux and macOS keep every agent below.

KeyAgent
claude_code_button_visibleClaude Code
codex_button_visibleCodex
opencode_button_visibleOpenCode
pi_button_visiblePi
hermes_agent_button_visibleHermes Agent
grok_button_visibleGrok
amp_button_visibleAmp
gemini_button_visibleGemini
copilot_button_visibleCopilot
factory_button_visibleFactory
openclaw_button_visibleOpenClaw
muse_button_visibleMuse Code
fx_button_visiblefx (Linux and macOS)

terminal

KeyTypeDefaultAppliedNotes
terminal.ligaturesboolean/nulltrueHot reload cacheEnables programming ligatures when the active font supports them.
terminal.integrated_glyphsboolean/nulltrueHot reloadDraws built-in block glyphs as filled quads.
terminal.color_emojiboolean/nulltrueHot reloadUses the platform color-emoji path.
terminal.cursor_colorstring/nulltheme cursorHot reload/new terminal#RRGGBB, RRGGBB, #RGB, or RGB.
terminal.scrollbarboolean/nulltrueNew terminal viewOverlay scrollbar shown while scrolling or hovering the right edge of a pane.
terminal.scrollback_linesinteger/null10000New terminalRange 100 to 100000. Cached terminals cap at 1000.
terminal.cursor_shapestring/nullblockNew terminalvintage, block, beam, underline, double_underline, or hollow.
terminal.osc52_clipboardstring/nullcopy创建终端视图时自 v0.17.5 起可用。 copy 允许获得焦点的终端通过 OSC 52 写入系统剪贴板;off 拒绝所有 OSC 52 写入。通过 OSC 52 读取剪贴板始终被拒绝。现有终端视图会保留原设置,直到重新创建。
terminal.xt_checksum_reportboolean/nullfalse会话启动时自 v0.17.7 起可用。 响应 DECRQCRA 校验和请求(CSI Pi ; Pg ; Pt ; Pl ; Pb ; Pr * y),vttest 和 esctest 等一致性测试套件依赖这些响应。默认关闭,因为正在运行的程序可以逐个单元格计算屏幕校验和,从而读回屏幕上的全部内容,包括其他程序的输出。关闭时,XTCHECKSUM(CSI Ps # y)也会被忽略。会话主机每次启动会话时读取该值。
terminal.xt_checksum_extensioninteger/null0会话启动时自 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_blinkstring/nullterminal_controlledNew terminalon, off, or terminal_controlled.
terminal.envobject/nullnoneNew terminalEnvironment variables injected into every new terminal. Per-surface env wins. Values are passed through verbatim: no ~ and no $NAME expansion, unlike agent_profiles.*.env. Keys Paneflow sets for every terminal, such as TERM, ZDOTDIR, and the PANEFLOW_* variables, are ignored and logged once. LANG defaults to en_US.UTF-8 only when LANG, LC_ALL, and LC_CTYPE are all unset.
terminal.scroll_multipliernumber/null1.0New terminal viewRange 0.1 to 10.0. Ignored in mouse-reporting and alternate-screen scroll paths.
terminal.minimum_contrastnumber/nullAuto (60)Hot reloadMinimum APCA lightness contrast (Lc) enforced between text and its cell background, on the colors a program chose (truecolor and palette indices 16 to 255). The theme's sixteen ANSI colors, foreground, and background are never corrected. Unset means Auto, which is 60 on every theme; 0 turns the correction off; a negative or non-numeric value means Auto. Range 0 to 90.

agent_panel

KeyTypeDefaultNotes
agent_panel.notify_when_agent_waitingstring/nullNeverPrimaryScreen, AllScreens, or Never. Also governs desktop notifications that terminal programs send with OSC 9 or OSC 777.

agents

KeyTypeDefaultNotes
agents.restore_conversationsboolean/nulltrueWhen 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.claude_preassign_session_idboolean/nullfalseThe 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.

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.dirstring/null~/.paneflow/worktrees受管 worktree 的根目录。每个仓库对应一个 <repo>-<hash> 子目录,每个分支在其下对应一个目录。所有平台默认均为 ~/.paneflow/worktrees(Windows 上为 %USERPROFILE%\.paneflow\worktrees)。~ 展开为 home 目录。在旧根目录(包括旧的相邻目录 <repo>.worktrees/)下创建的 worktree 仍在原处正常工作。
worktrees.auto_removeboolean/nulltrue关闭 workspace 时删除受管 worktree,并把超出 keep_limit 的最旧 worktree 清理掉。未提交的更改会先保存为快照,分支绝不会被删除。false 会保留每个 worktree,直到你在 Settings > Worktrees 或标签页菜单中删除它。
worktrees.keep_limitinteger/null15保留的受管 worktree 数量;超出后,没有被打开的标签页使用的最旧 worktree 会被删除。范围 0 到 200。
worktrees.for_new_branchesboolean/nulltrueNew branch 表单中 Worktree 开关的默认状态。true 为该分支创建 worktree;false 则把 workspace 的检出切换到该分支,pane 在仓库根目录打开。开关会改写此键;当有 agent 正在该检出中工作时,切换会被拒绝。
{
  "worktrees": {
    "dir": "~/worktrees",
    "auto_remove": true,
    "keep_limit": 15
  }
}

agent_profiles

agent_profiles 是一个列表。每个条目都会添加一个启动项,以额外的环境变量和 参数运行某个内置智能体。这些配置会与内置智能体一起出现在 pane 调色板中,并沿用基础智能体的状态跟踪、hooks 和会话。 Settings > Agents > Profiles 编辑同一列表。

键类型默认值说明
agent_profiles.*.namestring必填启动器中显示的标签。
agent_profiles.*.agentstring必填基础智能体的标签:claude_code、codex、opencode、pi、hermes、grok、amp、gemini、copilot、factory 或 openclaw。
agent_profiles.*.envobject{}设置在智能体进程上的环境变量。开头的 ~ 会展开为 home 目录,值中任意位置的 $NAME、${NAME} 或 %NAME% 会从 Paneflow 自身的环境中取该变量。不指向任何名称的 $ 或 % 保持原样;环境未定义的名称会被 Settings 编辑器拒绝,在手写配置中则整个值保持不变并在日志中记录警告。
agent_profiles.*.argsstring array[]追加在基础智能体自身参数之后的额外参数。每个 token 必须是普通单词:字母、数字、-、_、.、=。

智能体标签未知、名称为空或包含不安全 token 的条目会被跳过并给出警告;其他配置 仍会加载。

{
  "agent_profiles": [
    {
      "name": "Claude perso",
      "agent": "claude_code",
      "env": { "CLAUDE_CONFIG_DIR": "~/.claude-perso" },
      "args": ["--model", "opus"]
    }
  ]
}

commands

commands entries back both simple shell commands and Settings > Workspaces templates. A command entry must have name; workspace and command are mutually exclusive.

KeyTypeDefaultNotes
commands[].namestringrequiredDisplay name. Must not be blank.
commands[].descriptionstring/nullnoneHuman-readable description.
commands[].keywordsstring array[]Fuzzy-search keywords.
commands[].workspaceobject/nullnoneWorkspace template.
commands[].commandstring/nullnoneSimple shell command string.

Workspace template keys:

KeyTypeDefaultNotes
commands[].workspace.namestring/nullcommand nameWorkspace display name.
commands[].workspace.cwdstring/nullcurrent cwdDefault workspace directory.
commands[].workspace.layout_presetstring/nullnoneeven_h, even_v, main_vertical, or tiled.
commands[].workspace.colorstring/nullnoneSix-digit hex accent color, no leading #.
commands[].workspace.layoutobject/nullpreset layoutLayout tree root.

Layout keys:

KeyTypeNotes
commands[].workspace.layout.typestringpane or split.
commands[].workspace.layout.surfacesarrayRequired for pane nodes.
commands[].workspace.layout.directionstringRequired for split: horizontal or vertical.
commands[].workspace.layout.rationumber/nullLegacy binary split ratio, range 0.1 to 0.9. Ignored when ratios exists.
commands[].workspace.layout.ratiosnumber array/nullPer-child ratios for N-ary layouts. Must match child count and sum near 1.0.
commands[].workspace.layout.childrenarrayRequired for split; minimum two layout nodes.

Surface keys inside a pane:

KeyTypeDefaultNotes
commands[].workspace.layout.surfaces[].surface_typestring/nullterminalCurrently only terminal surfaces render.
commands[].workspace.layout.surfaces[].namestring/nullderivedSurface tab name.
commands[].workspace.layout.surfaces[].custom_namestring/nullnoneUser-assigned name that survives restart.
commands[].workspace.layout.surfaces[].commandstring/nullshellCommand to run when the surface is created.
commands[].workspace.layout.surfaces[].promptstring/nullnonePrompt to prefill after launching an agent command.
commands[].workspace.layout.surfaces[].cwdstring/nullworkspace cwdPer-surface working directory. Relative paths resolve against workspace cwd.
commands[].workspace.layout.surfaces[].pathstring/nullnoneFile opened by a markdown surface. Ignored by terminal surfaces.
commands[].workspace.layout.surfaces[].envobject/nullnoneExtra environment variables. Wins over terminal.env on collision.
commands[].workspace.layout.surfaces[].focusboolean/nullfalseGives this surface initial focus.
commands[].workspace.layout.surfaces[].scrollbackstring/nullnoneSaved plain-text scrollback restored with the surface.
commands[].workspace.layout.surfaces[].agentstring/nullnoneStable tag of the agent CLI last detected in the surface.
commands[].workspace.layout.surfaces[].font_sizenumber/nullglobal font_sizePer-surface font-size override, range 8.0 to 32.0.
commands[].workspace.layout.surfaces[].sessionstring/nullnoneUUID of the persistent host session the terminal reattaches to on restore. Written by Paneflow.
commands[].workspace.layout.surfaces[].agent_sessionobject/nullnoneAgent conversation last started in the surface: runtime (catalog id), id (provider session id), and cwd. Paneflow reopens it when the host session did not survive. Written by Paneflow.

telemetry

KeyTypeDefaultNotes
telemetry.enabledboolean/nullnullnull means unanswered, true means opted in, false means opted out.

Complete example

paneflow.json
{
"$schema": "https://github.com/arthjean/paneflow/raw/main/schemas/paneflow.schema.json",
"$schemaVersion": "1.0.0",
"theme": "One Dark",
"font_family": "JetBrainsMono Nerd Font",
"font_size": 13,
"line_height": 1.0,
"cell_width": 1.0,
"windows_chrome_material": false,
"macos_chrome_material": false,
"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",
            "command": "claude",
            "prompt": "Review the API changes"
          }
        ]
      }
    }
  }
]
}