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.1 How it Works
- 2.2 Priorities and Hierarchies
- 2.3 Configuration Schemes
- 2.4 Comment Handling
- 2.5 Config Features
Part 3: Advanced Topics
- 3.1 Writing Configurations
- 3.2 Updates
- 3.3 Getting Information
- 3.4 Definitions and Valid Values
- 3.5 Handling Secrets
- 3.6 Windows Registry Access
- 3.7 Extensions and Advanced Use
- 3.8 Code Improvements and Best Practices