Skip to content

feat: add system config layers and env-var overrides - #41

Merged
alecthomas merged 1 commit into
mainfrom
aat/system-config-layers
Jul 2, 2026
Merged

alecthomas merged 1 commit into
mainfrom
aat/system-config-layers

Conversation

@alecthomas

Copy link
Copy Markdown
Collaborator

Merge system-wide configs from /etc and /usr/local/etc beneath the
user config, searched via the standard lefthook config names. The
searched directories are configurable through a repeatable
--system-config flag (defaulting to those two paths).

Rename --global-config to --user-config, keeping --global-config as a
hidden alias for backward compatibility.

Wire the global flags to LHM_-prefixed environment variables
(LHM_DEBUG, LHM_USER_CONFIG, LHM_LOCAL_CONFIG, LHM_SYSTEM_CONFIG) via
clap's env support, restoring config overrides during git-triggered
hook runs.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Merge system-wide configs from /etc and /usr/local/etc beneath the
user config, searched via the standard lefthook config names. The
searched directories are configurable through a repeatable
--system-config flag (defaulting to those two paths).

Rename --global-config to --user-config, keeping --global-config as a
hidden alias for backward compatibility.

Wire the global flags to LHM_-prefixed environment variables
(LHM_DEBUG, LHM_USER_CONFIG, LHM_LOCAL_CONFIG, LHM_SYSTEM_CONFIG) via
clap's env support, restoring config overrides during git-triggered
hook runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alecthomas
alecthomas enabled auto-merge (squash) July 2, 2026 05:23
@alecthomas
alecthomas merged commit 2380c63 into main Jul 2, 2026
4 checks passed
@alecthomas
alecthomas deleted the aat/system-config-layers branch July 2, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant