Skip to main content

Module config

Module config 

Source
Expand description

TOML configuration: parsing, walks-up discovery, and merging.

Discovery rules:

  1. Start at the working directory and walk up to the filesystem root, collecting any .shell-mcp.toml files we find. (We do not stop at git boundaries — a project may legitimately live outside a git repo.)
  2. Then add ~/.shell-mcp.toml if present, treating it as the outermost (lowest precedence) config.
  3. Merge order: outermost first, innermost last. Innermost wins for extend = false semantics; rules accumulate.

For v0.1 a config has a single field, allow, which is a list of shell-style pattern strings. A future version may grow deny, env, or cwd overrides.

Structs§

Config
Raw on-disk schema for a single .shell-mcp.toml file.
ConfigCache
Cache so that repeated calls with the same (root, cwd) skip filesystem I/O.
LoadedConfig
The result of resolving config for a particular working directory.

Enums§

ConfigError

Functions§

resolve
Compose a LoadedConfig from the given working directory.