{"id":51002590,"url":"https://github.com/muhammad-fiaz/configforge-lua","last_synced_at":"2026-06-20T16:32:39.386Z","repository":{"id":332298722,"uuid":"1133338570","full_name":"muhammad-fiaz/configforge-lua","owner":"muhammad-fiaz","description":"An open-source CLI tool to convert configuration files between formats.","archived":false,"fork":false,"pushed_at":"2026-01-13T08:04:48.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-22T15:40:31.852Z","etag":null,"topics":["config-forge","configforce","convert-files","converter","converter-app","lua","lua-application","lua-programming","lua-script"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/muhammad-fiaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["muhammad-fiaz"],"ko_fi":"muhammadfiaz","custom":["https://pay.muhammadfiaz.com"]}},"created_at":"2026-01-13T08:00:38.000Z","updated_at":"2026-01-13T08:06:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/muhammad-fiaz/configforge-lua","commit_stats":null,"previous_names":["muhammad-fiaz/configforge-lua"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/muhammad-fiaz/configforge-lua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2Fconfigforge-lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2Fconfigforge-lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2Fconfigforge-lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2Fconfigforge-lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhammad-fiaz","download_url":"https://codeload.github.com/muhammad-fiaz/configforge-lua/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammad-fiaz%2Fconfigforge-lua/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34578089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["config-forge","configforce","convert-files","converter","converter-app","lua","lua-application","lua-programming","lua-script"],"created_at":"2026-06-20T16:32:38.469Z","updated_at":"2026-06-20T16:32:39.371Z","avatar_url":"https://github.com/muhammad-fiaz.png","language":"Lua","funding_links":["https://github.com/sponsors/muhammad-fiaz","https://ko-fi.com/muhammadfiaz","https://pay.muhammadfiaz.com"],"categories":[],"sub_categories":[],"readme":"# ConfigForge\n\nAn open-source CLI tool to convert configuration files between formats.  \n\n\n## Supported Formats\n\n- **JSON** (`.json`) - Strict standard JSON.\n- **YAML** (`.yaml`, `.yml`) - Block and flow styles supported.\n- **TOML** (`.toml`) - Standard sections and key-value pairs.\n- **ENV** (`.env`) - Key-value environment variables with nesting support via delimiters.\n\n## Prerequisites\n\n- **Lua 5.4**: The tool requires Lua 5.4 runtime environment.\n  - Windows: [Lua Binaries](http://luabinaries.sourceforge.net/)\n  - Linux: `sudo apt install lua5.4`\n  - macOS: `brew install lua`\n  \n## Installation\n\n1.  **Clone the repository:**\n    ```bash\n    git clone https://github.com/muhammad-fiaz/configforge-lua.git\n    cd configforge-lua\n    ```\n\n2.  **Verify Installation:**\n    Run the help command (or run without arguments) to verify:\n    ```bash\n    lua configforge.lua\n    ```\n\n## Usage and Examples\n\nThe tool officially supports **Any-to-Any** conversion. You can convert from any supported format to any other supported format.\n\n### 1. Example Files\n\nCreate an `example.json` file with the following content:\n\n```json\n{\n  \"app\": {\n    \"name\": \"ConfigForge\",\n    \"version\": \"1.0.0\",\n    \"debug\": true,\n    \"port\": 8080\n  },\n  \"database\": {\n    \"host\": \"localhost\",\n    \"retries\": 3\n  },\n  \"features\": [\n    \"conversion\",\n    \"validation\",\n    \"diff\"\n  ]\n}\n```\n\n### 2. Format Conversion\n\n**Common Conversions (JSON Source)**\n```bash\nlua configforge.lua convert example.json example.yaml\nlua configforge.lua convert example.json example.toml\nlua configforge.lua convert example.json example.env\n```\n\n**Any-to-Any Examples**\nIt is valid to convert between any pair of formats:\n\n*YAML to TOML*\n```bash\nlua configforge.lua convert example.yaml output.toml\n```\n\n*ENV to JSON*\n```bash\nlua configforge.lua convert example.env output.json\n```\n\n*TOML to YAML*\n```bash\nlua configforge.lua convert example.toml output.yaml\n```\n\n**Note on ENV Files**: \nWhen converting *to* ENV, nested structures are flattened (e.g., `app.port` become `APP_PORT`). \nWhen converting *from* ENV, this flat structure is preserved as keys (e.g., `APP_PORT` remains `APP_PORT`).\n\n### 3. Validation\n\nCheck if a file has valid syntax.\n\n```bash\nlua configforge.lua validate example.json\n# Output: Valid json syntax.\n```\n\n### 4. Diff Mode\n\nCompare two configuration files to see structural differences. This works across different formats.\n\n**Compare JSON vs YAML:**\n```bash\nlua configforge.lua diff example.json example.yaml\n```\n*Output (if identical):*\n(No output means files are structurally identical)\n\n**Compare ENV vs TOML:**\n```bash\nlua configforge.lua diff example.env example.toml\n```\n\n## Command Reference\n\n| Command | Syntax | Description |\n|---------|--------|-------------|\n| `convert` | `convert \u003cinput\u003e \u003coutput\u003e` | Convert file format. Supports JSON, YAML, TOML, ENV. |\n| `validate` | `validate \u003cfile\u003e` | Validate file syntax. |\n| `diff` | `diff \u003cfile1\u003e \u003cfile2\u003e` | Compare two files structurally. |\n\n## Exit Codes\n\n| Code | Description |\n|------|-------------|\n| `0`  | Success |\n| `1`  | Generic Failure / Runtime Error |\n| `2`  | Usage Error (Invalid arguments) |\n| `3`  | I/O Error (File not found, permission denied) |\n| `4`  | Parse Error (Invalid syntax in config file) |\n\n## Project Structure\n\n```\nconfigforge-lua/\n├── configforge.lua   # Entry point\n├── main.lua          # Wrapper entry point\n├── LICENSE           # MIT License\n├── README.md         # Documentation\n└── src/\n    ├── cli.lua           # CLI Logic\n    ├── detect.lua        # Format detection\n    ├── diff.lua          # Diff logic\n    ├── errors.lua        # Error handling\n    ├── parser_*.lua      # For JSON, YAML, TOML, ENV\n    └── writer_*.lua      # For JSON, YAML, TOML, ENV\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammad-fiaz%2Fconfigforge-lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhammad-fiaz%2Fconfigforge-lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammad-fiaz%2Fconfigforge-lua/lists"}