{"id":18764728,"url":"https://github.com/ricsam/jsonc-cli","last_synced_at":"2026-02-05T15:32:44.021Z","repository":{"id":63017844,"uuid":"563889696","full_name":"ricsam/jsonc-cli","owner":"ricsam","description":"Read and modify JSONC documents. A CLI front-end for the jsonc-parser npm package","archived":false,"fork":false,"pushed_at":"2024-12-17T03:06:20.000Z","size":267,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T05:46:04.771Z","etag":null,"topics":["cli","javascript","json","jsonc","nodejs"],"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/ricsam.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-09T14:52:42.000Z","updated_at":"2024-12-17T03:06:16.000Z","dependencies_parsed_at":"2025-09-01T18:31:55.605Z","dependency_job_id":"3a3d4bed-054c-4e91-80f8-3423563d59c0","html_url":"https://github.com/ricsam/jsonc-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ricsam/jsonc-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricsam%2Fjsonc-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricsam%2Fjsonc-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricsam%2Fjsonc-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricsam%2Fjsonc-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricsam","download_url":"https://codeload.github.com/ricsam/jsonc-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricsam%2Fjsonc-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29124802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T14:05:12.718Z","status":"ssl_error","status_checked_at":"2026-02-05T14:03:53.078Z","response_time":65,"last_error":"SSL_read: 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":["cli","javascript","json","jsonc","nodejs"],"created_at":"2024-11-07T18:31:16.636Z","updated_at":"2026-02-05T15:32:44.005Z","avatar_url":"https://github.com/ricsam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonc-cli\n\nRead and modify JSONC documents (JSON with comments). A CLI front-end for the [jsonc-parser](https://www.npmjs.com/package/jsonc-parser) npm package.\n\n[![npm](https://img.shields.io/npm/v/jsonc-cli)](https://www.npmjs.com/package/jsonc-cli)\n[![npm](https://img.shields.io/npm/dw/jsonc-cli?label=npm%20downloads)](https://www.npmjs.com/package/jsonc-cli)\n[![GitHub Repo stars](https://img.shields.io/github/stars/ricsam/jsonc-cli?style=social)](https://github.com/ricsam/jsonc-cli)\n\n## Installation\n```bash\nnpm install -g jsonc-cli\n```\n\n## Usage\n```txt\njsonc \u003ccmd\u003e [args]\n\nCommands:\n  jsonc modify           Modify a JSONC document from stdin. Formatting options\n                         are only applied to the injected JSON\n  jsonc format           Format a JSONC document from stdin\n  jsonc read [JSONPath]  Prints the JSON value at the given path in a JSONC\n                         document from stdin\n\nOptions:\n  --version  Show version number                                       [boolean]\n  --help     Show help                                                 [boolean]\n```\n\n## Examples\n### Print a value\n```bash\necho '{\"animal\":\"dog\"}' | jsonc read '[\"animal\"]' -r\n```\nwill print `dog`\n\nTo print without newline add `-n`\n\n### Format document\n```bash\necho '{\"animal\":\"dog\" // with some comments\\n}' | jsonc format\n```\nwill print\n```jsonc\n{\n  \"animal\": \"dog\" // with some comments\n}\n```\n### Modify document\n```bash\necho '{\"animal\":\"dog\"}' | jsonc modify -p '[\"animal\"]' -v '\"cat\"'\n```\nwill print\n```json\n{\"animal\":\"cat\"}\n```\n\n### Write to file\n```bash\necho '{\"animal\":\"dog\"}' | jsonc read '[\"animal\"]' -r -f output.txt\ncat output.txt # dog\n```\n### Modify a file\nIt is important to add the `-n` when you modify to prevent additional trailing new lines to be added\n```bash\ncat .vscode/settings.json | jsonc modify -n -p '[\"typescript.tsdk\"]' -v '\"app/node_modules/typescript/lib\"' -f .vscode/settings.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricsam%2Fjsonc-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricsam%2Fjsonc-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricsam%2Fjsonc-cli/lists"}