{"id":28446944,"url":"https://github.com/os-js/osjs-json-config-cli","last_synced_at":"2025-06-30T06:32:42.391Z","repository":{"id":57134352,"uuid":"137615231","full_name":"os-js/osjs-json-config-cli","owner":"os-js","description":"Provices facility to maintain configuration files in JSON for OS.js","archived":false,"fork":false,"pushed_at":"2020-12-23T01:13:26.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T11:08:49.350Z","etag":null,"topics":["osjs","osjs-cli"],"latest_commit_sha":null,"homepage":"https://manual.os-js.org/v3/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/os-js.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"andersevenrud","patreon":"andersevenrud","open_collective":"osjs","liberapay":"os-js","custom":"https://paypal.me/andersevenrud"}},"created_at":"2018-06-16T22:52:12.000Z","updated_at":"2020-12-23T01:13:25.000Z","dependencies_parsed_at":"2022-09-04T07:31:23.547Z","dependency_job_id":null,"html_url":"https://github.com/os-js/osjs-json-config-cli","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/os-js/osjs-json-config-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-json-config-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-json-config-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-json-config-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-json-config-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/os-js","download_url":"https://codeload.github.com/os-js/osjs-json-config-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/os-js%2Fosjs-json-config-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260979057,"owners_count":23091925,"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":["osjs","osjs-cli"],"created_at":"2025-06-06T11:08:52.555Z","updated_at":"2025-06-30T06:32:42.378Z","avatar_url":"https://github.com/os-js.png","language":"JavaScript","funding_links":["https://github.com/sponsors/andersevenrud","https://patreon.com/andersevenrud","https://opencollective.com/osjs","https://liberapay.com/os-js","https://paypal.me/andersevenrud","https://www.patreon.com/user?u=2978551\u0026ty=h\u0026u=2978551","https://liberapay.com/os-js/"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"OS.js Logo\" src=\"https://raw.githubusercontent.com/os-js/gfx/master/logo-big.png\" /\u003e\n\u003c/p\u003e\n\n[OS.js](https://www.os-js.org/) is an [open-source](https://raw.githubusercontent.com/os-js/OS.js/master/LICENSE) web desktop platform with a window manager, application APIs, GUI toolkit, filesystem abstractions and much more.\n\n[![Support](https://img.shields.io/badge/patreon-support-orange.svg)](https://www.patreon.com/user?u=2978551\u0026ty=h\u0026u=2978551)\n[![Support](https://img.shields.io/badge/opencollective-donate-red.svg)](https://opencollective.com/osjs)\n[![Donate](https://img.shields.io/badge/liberapay-donate-yellowgreen.svg)](https://liberapay.com/os-js/)\n[![Donate](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://paypal.me/andersevenrud)\n\n# OS.js JSON Configuration CLI Module\n\nProvices facility to maintain configuration files in JSON for OS.js.\n\nUseful to automate writing configuration files via CLI commands.\n\n## Installation\n\n```shell\nnpm install @osjs/json-config-cli\n```\n\n## Usage\n\nIn your CLI bootstrap file (`src/cli/index.js`):\n\n```javasript\nconst json = require('@osjs/osjs-json-config-cli');\n\nmodule.exports = {\n  tasks: [json]\n};\n```\n\nTo use a JSON file in your OS.js distro, ex `src/client/config.js`:\n\n```javasript\nimport json from '../config.json';\n\n// THIS IS JUST AN EXAMPLE. YOU PROBABLY WANT TO USE 'deepmerge' OR SOMETHING SIMILAR.\nmodule.exports = Object.assign({\n  // Your configuration\n}, json);\n\n```\n\n\u003e By default the configuration file is `src/config.json`, but you can specify this with `--config`.\n\nYou now have these tasks available:\n\n* `config:json:get` - Get entire configuration tree\n* `config:json:get --key=\u003cstring\u003e` - Get given key\n* `config:json:set --key=\u003cstring\u003e --value=\u003c*\u003e` - Sets a value\n* `config:json:push --key=\u003cstring\u003e --value=\u003c*\u003e` - Adds a value to an array\n* `config:json:remove --key=\u003cstring\u003e` -- Removes an entry\n\nSee [simplejsonconf](https://github.com/andersevenrud/simplejsonconf) for more information about how this works.\n\n## Contribution\n\n* **Sponsor on [Github](https://github.com/sponsors/andersevenrud)**\n* **Become a [Patreon](https://www.patreon.com/user?u=2978551\u0026ty=h\u0026u=2978551)**\n* **Support on [Open Collective](https://opencollective.com/osjs)**\n* [Contribution Guide](https://github.com/os-js/OS.js/blob/master/CONTRIBUTING.md)\n\n## Documentation\n\nSee the [Official Manuals](https://manual.os-js.org/) for articles, tutorials and guides.\n\n## Links\n\n* [Official Chat](https://gitter.im/os-js/OS.js)\n* [Community Forums and Announcements](https://community.os-js.org/)\n* [Homepage](https://os-js.org/)\n* [Twitter](https://twitter.com/osjsorg) ([author](https://twitter.com/andersevenrud))\n* [Facebook](https://www.facebook.com/os.js.org)\n* [Docker Hub](https://hub.docker.com/u/osjs/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fos-js%2Fosjs-json-config-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fos-js%2Fosjs-json-config-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fos-js%2Fosjs-json-config-cli/lists"}