Module config

Module config 

Source
Expand description

Configuration management for grove.

Grove uses a layered configuration system:

  1. Global config (~/.config/grove/config.toml) — The project registry. Maps project names to repository paths, with optional database and hooks config.

  2. Repo config (.grove/config.toml in the repository root) — Per-repo defaults for database URLs, hooks, and environment variables. Committed to the repo so all contributors share the same base config.

  3. Environment variables (~/.config/grove/envs/) — Per-project and per-worktree env var overrides stored outside the repo. Worktree values override project values, which override repo defaults.

Structs§

Config
DatabaseConfig
EnvVars
HooksConfig
MergedEnvVar
Project
ProjectRef
RepoConfig

Enums§

EnvSource

Functions§

config_dir 🔒
config_path 🔒
env_path 🔒
envs_dir 🔒
export_merged_env
load_merged_env
merge_project
resolve_main_repo_from_dot_git_file 🔒
Resolve a git worktree’s .git file to find the main repository root.
resolve_main_repo_from_jj_workspace 🔒
Resolve a jj workspace’s .jj/repo symlink to find the main repository root.
resolve_project
Resolve a project by explicit name or auto-detection from cwd. Returns (name, project, repo_env_vars).
resolve_project_for_path
Resolve a project for a filesystem path (used by env export). Returns (name, project, worktree_name, repo_env_vars).
shell_escape 🔒
worktree_env_path 🔒

Type Aliases§

ResolvedProjectForPath
Resolved project info for a filesystem path.