.sephera.toml
.sephera.toml
Section titled “.sephera.toml”Sephera currently supports repo-level configuration for the context command through a .sephera.toml file.
This page reflects the v0.3.x configuration model.
Discovery rules
Section titled “Discovery rules”When you run sephera context, the CLI behaves like this:
- if
--config <FILE>is provided, use only that file - if
--no-configis provided, skip config entirely - otherwise, start from
--pathand walk upward through parent directories looking for.sephera.toml
If no config file is found, Sephera falls back to built-in defaults.
Precedence
Section titled “Precedence”Configuration precedence is:
- built-in defaults
.sephera.toml- an optional named profile selected with
--profile - explicit CLI flags
Scalar values from CLI override config values. Repeated CLI lists are appended to list values from the config file and the selected profile.
Supported sections
Section titled “Supported sections”v0.3.x supports two configuration layers:
[context][profiles.<name>.context]
[context] defines shared defaults for the repository. [profiles.<name>.context] defines named overrides that can be activated with sephera context --profile <name>.
Annotated example
Section titled “Annotated example”[context]# Ignore low-signal paths. Globs match basenames, other patterns are regexes.ignore = ["target", "*.snap"]
# Prioritize these paths when building the context pack.focus = ["crates/sephera_core"]
# Optionally center the pack on Git changes.diff = "working-tree"
# Approximate token budget for the report.budget = "64k"
# Export format. Supported values are "markdown" and "json".format = "markdown"
# Optional output path. If omitted, the report is written to stdout.output = "reports/context.md"
[profiles.review.context]# Review can compare the current branch to a base ref.diff = "origin/master"focus = ["crates/sephera_core", "crates/sephera_cli"]budget = "32k"output = "reports/review.md"
[profiles.debug.context]# Debug can prefer JSON and keep a larger budget.budget = "96k"format = "json"output = "reports/debug.json"[context] field reference
Section titled “[context] field reference”ignore
Section titled “ignore”ignore is a list of patterns that should be excluded before context candidates are selected.
- patterns containing
*,?, or[are treated as globs - other values are compiled as regexes
- config-provided values are used first, then repeated CLI
--ignoreflags are appended
Example:
[context]ignore = ["target", "*.snap"]focus is a list of paths Sephera should prioritize when ranking files for the final context pack.
- focus paths are resolved relative to the directory containing
.sephera.toml - resolved focus paths must still remain inside the selected
--path - config focus entries are used first, then repeated CLI
--focusflags are appended
Example:
[context]focus = ["crates/sephera_core", "crates/sephera_cli"]diff tells context to prioritize files from Git changes.
Supported values:
"working-tree""staged""unstaged"- a single base ref such as
"origin/master"or"HEAD~1"
Semantics:
- the three built-in keywords are shortcuts for common working tree modes
- any other value is treated as a base ref and compared against
HEADthrough merge-base semantics - deleted files are counted in diff metadata but skipped from excerpts
- a CLI
--diffvalue overrides the config value
Example:
[context]diff = "working-tree"budget
Section titled “budget”budget controls the approximate token budget used by context.
Supported forms:
- integer values such as
32000 - shorthand strings such as
"32k"or"1m"
The budget is model-agnostic and approximate. It is used to bound excerpts and metadata, not to reproduce a provider-specific tokenizer exactly.
format
Section titled “format”format selects the output representation.
Supported values:
"markdown"for human-readable context packs"json"for machine-readable automation or downstream tools
If the CLI also specifies --format, the CLI wins.
output
Section titled “output”output is optional. When present, Sephera writes the result to that file instead of standard output.
- output paths in config are resolved relative to the directory containing
.sephera.toml - parent directories are created as needed
- a CLI
--outputvalue overrides the config value
Relative path behavior
Section titled “Relative path behavior”focusvalues in the config file are resolved relative to the directory containing.sephera.tomloutputis also resolved relative to the config file directory- resolved
focuspaths must still stay inside--path
If a focus path resolves outside the selected base path, Sephera fails fast with a clear error.
Profiles
Section titled “Profiles”Profiles let one repository keep multiple named context presets without repeating the same long CLI every time.
Each profile lives under:
[profiles.<name>.context]Examples:
[profiles.review.context]focus = ["crates/sephera_core"]budget = "32k"
[profiles.debug.context]budget = "96k"format = "json"Merge behavior
Section titled “Merge behavior”When you select a profile, Sephera merges values in this order:
- built-in defaults
[context][profiles.<name>.context]- explicit CLI flags
That means:
- profile scalar values such as
diff,budget,format, andoutputoverride[context] - profile list values such as
ignoreandfocusare appended after[context] - repeated CLI
--ignoreand--focusflags are appended last - explicit CLI scalars such as
--diff,--budget,--format, and--outputstill win over the selected profile
Listing profiles
Section titled “Listing profiles”Use the CLI to inspect available profiles:
sephera context --path . --list-profilesSelect one:
sephera context --path . --profile reviewWhat is intentionally not configurable yet
Section titled “What is intentionally not configurable yet”v0.3.x keeps the config surface narrow on purpose. The following are still CLI-only:
pathconfigno-config
That keeps config discovery and path resolution predictable while the command surface is still evolving.
CLI examples
Section titled “CLI examples”Use auto-discovery:
sephera context --path .Use an explicit config file:
sephera context --path . --config .sephera.tomlIgnore config and force CLI-only values:
sephera context --path . --no-config --budget 32kSelect a profile and still override one field from the CLI:
sephera context --path . --profile review --diff staged --budget 48k