{"id":15712338,"url":"https://github.com/thewebmasterp/config-modules","last_synced_at":"2025-07-22T21:04:37.540Z","repository":{"id":45792292,"uuid":"423088871","full_name":"thewebmasterp/config-modules","owner":"thewebmasterp","description":"Turning static config files into dynamic in a modular approach","archived":false,"fork":false,"pushed_at":"2022-07-22T19:02:18.000Z","size":30888,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T04:40:11.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thewebmasterp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-31T08:06:20.000Z","updated_at":"2025-03-08T05:31:51.000Z","dependencies_parsed_at":"2022-07-17T00:30:48.602Z","dependency_job_id":null,"html_url":"https://github.com/thewebmasterp/config-modules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thewebmasterp/config-modules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thewebmasterp%2Fconfig-modules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thewebmasterp%2Fconfig-modules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thewebmasterp%2Fconfig-modules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thewebmasterp%2Fconfig-modules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thewebmasterp","download_url":"https://codeload.github.com/thewebmasterp/config-modules/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thewebmasterp%2Fconfig-modules/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266022733,"owners_count":23865446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T21:15:39.924Z","updated_at":"2025-07-22T21:04:37.509Z","avatar_url":"https://github.com/thewebmasterp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# config-modules\n\nIs turning static config files into dynamic in a modular approach.\n\nWhat I mean by that?\n\nTake a static i3wm config file. You open it, change a bunch of\nvariables, save it, reload your config and this has changed your color\ntheme.🥱\n\nWhat if you could simply predefine little files (called modules), each\ncontaining the same variables holding different colors and then easily\nswitch between those modules, concatenated to your i3wm config? Or even\nturn whole parts of your config into individual modules that you can\napply by choice. This is where config-modules comes into play!😃\n\nHere's what I used it for: ![](./demonstration.gif)\n![](./demonstration2.gif)\n\n## How it works\n\nYou create a text file (called *static*). You create a folder containing\nmultiple text files (*modules*). Later, running this utility will allow\nyou to dynamically (or only via CLI options) choose which module to be\nconcatenated to the static file (to the top/to the bottom of the static\nfile, specified in a special config file called *entryconfig*) and it\nwill export the resulting concatenated file to a specified place\n(specified in the same *entryconfig*). This whooole thing is called an\n*entry*. An entry is simply a program you want to generate a config for\n(from static \u0026 modules). You can have multiple entries in the folder\nthat you specified via config-modules-dir slash entries.\n\nA visual example of what I just explained can be seen in\n[./examples/config-modules-dir](./examples).\n\n### entry vs module\n\nAn entry is a single program that has its own static file, entryconfig\nand modules directory containing the different modules that can be\nconcatenated to the static and exported on the specified in entryconfig\nplace. All of this is a single entry. It is located under its own\ndirectory residing in config-modules-dir slash entries.\n\n### config vs entryconfig\n\nThe config usually resides in\n`~/.config/config-modules/config-modules.yaml` and it is used to both\nset up how config-modules behaves as well as to store cache by the\nutility. It is self-explanatory, for info about each option look at\n[./config.yaml](./config.yaml).\n\nEntryconfig on the other hand is a per-entry config file. You use it to\nconfigure default entry behavior, the most important of which is where\nthe concatenated static + chosen module should be exported to (export-to\nproperty). An example entryconfig file is\n[./examples/config-modules-dir/entries/i3-wm/entryconfig.yaml](./examples/config-modules-dir/entries/i3-wm/entryconfig.yaml),\nself-explanatory as well.\n\n## Installation\n\nYou can install the package via\n[npm](https://www.npmjs.com/package/config-modules):\n\n``` shell\n$ npm install config-modules\n```\n\n## Initialize the config-modules-dir\n\nLook at [./examples/config-modules-dir](./examples/config-modules-dir)\nfor the file structure and configuration options you can define in\n*entryconfig*.\n\n## Initial run\n\nUpon its first run, specify which directory should be used as\nconfig-modules-dir, like that:\n\n``` shell\n$ config-modules --config-modules-dir ~/.config-modules-dir\n```\n\nIt will as well ask you whether you want it to generate a config file at\n`~/.config/config-modules/config-modules.yaml`. This config file is used\nboth for storing cache by config-modules and by you, to pass\nconfiguration parameters. Press Y to confirm. The default\nself-explanatory config file is available at\n[./config.yaml](./config.yaml).\n\n## Note\n\nBoth config and entryconfig are self-explanatory, meaning their few\nparameters are explained with comments in the files. Repeating\nparameters in entryconfig (if supported) have precedence over the ones\ndefined in the default config.\n\nFor more info, see `--help`.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthewebmasterp%2Fconfig-modules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthewebmasterp%2Fconfig-modules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthewebmasterp%2Fconfig-modules/lists"}