Files
hx/crates/hx-cli/src/config.sample.toml
T

66 lines
3.8 KiB
TOML

## hx config: ~/.hx/config.toml (global) or .hx/config.toml (project, overrides global).
## Every setting is commented out and shows its default or an example; uncomment to change it.
# provider = "claude" # claude | codex | custom; default: the first logged-in provider
# model = "claude-sonnet-5-5" # model for the chosen provider; "auto" = pick per prompt (see [auto])
# claude_model = "claude-sonnet-5-5" # default: the account's latest Sonnet
# codex_model = "gpt-5.6-sol" # default: Codex's top-listed model
# explore_model = "claude-haiku-4-5" # read-only `task` subagents; default: cheapest tier of the provider
# remember_model = true # reuse the last model picked with /model or /provider
# compact_at = 900000 # auto-compact at this many tokens; default: 90% of the context window
# max_tokens = 16384
# permissions = "ask" # ask | yolo (bash/write/edit run without a prompt)
# mouse = true # wheel scrolling; false keeps terminal text selection
# codemode = false # `codemode` tool: JS scripts that call other tools in a sandbox
# system_prompt = "..." # replaces the built-in prompt; AGENTS.md is still appended
## Sandbox: bash, LSP servers, lens and test runners run under bwrap (Linux) / sandbox-exec (macOS).
## Project dir + /tmp writable, $HOME hidden except `ro`/`rw`, filtered env (no API keys/tokens), no network.
## File tools (read/write/edit) obey the same paths. mode = "on" without a working backend refuses to start.
# [sandbox]
# mode = "off" # off | on (CLI: --sandbox / --no-sandbox)
# backend = "auto" # auto | bwrap | seatbelt
# network = false
# rw = ["~/.cargo/registry", "~/.cargo/git"] # extra writable paths
# ro = ["~/.cargo", "~/.rustup", "~/.local", "~/.nvm", "~/.npm"] # readable parts of $HOME
# env_allow = ["PATH", "HOME", "TERM", "LC_*", "CARGO_*"] # trailing * = prefix
## Auto model (/model auto): pin a tier to a model, even of another provider.
# [auto]
# fast = "claude-haiku-4-5"
# balanced = "claude-sonnet-5-5"
# deep = "gpt-5.6-sol"
# down_after = 3 # light prompts in a row before dropping to a cheaper tier
## OpenAI-compatible endpoint (Ollama, vLLM, LM Studio, OpenRouter), used with provider = "custom".
# [openai_compat]
# base_url = "http://localhost:11434/v1"
# api_key_env = "OPENROUTER_API_KEY" # name of the env var holding the key; the key never goes here
# models = [] # fixed list; empty = ask GET {base_url}/models
# context_window = 128000 # for models that don't report one
# [web] # web_fetch is always on (asks once per domain); web_search needs a backend
# search = "brave" # brave (default; key in $BRAVE_API_KEY) | searxng
# searxng_url = "https://searx.example.org" # instance must allow `json` in search.formats
# [lsp]
# mode = "turn_end" # turn_end | agent_end | off
# tests = "turn_end" # affected tests: turn_end | agent_end | off
# disable = [] # built-in server ids, e.g. ["clangd"]
# enable_runners = [] # opt-in (slow): ["clippy"]
# disable_runners = [] # ruff, biome, eslint, ast-grep, rustfmt, ruff-format, biome-format
## Add or override an LSP server (same id replaces a built-in).
# [[lsp.servers]]
# id = "zls"
# language = "zig"
# extensions = ["zig"]
# command = ["zls"]
# roots = ["build.zig"]
# install = ["brew", "install", "zls"] # offered by the lsp tool when `zls` is missing
## Subprocess extensions (JSON-RPC over stdio); global and project lists are concatenated.
# [[extensions]]
# command = ["node", "my-ext.js"]
# timeout_secs = 10