MCPcopy Index your code
hub / github.com/creditkarma/dynamic-config

github.com/creditkarma/dynamic-config @v1.1.1-0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.1-0 ↗ · + Follow
329 symbols 664 edges 56 files 16 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Dynamic Config

A dynamic configuration library for Node.js written in TypeScript.

Application configuration can be an unnecessarily complicated problem when working in large distributed systems across multiple runtimes. Gaining consensus about what configuration needs to do, what it needs to look like and how it interfaces with a specific runtime can be nearly impossible. Dynamic Config is designed to be highly adaptable to a variety of requirements. It is built on a plugin architecture that allows it to be adapted further. Beyond this, it handles local configuration files in a way consistent with other popular Node config libraries.

Plugable

Plugins for Dynamic Config provide extensible support for loading local file types, talking to remote data stores and transforming/validating config structures.

File Types

Support for config file types is added through plugins. Dynamic Config comes with plugins for js, ts, json and yaml files. It is easy to add support for additional file types.

Remote Data Sources

Dynamic Config also supports remote data sources through plugins. The included plugins include clients for pulling values from Hashicorp Consul and Vault. The plugin interface is also used for adding support for environment variables and command line arguments.

Transformation

The third kind of plugin is something we call a translator. When raw config values are loaded, either form local files or remote sources, you can use translators to transform the structure of the raw data before it is added to the resolved config object.

Validation

The fourth thing we can do is validate the structure of our config. This is done by mapping keys in the config to JSON schema.

Promise-based

When requesting a value from Dynamic Config a Promise of the expected result is returned. If the value is found the Promise is resolved. If the value is not found, either because it is missing or some other error, the Promise is rejected with an error describing why the value may be missing.

Table of Contents

Contributing

For more information about contributing new features and bug fixes, see our Contribution Guidelines.

License

This project is licensed under Apache License Version 2.0

Extension points exported contracts — how you extend this code

IConfigStore (Interface)
(no doc) [3 implementers]
src/main/types.ts
IConsulClient (Interface)
(no doc)
src/tests/integration/resolvers/customConsul.ts
IDynamicConfig (Interface)
(no doc) [2 implementers]
src/main/types.ts
IProjectConfig (Interface)
(no doc)
src/tests/integration/config/default.ts
IRemoteResolver (Interface)
(no doc) [1 implementers]
src/main/types.ts
ILoaderConfig (Interface)
(no doc)
src/main/ConfigLoader.ts
ILogger (Interface)
(no doc)
src/main/types.ts

Core symbols most depended-on inside this repo

get
called by 77
src/main/types.ts
map
called by 29
src/main/Maybe.ts
log
called by 22
src/main/types.ts
warn
called by 18
src/main/types.ts
join
called by 16
src/main/Maybe.ts
fork
called by 13
src/main/Maybe.ts
error
called by 13
src/main/types.ts
isObject
called by 12
src/main/utils/basic.ts

Shape

Function 136
Method 94
Interface 51
Class 47
Enum 1

Languages

TypeScript100%

Modules by API surface

src/main/types.ts61 symbols
src/main/errors/index.ts53 symbols
src/main/Maybe.ts32 symbols
src/main/DynamicConfig.ts23 symbols
src/main/utils/config.ts16 symbols
src/main/utils/basic.ts16 symbols
src/main/utils/promises.ts10 symbols
src/main/utils/object.ts10 symbols
src/main/translators/env.ts10 symbols
src/tests/integration/resolvers/customConsul.ts9 symbols
src/main/resolvers/consul.ts9 symbols
src/main/ConfigLoader.ts8 symbols

For agents

$ claude mcp add dynamic-config \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page