-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration ZH
ssobol77 edited this page May 12, 2026
·
1 revision
🌍 English · Polski · Français · Deutsch · 中文
ECLI 通过单个 TOML 文件配置。默认值合理 — 大多数用户只编辑 AI 提供商部分和主题。
| 平台 | 路径 |
|---|---|
| Linux / FreeBSD | ~/.config/ecli/config.toml |
| macOS | ~/Library/Application Support/ecli/config.toml |
| Windows | %APPDATA%\ecli\config.toml |
可在命令行使用 --config /path/to/config.toml 覆盖,或通过环境变量 ECLI_CONFIG:
ECLI_CONFIG=/tmp/test-config.toml ecli当同一设置在多处定义时,ECLI 按以下顺序应用(优先级从高到低):
- 命令行标志(
--theme dark) - 环境变量(
ECLI_THEME=dark) - 用户配置(
~/.config/ecli/config.toml) - 内置默认值
首次启动时,ECLI 创建带有内联注释解释每个键的默认配置。可随时重新生成:
ecli --print-default-config > ~/.config/ecli/config.toml配置分为命名章节:
[editor] # 制表符大小、行尾、自动保存
[ui] # 主题、面板宽度、状态栏
[keybindings] # 自定义快捷键
[ai] # AI 提供商选择
[ai.openai] # 每个提供商的设置
[ai.anthropic]
[ai.ollama]
[ai.huggingface]
[git] # git 集成行为
[lsp] # language server 偏好
[linters] # 每种语言的代码检查器
[panels] # 启用哪些面板完整参考:docs/config/config-schema.md。
[ui]
theme = "dark" # 或 "light", "solarized-dark", "monokai", "nord"重启 ECLI 以应用。
[ai]
default_provider = "anthropic"
[ai.anthropic]
api_key = "sk-ant-..."
model = "claude-sonnet-4-5"
max_tokens = 4096完整矩阵参见 AI 配置。
[editor]
tab_width = 4
use_spaces = true[editor]
line_ending = "lf" # 或 "crlf", "auto"[editor]
autosave = false[linters]
python = "ruff"[editor]
tab_width = 4
use_spaces = true
[ui]
theme = "dark"
[ai]
default_provider = "none"
[git]
auto_fetch = false
[lsp]
enabled = true当 ECLI 升级配置架构时(很少),会自动迁移并将旧配置备份为 config.toml.bak。参见 config-migration-policy。
ECLI 在当前工作目录中查找 .ecli.toml。其中的设置仅为该项目覆盖用户配置。
示例 .ecli.toml:
[editor]
tab_width = 2
[linters]
python = "pylint"ecli --check-config成功时返回 0,否则打印错误。配置格式错误时,会回退到默认值并显示警告。
ecli.io · PyPI · GitHub · Apache-2.0
ECLI — The Next-Generation Terminal IDE · © 2026 Siergej Sobolewski