{"id":13447375,"url":"https://github.com/therealklanni/jp","last_synced_at":"2025-07-23T22:38:56.584Z","repository":{"id":57281727,"uuid":"75976426","full_name":"therealklanni/jp","owner":"therealklanni","description":"A tiny commandline tool for parsing JSON from any source.","archived":false,"fork":false,"pushed_at":"2019-02-14T01:25:58.000Z","size":58,"stargazers_count":51,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-14T01:46:52.721Z","etag":null,"topics":["cli","commandline","json","npm","parser"],"latest_commit_sha":null,"homepage":"https://npmjs.com/jp-cli","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/therealklanni.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":"2016-12-08T21:25:56.000Z","updated_at":"2025-05-03T02:10:22.000Z","dependencies_parsed_at":"2022-08-31T10:50:47.641Z","dependency_job_id":null,"html_url":"https://github.com/therealklanni/jp","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/therealklanni/jp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealklanni%2Fjp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealklanni%2Fjp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealklanni%2Fjp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealklanni%2Fjp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/therealklanni","download_url":"https://codeload.github.com/therealklanni/jp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealklanni%2Fjp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265612334,"owners_count":23798056,"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","commandline","json","npm","parser"],"created_at":"2024-07-31T05:01:15.803Z","updated_at":"2025-07-23T22:38:56.546Z","avatar_url":"https://github.com/therealklanni.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Data Manipulation","\u003ca name=\"data-management-json\"\u003e\u003c/a\u003eData management - JSON/YAML/etc.","Homegrown Open-Source Software"],"sub_categories":["JSON"],"readme":"[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/therealklanni/jp/blob/master/LICENSE)\n[![Build Status](https://img.shields.io/travis/therealklanni/jp.svg)](https://travis-ci.org/therealklanni/jp)\n[![npm](https://img.shields.io/npm/v/jp-cli.svg)](https://www.npmjs.com/package/jp-cli)\n[![Prettier](https://img.shields.io/badge/style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n# jp\n\n\u003e Simply parse JSON from any input source.\n\n_Inspired by_ [jq](https://github.com/stedolan/jq); not a replacement.\nSupports [Lodash .get() path syntax](https://lodash.com/docs/#get) and [JSONPath syntax](https://github.com/dchester/jsonpath).\nAlso supports stdin streaming (see last example), i.e. line-by-line.\n\n```\nyarn global add jp-cli || npm install -g jp-cli\n```\n\n## Usage\n\n```\nPipe jp onto a JSON source from the commandline to parse the output:\n  cat data.json | jp [options] query\n\nOptions:\n  -p, --path      Use JSON Path notation (https://github.com/dchester/jsonpath)\n  -k, --keys      Print object keys only                               [boolean]\n  -f, --file      Read input from file                                  [string]\n  -i, --indent    Number of spaces for indentation (ignored by --human)\n                                                           [number] [default: 2]\n  -h, --human     Print human-readable (non-JSON) format               [boolean]\n  -b, --break     Set break length of object/array for human format     [number]\n  -c, --no-color  Disable color for human format                       [boolean]\n  -d, --depth     Depth for human format                                [number]\n  -L, --line-by-line  Parse each line as a separate input              [boolean]\n  --help          Show help                                            [boolean]\n\nQueries use the Lodash get method by default.\nFor more information, see https://github.com/therealklanni/jp\n```\n\n### Examples\n\n\n\u003e $ cat user-response.json | jp data.user\n\n```js\n{\n  \"name\": \"Gazorpazorpfield\",\n  \"color\": \"orange\"\n}\n```\n\n\u003e $ cat user-response.json | jp data.user | jp --keys\n\n```js\n[\n  \"name\",\n  \"color\"\n]\n```\n\n\u003e $ cat user-response.json | jp data.user.name\n\n```js\n\"Gazorpazorpfield\"\n```\n\n`jp` can also parse JSON line-by-line from a stdin stream.\n\n\u003e $ [ipfs](https://github.com/ipfs/ipfs) log tail | jp -L event | jq -r\n\n```js\nupdatePeer\nhandleFindPeerBegin\nhandleFindPeer\nupdatePeer\nhandleFindPeerBegin\nhandleFindPeer\nBitswap.Rebroadcast.active\nBitswap.Rebroadcast.idle\n... until you ^C\n```\n\n#### License\n\nMIT © [therealklanni](https://github.com/therealklanni)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftherealklanni%2Fjp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftherealklanni%2Fjp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftherealklanni%2Fjp/lists"}