{"id":13582353,"url":"https://github.com/fiatjaf/jiq","last_synced_at":"2025-04-06T14:30:45.854Z","repository":{"id":45609620,"uuid":"75506949","full_name":"fiatjaf/jiq","owner":"fiatjaf","description":"jid on jq - interactive JSON query tool using jq expressions","archived":true,"fork":true,"pushed_at":"2023-01-09T17:59:27.000Z","size":3569,"stargazers_count":922,"open_issues_count":17,"forks_count":32,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-28T18:03:33.053Z","etag":null,"topics":["cli","command-line","jq","json"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"simeji/jid","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fiatjaf.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-03T23:42:33.000Z","updated_at":"2024-12-20T22:05:34.000Z","dependencies_parsed_at":"2023-02-08T13:16:30.723Z","dependency_job_id":null,"html_url":"https://github.com/fiatjaf/jiq","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiatjaf%2Fjiq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiatjaf%2Fjiq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiatjaf%2Fjiq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fiatjaf%2Fjiq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fiatjaf","download_url":"https://codeload.github.com/fiatjaf/jiq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247495686,"owners_count":20948097,"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","command-line","jq","json"],"created_at":"2024-08-01T15:02:37.831Z","updated_at":"2025-04-06T14:30:45.464Z","avatar_url":"https://github.com/fiatjaf.png","language":"Go","funding_links":[],"categories":["Go","Command-line tools","DevShit","\u003ca name=\"data-management-json\"\u003e\u003c/a\u003eData management - JSON/YAML/etc.","Other"],"sub_categories":[],"readme":"# jiq [![Mentioned in Awesome jq](https://awesome.re/mentioned-badge.svg)](https://github.com/fiatjaf/awesome-jq)\n\nIt's [jid](https://github.com/simeji/jid) with [jq](https://stedolan.github.io/jq/).\n\nYou can drill down interactively by using [jq](https://stedolan.github.io/jq/) filtering queries.\n\njiq uses [jq](https://stedolan.github.io/jq/) internally, and it **requires** you to have `jq` in your `PATH`.\n\nIf you prefer, there's an experimental, standalone, purely client-side web version of this on https://jq.alhur.es/jiq/.\n\n## Demo\n\n![screencast.gif](screencast.gif)\n\n## Installation\n\nEither [prebuilt binary for your system](https://github.com/fiatjaf/jiq/releases) (and make sure to `chmod +x` it first) or install/compile with Go:\n\n```\ngo install github.com/fiatjaf/jiq/cmd/jiq@latest\n```\n\nIf you don't have `jq` installed, follow instructions at https://stedolan.github.io/jq/download/ and make sure to put it in your `PATH`.\n\n## Usage\n\n### Quick start\n\n* [simple example](#simple-example)\n* [advanced usage examples](#advanced-usage-examples)\n* [with curl](#with-curl)\n\n#### simple example\n\nExecute the following command:\n\n```\necho '{\"aa\":\"2AA2\",\"bb\":{\"aaa\":[123,\"cccc\",[1,2]],\"c\":321}}'| jiq\n```\n\nThen jiq will be running. Now you can dig JSON data incrementally.\n\nWhen you enter `.bb.aaa[2]`, you will see the following.\n\n```\n[jq]\u003e .bb.aaa[2]\n[\n  1,\n  2\n]\n```\n\nIf you press Enter now it will output\n\n```json\n[\n  1,\n  2\n]\n```\n\nand exit (if you want all the output in a single line you can either call `jiq -c` or pipe it into jq as `jiq | jq -c .`).\n\n#### advanced usage examples\n\nIf you have ever used jq, you'll be familiar with these:\n\n```\necho '{\"economists\": [{\"id\": 1, \"name\": \"menger\"}, {\"id\": 2, \"name\": \"mises\"}, {\"name\": \"hayek\", \"id\": 3}]}' | jiq\n```\n\nNow try writing `.economists | \"\\(.[0].name), \\(.[1].name) and \\(.[2].name) are economists.\"` or `[.economists.[].id]`, or even `.economists | map({key: \"\\(.id)\", value: .name}) | from_entries`\n\n#### with curl\n\nSample for using [RDAP](https://datatracker.ietf.org/wg/weirds/documents/) data.\n\n```\ncurl -s http://rdg.afilias.info/rdap/domain/example.info | jiq\n```\n\n### command line arguments\n\n`-q` : print the jq filter instead of the resulting filtered JSON to stdout (if you plan to use this with jq later)\n\nPlus all the [arguments jq accepts](https://stedolan.github.io/jq/manual/#Invokingjq) -- they will affect both the JSON output inside jiq and the output that is printed to stdout (beware that some may cause bugs).\n\n---\n\ntraffic analytics for this repo:\n\n[![](https://ght.trackingco.de/fiatjaf/jiq)](https://ght.trackingco.de/)\n\n## Keymaps\n|key|description|\n|:-----------|:------------|\n|`TAB` / `CTRL` + `I` |Show available items and choice them|\n|`CTRL` + `W` |Delete from the cursor to the start of the word|\n|`CTRL` + `U` |Delete whole query|\n|`CTRL` + `F` / Right Arrow (:arrow_right:)|Move cursor a character to the right|\n|`ALT` + `F` |Move one word forward|\n|`CTRL` + `B` / Left Arrow (:arrow_left:)|Move cursor a character to the left|\n|`ALT` + `B` |Move one word backward|\n|`CTRL` + `A` / Home|To the first character of the 'Filter'|\n|`CTRL` + `E`/ End|To the end of the 'Filter'|\n|`CTRL` + `J` / Down Arrow (:arrow_down:)|Scroll json buffer 1 line downwards|\n|`CTRL` + `K` / Up Arrow (:arrow_up:)|Scroll json buffer 1 line upwards|\n|`CTRL` + `G`|Scroll json buffer to bottom|\n|`CTRL` + `T`|Scroll json buffer to top|\n|`CTRL` + `N` / PageDown|Scroll json buffer 'Page Down'|\n|`CTRL` + `P` / PageUp|Scroll json buffer 'Page Up'|\n|`ESC`|Hide a candidate box|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiatjaf%2Fjiq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffiatjaf%2Fjiq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffiatjaf%2Fjiq/lists"}