Configuration¶
Steadlith reads TOML from steadlith.toml by default. Pass --config PATH after a command to select another file. Relative paths and source patterns are resolved from the configuration file’s directory, not from the shell’s current directory.
Generate a documented starter file:
steadlith init
Complete example¶
[chunker]
strategy = "cdc-rabin"
window_words = 48
min_tokens = 180
max_tokens = 640
snap_window_words = 24
primary_mask_bits = 8
backup_mask_bits = 6
[embedding]
provider = "hash"
model = "steadlith-hash-256-v1"
dimensions = 256
batch_size = 64
price_per_million_tokens = 0.0
[store]
cache = ".steadlith/cache.sqlite3"
[index]
backend = "sqlite"
database = ".steadlith/index.sqlite3"
[sources]
include = ["docs/**/*.md", "README.md"]
exclude = ["**/drafts/**", "**/.git/**", "**/.steadlith/**"]
Unknown tables and keys are rejected. This prevents a misspelled safety or identity setting from being silently ignored.
Chunker fields¶
Field |
Default |
Constraint |
Meaning |
|---|---|---|---|
|
|
Supported strategy name |
Boundary algorithm. |
|
|
Integer at least 2 in project config |
Rolling Rabin window in normalized words. |
|
|
Positive and below |
Do not accept CDC candidates before this size. |
|
|
Greater than |
Use the last backup candidate or a hard cut by this size. |
|
|
Non-negative integer |
Search radius used only by |
|
|
|
Strength of the preferred fingerprint match. |
|
|
|
Strength of the fallback fingerprint match. |
Supported strategies:
Strategy |
Use |
|---|---|
|
Default Rabin/TTTD content-defined chunking. |
|
CDC followed by a bounded sentence or paragraph boundary search. Requires project-specific legal review before distribution in a product. |
|
Non-overlapping chunks capped by |
|
Separator-priority chunking within the configured size bounds. |
|
Lexical sentence-affinity proxy used for comparison; it does not call an embedding model. |
Every identity-bearing chunker change should be previewed with steadlith migrate. Do not edit identity settings and immediately query an older index.
Embedding fields¶
Field |
Default |
Constraint |
Meaning |
|---|---|---|---|
|
|
|
Provider adapter. |
|
|
Non-empty string |
Provider model identity. |
|
|
Integer from 1 to 65,536 |
Required vector length. |
|
|
Positive integer |
Maximum texts passed to one provider call. |
|
Not assumed by the library; starter uses |
Finite non-negative number or omitted |
Reporting input for plan estimates. |
|
Not set |
OpenAI only; must be |
Environment variable read by the OpenAI adapter. |
|
Not set |
Custom URLs rejected |
Reserved configuration key; official OpenAI endpoint only. |
price_per_million_tokens does not affect provider billing. It changes only the displayed estimate. Omit it when the price or billing unit is unknown.
Provider and model settings participate in embedding identity. Dimensions are validated against stored vectors and provider output.
Store fields¶
Field |
Default |
Meaning |
|---|---|---|
|
|
SQLite content-addressed embedding cache. |
The cache path must stay below the configuration directory and must differ from the index database path.
Index fields¶
Field |
Default |
Meaning |
|---|---|---|
|
|
Only supported backend value. |
|
|
One logical index and its history. |
Use a different database file for each logical index. Collection and alias keys are rejected because SQLite has no implemented namespace or alias layer.
Source fields¶
Field |
Default |
Meaning |
|---|---|---|
|
|
Globs used when no positional paths are supplied. |
|
drafts, |
Patterns removed from discovered sources. |
Source rules:
Patterns must be relative and cannot contain
..path components.Explicit files, explicit directories, glob matches, and symlink targets must resolve below the configuration directory.
Files must be valid UTF-8 text without an early NUL byte.
Source content is checked for mutation while it is read.
Steadlith-managed config, cache, index, SQLite sidecars, manifest mirrors, journals, and receipt directories are excluded unconditionally.
Supported suffixes include common Markdown, reStructuredText, source code, web, configuration, tabular, and SQL text formats. Unsupported and binary suffixes are skipped.
Environment variables¶
The core does not perform general environment substitution in TOML. The OpenAI adapter reads OPENAI_API_KEY when selected. Set it in the process environment, not in the configuration file:
export OPENAI_API_KEY="..."
steadlith index --allow-network
PowerShell:
$env:OPENAI_API_KEY = "..."
steadlith index --allow-network
Do not commit credentials. Custom API endpoints and custom credential-variable names are deliberately rejected from project-controlled configuration.
Validate a configuration¶
Every state command validates before use. For a write-free check that also evaluates source scope and identity:
steadlith plan --json
Configuration errors use exit code 4 and include a direct explanation of the invalid field.