{"id":35694205,"url":"https://ebogdum.github.io/konfigo/","last_synced_at":"2026-01-12T00:01:03.364Z","repository":{"id":299011600,"uuid":"1001813760","full_name":"ebogdum/konfigo","owner":"ebogdum","description":"Konfigo is a powerful command-line tool designed to work with multiple configuration file formats like JSON, YAML, TOML, .env","archived":false,"fork":false,"pushed_at":"2025-12-22T01:18:01.000Z","size":6805,"stargazers_count":15,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-09T10:59:43.733Z","etag":null,"topics":["awesome","awesome-go","configuation","configuration-as-code","configuration-management","configuration-management-system","configuration-parser","go","golang","json-configuration","json-configurations","toml-config","toml-configuration","yaml-config","yaml-configuration","ycombinator","ycombinator-hacker-news"],"latest_commit_sha":null,"homepage":"https://ebogdum.github.io/konfigo/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ebogdum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-14T04:50:02.000Z","updated_at":"2025-08-12T14:12:06.000Z","dependencies_parsed_at":"2025-06-14T06:20:45.675Z","dependency_job_id":"a9936a35-e58d-4e02-8014-c6d7799a962d","html_url":"https://github.com/ebogdum/konfigo","commit_stats":null,"previous_names":["ebogdum/konfigo"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ebogdum/konfigo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebogdum%2Fkonfigo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebogdum%2Fkonfigo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebogdum%2Fkonfigo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebogdum%2Fkonfigo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebogdum","download_url":"https://codeload.github.com/ebogdum/konfigo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebogdum%2Fkonfigo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28328640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T22:11:01.104Z","status":"ssl_error","status_checked_at":"2026-01-11T22:10:58.990Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["awesome","awesome-go","configuation","configuration-as-code","configuration-management","configuration-management-system","configuration-parser","go","golang","json-configuration","json-configurations","toml-config","toml-configuration","yaml-config","yaml-configuration","ycombinator","ycombinator-hacker-news"],"created_at":"2026-01-06T00:01:19.646Z","updated_at":"2026-01-12T00:01:03.326Z","avatar_url":"https://github.com/ebogdum.png","language":"Go","funding_links":[],"categories":["Documentation"],"sub_categories":["Format Migration"],"readme":"# Konfigo: Versatile Configuration Management\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"konfigo_logo.png\" alt=\"Konfigo Logo\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nKonfigo is a powerful command-line tool designed to streamline your configuration workflow. It excels at reading various configuration file formats (JSON, YAML, TOML, .env), merging them intelligently, and processing the combined data against a user-defined schema for validation, transformation, variable substitution, and even batch output generation.\n\nWhether you're managing simple settings or complex, multi-layered configurations with environment-specific overrides, Konfigo provides the tools to do so efficiently and reliably.\n\n## Key Features\n\n*   **Multi-Format Support**: Reads and writes JSON, YAML, TOML, and .env files.\n*   **Flexible Merging**: Intelligently merges multiple configuration sources, respecting order and immutability rules.\n*   **Powerful Schema Processing**:\n    *   **Variable Substitution**: Inject dynamic values from environment variables (`KONFIGO_VAR_...`), dedicated variable files (`-V`), or schema defaults.\n    *   **Data Generation**: Create new configuration values (e.g., `concat`, `timestamp`, `random`, `id`).\n    *   **Data Transformation**: Modify keys and values (e.g., `renameKey`, `changeCase`, `addKeyPrefix`, `addKeySuffix`, `deleteKey`, `trim`, `replaceKey`, `setValue`).\n    *   **Data Validation**: Enforce rules (`required`, `type`, `min`, `max`, `minLength`, `enum`, `regex`).\n    *   **Input/Output Schemas**: Validate incoming data and filter outgoing data against defined structures.\n*   **Batch Processing**: Use the `konfigo_forEach` directive in a variables file to generate multiple tailored configuration outputs from a single schema and run.\n*   **Environment Variable Integration**:\n    *   Override any configuration value directly using `KONFIGO_KEY_path.to.key=value`.\n*   **Comprehensive CLI**: Rich set of command-line options for fine-grained control over input, output, and processing behavior.\n\n## Getting Started\n\n### 1. Installation\n\nThe primary way to install Konfigo is downloading a pre-built binary from the release page:\n\n[Releases](https://github.com/ebogdum/konfigo/releases)\n\nFor other installation methods, please refer to the [Installation Guide](docs_markdown/installation.md) in our documentation.\n\n### 2. Basic Usage\n\nMerge two configuration files (`config.json` and `overrides.yml`) and output the result to `final.yml`:\n\n```bash\nkonfigo -s config.json,overrides.yml -of final.yml\n```\n\n### 3. Using a Schema\n\nMerge `config.json`, process it with `schema.yml`, use variables from `staging-vars.yml`, and output to `staging_config.json`:\n\n```bash\nkonfigo -s config.json -S schema.yml -V staging-vars.yml -of staging_config.json\n```\n\n## Feature Examples\n\nHere are minimal examples for each of Konfigo's key features.\n\n### Multi-Format Support\n\nConvert `config.json` to `config.yml`.\n\n**`config.json`**\n```json\n{\n  \"key\": \"value\"\n}\n```\n\n**Command**\n```bash\nkonfigo -s config.json -of config.yml\n```\n\n**`config.yml` (Output)**\n```yaml\nkey: value\n```\n\n### Flexible Merging\n\nMerge two JSON files, where keys in the second file override the first.\n\n**`config1.json`**\n```json\n{\n  \"a\": 1,\n  \"b\": 2\n}\n```\n\n**`config2.json`**\n```json\n{\n  \"b\": 3,\n  \"c\": 4\n}\n```\n\n**Command**\n```bash\nkonfigo -s config1.json,config2.json\n```\n\n**Output (JSON)**\n```json\n{\n  \"a\": 1,\n  \"b\": 3,\n  \"c\": 4\n}\n```\n\n### Powerful Schema Processing\n\n#### Variable Substitution\n\nSubstitute a variable from a file into the configuration.\n\n**`config.json`**\n```json\n{\n  \"greeting\": \"Hello, ${user.name}\"\n}\n```\n\n**`vars.yml`**\n```yaml\nuser:\n  name: World\n```\n\n**Command**\n```bash\nkonfigo -s config.json -V vars.yml\n```\n\n**Output (JSON)**\n```json\n{\n  \"greeting\": \"Hello, World\"\n}\n```\n\n#### Data Generation\n\nGenerate a new value using a schema.\n\n**`schema.yml`**\n```yaml\nkonfigo_schema:\n  properties:\n    request_id:\n      konfigo_generate:\n        type: id\n        id_type: uuid\n```\n\n**Command**\n```bash\nkonfigo -S schema.yml\n```\n\n**Output (JSON)**\n```json\n{\n  \"request_id\": \"...some generated uuid...\"\n}\n```\n\n#### Data Transformation\n\nRename a key using a schema.\n\n**`config.json`**\n```json\n{\n  \"old_key\": \"value\"\n}\n```\n\n**`schema.yml`**\n```yaml\nkonfigo_schema:\n  properties:\n    old_key:\n      konfigo_transform:\n        - type: renameKey\n          new_key: new_key\n```\n\n**Command**\n```bash\nkonfigo -s config.json -S schema.yml\n```\n\n**Output (JSON)**\n```json\n{\n  \"new_key\": \"value\"\n}\n```\n\n#### Data Validation\n\nValidate that a required key is present.\n\n**`config.json`**\n```json\n{\n  \"other_key\": \"value\"\n}\n```\n\n**`schema.yml`**\n```yaml\nkonfigo_schema:\n  properties:\n    required_key:\n      konfigo_validate:\n        - type: required\n```\n\n**Command**\n```bash\nkonfigo -s config.json -S schema.yml\n```\n\n**Output**\n```\nError: Validation failed: required_key is required\n```\n\n### Batch Processing\n\nGenerate multiple output files from a list of variables.\n\n**`vars.yml`**\n```yaml\nkonfigo_forEach:\n  - user: alice\n  - user: bob\n```\n\n**`schema.yml`**\n```yaml\nkonfigo_schema:\n  properties:\n    username:\n      konfigo_set:\n        value: ${user}\n```\n\n**Command**\n```bash\nkonfigo -S schema.yml -V vars.yml -of output/${user}.json\n```\n\n**Output**\n*   `output/alice.json` with `{\"username\": \"alice\"}`\n*   `output/bob.json` with `{\"username\": \"bob\"}`\n\n### Environment Variable Integration\n\nOverride a configuration value from an environment variable.\n\n**`config.json`**\n```json\n{\n  \"database\": {\n    \"host\": \"localhost\"\n  }\n}\n```\n\n**Command**\n```bash\nexport KONFIGO_KEY_database.host=prod.db.server\nkonfigo -s config.json\n```\n\n**Output (JSON)**\n```json\n{\n  \"database\": {\n    \"host\": \"prod.db.server\"\n  }\n}\n```\n\n## Command-Line Options\n\nBelow is a summary of the available command-line options. For more details, run `konfigo -h`.\n\n**Input \u0026 Sources**\n\n| Flag(s)                 | Description                                                                 |\n|-------------------------|-----------------------------------------------------------------------------|\n| `-s \u003cpaths\u003e`            | Comma-separated list of source files/directories. Use '-' for stdin.        |\n| `-r`                    | Recursively search for configuration files in subdirectories.               |\n| `-sj`                   | Force input to be parsed as JSON (required for stdin).                      |\n| `-sy`                   | Force input to be parsed as YAML (required for stdin).                      |\n| `-st`                   | Force input to be parsed as TOML (required for stdin).                      |\n| `-se`                   | Force input to be parsed as ENV (required for stdin).                       |\n| `-si`                   | Force input to be parsed as INI (required for stdin).                       |\n\n**Schema \u0026 Variables**\n\n| Flag(s)                 | Description                                                                 |\n|-------------------------|-----------------------------------------------------------------------------|\n| `-S, --schema \u003cpath\u003e`   | Path to a schema file for processing the config.                            |\n| `-V, --vars-file \u003cpath\u003e`| Path to a file providing high-priority variables.                           |\n\n**Output \u0026 Formatting**\n\n| Flag(s)                 | Description                                                                 |\n|-------------------------|-----------------------------------------------------------------------------|\n| `-of \u003cpath\u003e`            | Write output to file. Extension determines format, or use with -oX flags.   |\n| `-oj`                   | Output in JSON format.                                                      |\n| `-oy`                   | Output in YAML format.                                                      |\n| `-ot`                   | Output in TOML format.                                                      |\n| `-oe`                   | Output in ENV format.                                                       |\n| `-oi`                   | Output in INI format.                                                       |\n\n**Behavior \u0026 Logging**\n\n| Flag(s)                 | Description                                                                 |\n|-------------------------|-----------------------------------------------------------------------------|\n| `-c`                    | Use case-sensitive key matching (default is case-insensitive).              |\n| `-v`                    | Enable informational (INFO) logging. Overrides default quiet behavior.      |\n| `-d`                    | Enable debug (DEBUG and INFO) logging. Overrides -v and default quiet behavior. |\n| `-h`                    | Show this help message.                                                     |\n\n## Documentation\n\nFor detailed information on all features, CLI options, and schema capabilities, please visit our full documentation site:\n\n**[Konfigo Documentation Site](https://ebogdum.github.io/konfigo/)**\n\nAlternatively, you can browse the Markdown files directly in the [`/docs_markdown`](docs_markdown) directory.\n\nKey sections:\n*   [User Guide](docs_markdown/guide/index.md)\n*   [Schema Guide](docs_markdown/schema/index.md)\n\n## Contributing\n\nContributions are welcome!\n\n## License\n\nKonfigo is licensed under the [MIT License](./LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/ebogdum.github.io%2Fkonfigo%2F","html_url":"https://awesome.ecosyste.ms/projects/ebogdum.github.io%2Fkonfigo%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/ebogdum.github.io%2Fkonfigo%2F/lists"}