Expand description
Configuration file (Runfile) discovery and loading.
Structs§
- Merge
Metadata - Metadata about which runfiles were loaded during a merge.
Constants§
- NO_
RUNFILE_ ERROR - Error message when no Runfile is found.
Functions§
- ensure_
mcp_ output_ dir - Compute (and memoize) the MCP output directory. Prefers env override, then Runfile dir, then temp.
- find_
project_ runfile_ path - Find the project Runfile path (searching upward from cwd). Returns None if no project Runfile is found (will not return ~/.runfile).
- find_
runfile_ path - Find the path to the Runfile without loading its contents.
Uses the same search logic as
load_config(). Returns Some(path) if found, None otherwise. - get_
custom_ runfile_ path - Get the custom runfile path if set
- get_
home_ dir - Get the user’s home directory in a cross-platform way.
- get_
mcp_ output_ dir - Get the MCP output directory if set, otherwise derives it and memoizes
- is_
mcp_ output_ configured - Check if MCP output directory is configured or derivable (env or Runfile)
- load_
config - Search for a Runfile in the current directory or upwards, then fallback to ~/.runfile. Returns Some(content) if a file is found (even if empty), or None if no file exists.
- load_
config_ or_ exit - Load config or exit with an error message.
- load_
from_ path - Load a Runfile from a specific path (file or directory) If path is a directory, looks for Runfile inside it Returns Some(content) if found, None otherwise
- load_
home_ runfile - Load ~/.runfile from the user’s home directory. Returns Some(content) if found, or None otherwise.
- load_
merged_ config - Load and merge both global (~/.runfile) and project (./Runfile) configurations. Returns the merged content with project functions taking precedence over global ones. Also returns metadata about which files were loaded.
- set_
custom_ runfile_ path - Set a custom runfile path for the current thread
- set_
mcp_ output_ dir - Set the MCP output directory for the current thread