{"library":"merge-json-cli","title":"Merge JSON CLI Tool","description":"The `merge-json-cli` package (current stable version 1.0.4) is a lean command-line utility designed for merging multiple JSON files into a single output. It introduces a custom \"spread syntax\" (`\"...\"`) directly within JSON objects and arrays, allowing developers to declaratively reference external JSON files or specific paths within them using JSON pointers. This enables dynamic composition of complex configurations from modular JSON fragments. The tool supports both object and array merging, including the use of glob patterns for array-based merges. As a CLI tool, its release cadence is driven by feature enhancements and bug fixes rather than a fixed schedule. Its primary differentiator is the in-JSON spread syntax, providing an intuitive way to manage hierarchical data structures across multiple files. It requires Node.js version 18.3.0 or higher.","language":"javascript","status":"active","last_verified":"Thu Apr 23","install":{"commands":["npm install merge-json-cli"],"cli":{"name":"merge-json","version":null}},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"npx merge-json-cli --in ./input.json --out ./output.json\n\n# Example input.json:\n# {\n#     \"configName\": \"MyApp\",\n#     \"version\": \"1.0.0\",\n#     \"...\": \"./features.json\",\n#     \"settings\": {\n#         \"theme\": \"dark\"\n#     }\n# }\n\n# Example features.json (referenced by input.json):\n# {\n#     \"featureA\": true,\n#     \"featureB\": false\n# }\n\n# The command will merge input.json, incorporating features.json,\n# and write the result to output.json.","lang":"bash","description":"Demonstrates how to run the `merge-json-cli` tool directly using `npx` to merge an input JSON file that references another JSON file via its custom spread syntax, outputting the consolidated result.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}