mConfig Documentation¶
mConfig is a modular Java library for unified, portable configuration management. It abstracts OS-specific locations (e.g., ~/.config/, /etc/, Windows Registry), multiple sources (files, env vars, JAR resources, ZooKeeper), and formats (JSON, YAML, TOML, Properties, etc.).
The mConfig Tool is a powerful companion for exploring and managing these configurations from the command line.
Core Principle: Layered resolution stack prioritizes scopes (highest first):
graph LR
POLICY[POLICY<br/>Enforced/GPO] --> RUNTIME[RUNTIME<br/>Volatile RAM]
RUNTIME --> SESSION[SESSION<br/>Env/CLI]
SESSION --> USER[USER<br/>~/.config/]
USER --> APPLICATION[APPLICATION<br/>Portable/Install]
APPLICATION --> HOST[HOST<br/>/etc/, HKLM]
HOST --> CLUSTER[CLUSTER<br/>ZK/Networks]
CLUSTER --> CLOUD[CLOUD<br/>Providers]
CLOUD --> ORGANIZATION[ORGANIZATION<br/>Licensee]
ORGANIZATION --> PRODUCT[PRODUCT<br/>JAR Defaults]
classDef high fill:#ff9999
class POLICY,RUNTIME high
Ties within scope: Later-added > earlier; storage prio: RAM > secrets > files > registry > JAR.
Quick Start: What is mConfig? → Getting Started
Architecture: Design Consolidated
Part 1: Introduction & Basics¶
Part 2: Core Concepts¶
- 2.0 Scopes
- 2.1 How it Works
- 2.2 Priorities and Hierarchies
- 2.3 Configuration Schemas
- 2.4 Comment Handling
- 2.5 Config Features
- 2.6 Secrets Concept
Part 3: Advanced Topics¶
- 3.1 Writing Configurations
- 3.2 Updates
- 3.3 Getting Information
- 3.4 Definitions and Valid Values
- 3.5 Config Events
- 3.6 Handling Secrets
- 3.7 Windows Registry Access
- 3.8 Extensions and Advanced Use
- 3.9 Utilities and Adapters
- 3.10 Better Practice: Replace This With That
- 3.11 Experimental POJO Mapping
Part 4: Reference¶
- 4.1 mConfig Tool
- 4.2 Logging
- 4.3 FAQ
- 4.4 Design Consolidated
- 4.5 Versions
- 4.6 Snippets Reference (code templates to copy: examples/snippets.md)
- Examples