Files
splinter/docs/CONFIG.md
T
Konrad 8fa3e9d7bb splinter: /goal as a command, and widgets that are actually alive
The goal is not configuration: it belongs to the conversation in front of you.
So it moved out of the config file and became a command.

- commands are an ABI now: sp_host_add_command / sp_host_command, so the UI
  never needs to know a plugin by name. A leading '/' is never sent to the
  model; an unknown command lists what exists.
- works in both modes: '/goal <text>' in the TUI and
  'splinter -p "/goal ..."' (exit 0 on success, 2 on an unknown command).
- focus registers /goal (set, show when empty of arguments) and /recap (force
  a reminder into the next turn, regardless of the five-turn cadence).

Fixed while testing it: the UI only repainted on a keypress, so a plugin widget
that ticks was frozen on screen - the clock showed the time from when the window
opened. The input read now times out after 500 ms and that timeout repaints the
sidebar and status line: clock, focus and cps are alive while you do nothing.

Fifteen test binaries green; test_focus covers the command path too: set, show,
force a recap outside the cadence, refuse an unknown command.
2026-11-07 20:50:58 +00:00

70 lines
2.5 KiB
Markdown

# Configuration
Splinter reads one file, so that `splinter` alone is enough to start working.
```
$XDG_CONFIG_HOME/splinter/config (or ~/.config/splinter/config)
```
`SPLINTER_CONFIG=/path` overrides the location, `--config PATH` does the same
for one run, `--no-config` ignores the file entirely, and `--init-config`
writes a commented example.
Format: one `key = value` per line, `#` starts a comment, blank lines are
ignored. Not JSON, on purpose — this file gets edited by hand, and a missing
comma must not be the reason the harness will not start.
## Not in the file: the goal
The session goal is set at runtime with `/goal <text>` — in the TUI, or in a
one-shot run (`splinter -p "/goal ship the config"`). It belongs to the
conversation in front of you, not to a file that outlives it.
## Precedence
Command line, then the file, then the built-in default. An unknown key is an
error with its line number: a typo that is silently ignored is a config that
lies about what it does.
## Keys
| key | meaning |
|-----|---------|
| `endpoint` | OpenAI-compatible URL, e.g. `http://127.0.0.1:8080/v1/chat/completions` |
| `model` | model name the endpoint expects |
| `api_key_env` | name of the env var holding the key (default `SPLINTER_API_KEY`) |
| `transport` | a transport a plugin provides, e.g. `cli` |
| `cli_cmd` | command for the `cli` transport, e.g. `claude -p` |
| `plugin` | a plugin to load, one line each; absolute paths survive a `cd` |
| `theme` | CDE palette name (`splinter --list-themes`) |
| `autonomous` | `1` runs mutating/destructive tools without asking |
| `steps` | tool rounds per turn (default 8) |
| `max_bytes` | conversation budget in bytes, `0` = no limit |
| `session_dir` | where session logs go (default `~/.splinter`) |
| `system_prompt` | sent once at the start of a conversation |
## Example: local model
```
endpoint = http://kontron.local:8080/v1/chat/completions
model = /models/unsloth/Qwen3.6-35B-A3B-MTP-GGUF/Qwen3.6-35B-A3B-UD-Q8_K_XL.gguf
theme = Delphinium
autonomous = 1
plugin = /home/lotherk/src/splinter/plugins/lcm/lcm.so
plugin = /home/lotherk/src/splinter/plugins/cps/cps.so
plugin = /home/lotherk/src/splinter/plugins/clock/clock.so
session_dir = /home/lotherk/.splinter
```
## Example: Claude Code as the model
```
transport = cli
cli_cmd = claude -p
plugin = /home/lotherk/src/splinter/plugins/cli/cli.so
theme = Delphinium
```
With both `endpoint` and `transport` set, `transport` wins — it is the more
specific instruction.