跳转到内容

配置文件

sivtr 把配置放在统一 home 下(SIVTR_HOME 覆盖,否则 ~/.sivtr):

平台 当前路径
所有平台 ~/.sivtr/config.toml
[editor]
command = "nvim"
[sync]
max_age_secs = 15
[hotkey]
chord = "alt+y"
[theme]
mode = "auto"
[mcp]
idle_exit_secs = 60
[embedding]
endpoint = "https://api.openai.com/v1/embeddings"
model = "text-embedding-3-small"
api_key_env = "OPENAI_API_KEY"
batch_size = 64
[pty_proxy]
enabled = true
[editor]
command = "nvim"
Key 类型 默认值 含义
command string "" 编辑器命令。空值表示自动检测。

示例:

command = "hx"
command = "nvim"
command = "vim"
command = "code --wait"
[sync]
max_age_secs = 15
Key 类型 默认值 含义
max_age_secs integer 15 archive 距上次同步多少秒后,查询会触发一次增量重同步。0 表示每次查询都重新列目录。
[embedding]
endpoint = "https://api.openai.com/v1/embeddings"
model = "text-embedding-3-small"
api_key_env = "OPENAI_API_KEY"
batch_size = 64

semantic 和 hybrid 搜索必须显式配置 OpenAI-compatible embedding endpoint。 endpoint 必须使用 HTTPS;本地开发允许 loopback HTTP。api_key_env 为空时不发送认证 header。

[hotkey]
chord = "alt+y"
Key 类型 默认值 含义
chord string "alt+y" sivtr hotkey start 使用的按键
[theme]
mode = "auto"
Key 类型 默认值 含义
mode string "auto" TUI 配色方案:auto、dark 或 light

auto 跟随系统外观(macOS/Linux XDG/Windows registry),并根据终端能力选择 truecolor 或 ANSI 调色板。dark 和 light 强制调色板。未知值和拼写错误(如 mode = "ligth")是硬错误。

[mcp]
idle_exit_secs = 60
Key 类型 默认值 含义
idle_exit_secs integer 60 无工具调用多少秒后 stdio MCP server 退出;0 表示保持到宿主关闭 stdin。sivtr mcp serve --idle-exit flag 覆盖此值。
[pty_proxy]
enabled = true
Key 类型 默认值 含义
enabled boolean true 让 shell 运行在采集代理内并记录命令输出。

安装 sivtr init <shell|all> 或执行 sivtr setup 后,重启 shell 即开始捕获。旧配置缺少此字段时默认使用 true。要暂停捕获,通过 sivtr config edit 将其设为 false;安装、升级 hook 和重新运行 setup 都会保留显式关闭设置。切换开关后需要重启 shell。