sage-config-system

Merge Sage configuration from defaults, files, environment variables, and CLI overrides.

12|1|Updated Jul 15, 2025
One-click install
npx skills add https://github.com/majiayu000/sage --skill sage-config-system
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sage-config-system
Source: https://github.com/majiayu000/sage/tree/main/.sage/skills/sage-config-system
Command: npx skills add https://github.com/majiayu000/sage --skill sage-config-system

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Sage's configuration system provides a unified foundation to load, merge, and validate settings from multiple sources, including defaults, project and global configs, environment variables, and CLI arguments.

Core Features & Use Cases

  • Multi-source loading: deterministic merging across defaults, project/global config, environment, and CLI overrides.
  • Credential management: centralized resolution and injection of credentials into runtime configuration.
  • Validation & persistence: enforce rules, support runtime updates, and persist changes to config and credentials.

Quick Start

Example: Create a config pipeline with Default -> Global File -> Project File -> Env -> CLI Args, then call load() to obtain a validated Config.

Frequently Asked Questions about sage-config-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge configuration from multiple sources like environment variables and CLI overrides?

Multi-source configuration merging applies a deep-merge behavior across defaults, project/global files, environment variables, and CLI overrides to produce a unified runtime state.

What is the best way to manage credentials in a multi-environment configuration setup?

Credential management in a multi-environment setup uses centralized resolution and injection of credentials into the runtime configuration, supporting consistent operation across development, staging, and production.

How do I validate runtime configuration and persist changes across environments?

To validate runtime configuration and persist changes, you enforce validation rules during the loading phase and utilize runtime persistence modules to save configuration and credential updates.

Can I configure a deterministic config pipeline for development, staging, and production?

Yes, you can configure a deterministic pipeline by layering defaults, global files, project files, environment variables, and CLI arguments to support consistent operation across development, staging, and production.

Why does my deep-merged configuration not reflect CLI overrides correctly?

Deep-merged configuration may not reflect CLI overrides correctly if the deterministic loading pipeline is misconfigured, requiring verification of the ConfigLoader's source priority and validation rules.