Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By bitranoxv9.0.4MITIn 1 marketplace
Load layered, cross-platform application configuration in Python (defaults, app, host, user, .env, environment variables) merged into one immutable object with provenance and profiles. Ships the python-layered-config skill: install and use the library and CLI, design config files, compute env-var override names, manage per-OS paths and profiles, and find out which layer and file a setting came from.
Claude loads one when your task matches it, or you run it by name.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Here is the odd thing about configuration bugs: hardly any of them are about the value. They are about authorship. By the time a setting reaches your program it has passed through as many as six hands - the defaults you shipped, a file in /etc, a per-host tweak, something in the user's home directory, a .env, and an environment variable a colleague exported months ago and forgot - and any hand along the way may have changed it. The number you finally read is the last whisper in a long game of telephone, and the library you read it with took no notes. So when the value is wrong, you are not debugging code. You are interviewing witnesses.
The sensible-looking shortcuts are exactly the ones that turn on you:
os.environ.get("TIMEOUT", 30) in one module and a config.toml in another, and the real timeout is settled by whichever line ran first. Nobody wins the argument; nobody is even told there was one./etc/myapp/ because that is plainly where config lives - on Linux. On the macOS and Windows machines that make up most of your users, it lives somewhere else entirely."false" from a file as a boolean; a non-empty string is truthy, so you have just shipped with the safety switched off.None of these are hard to fix once. They are hard to fix forever, because the single fact you need the moment it breaks - who set this value, and from where - was thrown away at the door.
lib_layered_config begins with the part every other approach discards: the paperwork. It deep-merges the six layers - defaults -> app -> host -> user -> dotenv -> env - into one immutable object, in a precedence that never shifts, and it keeps the receipt. Ask for a value and it answers; ask where the value came from and it names the exact layer and file. The witness interview collapses into a lookup.
What that buys you:
read_config(...) returns a Config nothing downstream can mutate, so your program cannot quietly begin to disagree with itself. A nested table or list you read comes back as your own copy, and the Config itself supports copy.deepcopy and pickle, so it can be cloned or sent to another process.config.origin("service.timeout") reports the layer and the path it came from. Debugging stops being a seance./etc into your code.profile="production" and you get production's config, not a hand-merged guess at it..env outrank the committed config, which therefore holds shape rather than passwords - and the CLI masks them on the way out unless asked not to (--no-redact).Same engine from either side: from lib_layered_config import read_config as a library, or a lib_layered_config command that reads, deploys, and scaffolds configuration without a line of Python.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub bitranox/lib_layered_config --plugin lib_layered_configPlugins from other owners that cover similar ground