{"id":25344781,"url":"https://github.com/iyegoroff/glob-json","last_synced_at":"2026-04-28T11:02:05.274Z","repository":{"id":57686568,"uuid":"493838412","full_name":"iyegoroff/glob-json","owner":"iyegoroff","description":"Edit JSON files from CLI with globbing patterns","archived":false,"fork":false,"pushed_at":"2022-05-18T22:27:48.000Z","size":127,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T11:54:28.572Z","etag":null,"topics":["cli","glob","json"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/iyegoroff.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}},"created_at":"2022-05-18T22:03:27.000Z","updated_at":"2022-05-18T22:12:47.000Z","dependencies_parsed_at":"2022-09-14T07:12:00.792Z","dependency_job_id":null,"html_url":"https://github.com/iyegoroff/glob-json","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyegoroff%2Fglob-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyegoroff%2Fglob-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyegoroff%2Fglob-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyegoroff%2Fglob-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iyegoroff","download_url":"https://codeload.github.com/iyegoroff/glob-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247873666,"owners_count":21010508,"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":["cli","glob","json"],"created_at":"2025-02-14T11:51:21.364Z","updated_at":"2026-04-28T11:02:00.225Z","avatar_url":"https://github.com/iyegoroff.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glob-json\n\n[![npm](https://img.shields.io/npm/v/glob-json)](https://npm.im/glob-json)\n[![build](https://github.com/iyegoroff/glob-json/workflows/build/badge.svg)](https://github.com/iyegoroff/glob-json/actions/workflows/build.yml)\n[![publish](https://github.com/iyegoroff/glob-json/workflows/publish/badge.svg)](https://github.com/iyegoroff/glob-json/actions/workflows/publish.yml)\n[![codecov](https://codecov.io/gh/iyegoroff/glob-json/branch/main/graph/badge.svg?t=1520230083925)](https://codecov.io/gh/iyegoroff/glob-json)\n![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/glob-json)\n[![npm](https://img.shields.io/npm/l/glob-json.svg?t=1495378566925)](https://www.npmjs.com/package/glob-json)\n\n## Installation\n\n```\nnpm i glob-json\n```\n\n## Description\n\nUtility to modify JSON files with globbing patterns. It uses 'glob' and 'minimatch' in 'dot:true' mode. Since the '/' character is used as a path separator for keys, this tool has some limitations. For example, 'x/\\*/z' key pattern will match '{\u0026nbsp;x:\u0026nbsp;{\u0026nbsp;y:\u0026nbsp;{\u0026nbsp;z:\u0026nbsp;1\u0026nbsp;}\u0026nbsp;}\u0026nbsp;}', but not '{\u0026nbsp;x:\u0026nbsp;{\u0026nbsp;\"y/w\":\u0026nbsp;{\u0026nbsp;z:\u0026nbsp;1\u0026nbsp;}}}'.\n\nUsage:\n\n`glob-json \u003cdstPathGlob\u003e [srcPath] \u003cset|del|merge\u003e \u003cdstKeyGlob\u003e [--key|--number|--string|--true|--false|--null|srcKey] [value]`\n\nOptions:\n\n    dstPathGlob - a glob pattern to select destination files\n    srcPath - path to a source file, if not specified each destination file will be its own source\n\nCommands:\n\n`set \u003cdstKeyGlob\u003e [--string|--number|--true|--false|--null|--key] [value]`\n\n    Changes properties in destination files\n\n    Options:\n\n      dstKeyGlob   - a glob pattern to select paths in destination files\n      -s, --string - treat next argument as a string value, this is the default option\n      -n, --number - treat next argument as a number value\n      -t, --true   - set selected properties to 'true'\n      -f, --false  - set selected properties to 'false'\n      --null       - set selected properties to 'null'\n      -k, --key    - treat next argument as a path to value in a source file\n      value        - source value or a path to value in a source file\n\n    Examples:\n\n      glob-json 'fixtures/**/*.json' set version --number 5\n      glob-json package.json my-lib.json set 'dependencies/my-lib' --key version\n\n`del \u003cdstKeyGlob\u003e`\n\n    Deletes properties from destination files\n\n    Options:\n\n      dstKeyGlob - a glob pattern to select paths in destination files\n\n    Examples:\n\n      glob-json temp.json del 'some/**/deeply/*/nested/key'\n\n`merge \u003cdstKeyGlob\u003e \u003csrcKey\u003e`\n\n    Merges property from source file into destination files\n\n    Options:\n\n      dstKeyGlob   - a glob pattern to select paths in destination files\n      srcKey       - path to value in a source file\n\n    Examples:\n\n      glob-json 'packages/*/package.json' merge '' publishConfig\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyegoroff%2Fglob-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiyegoroff%2Fglob-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyegoroff%2Fglob-json/lists"}