{"id":13861548,"url":"https://github.com/200ok-ch/counsel-jq","last_synced_at":"2025-05-15T00:31:28.693Z","repository":{"id":53485219,"uuid":"217153271","full_name":"200ok-ch/counsel-jq","owner":"200ok-ch","description":"Traverse complex JSON and YAML structures with live feedback","archived":false,"fork":false,"pushed_at":"2023-07-19T22:35:11.000Z","size":5300,"stargazers_count":125,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-05T06:03:25.532Z","etag":null,"topics":["autocompletion","emacs","json","json-parser","yaml","yaml-parser"],"latest_commit_sha":null,"homepage":"https://200ok.ch/project/counsel_jq.html","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/200ok-ch.png","metadata":{"files":{"readme":"README.org","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,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["200ok-ch"]}},"created_at":"2019-10-23T21:03:53.000Z","updated_at":"2024-06-12T11:23:29.000Z","dependencies_parsed_at":"2024-04-13T15:17:39.874Z","dependency_job_id":"1b79f4f6-7cf2-4e3e-9432-494a53652e50","html_url":"https://github.com/200ok-ch/counsel-jq","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/200ok-ch%2Fcounsel-jq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/200ok-ch%2Fcounsel-jq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/200ok-ch%2Fcounsel-jq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/200ok-ch%2Fcounsel-jq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/200ok-ch","download_url":"https://codeload.github.com/200ok-ch/counsel-jq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225317081,"owners_count":17455369,"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":["autocompletion","emacs","json","json-parser","yaml","yaml-parser"],"created_at":"2024-08-05T06:01:24.879Z","updated_at":"2024-11-19T08:19:47.851Z","avatar_url":"https://github.com/200ok-ch.png","language":"Emacs Lisp","funding_links":["https://github.com/sponsors/200ok-ch"],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"* counsel-jq\n\n** Live queries against JSON and YAML data\n\n[[https://melpa.org/#/counsel-jq][file:https://melpa.org/packages/counsel-jq-badge.svg]]\n\nTL;DR: If you're a fan of [[https://stedolan.github.io/jq/][jq]] or [[https://github.com/mikefarah/yq][yq]] and you're using Emacs\n[[https://github.com/abo-abo/swiper][Ivy/Swiper/Counsel]], then this package is for you.\n\nLonger version: If you are working with complex nested JSON (or YAML)\nstructures, you are probably familiar with [[https://stedolan.github.io/jq/][jq]] (or [[https://github.com/mikefarah/yq][yq]]) which is like\nsed for JSON data and great at what it does. However, being a\ncommand-line tool like sed, the feedback for writing queries and\nseeing their results is a discrete process and not live.\n\n#+begin_quote\nCool. That might even be a feature that would draw in new Emacs users!\n#+end_quote\n([[https://github.com/alphapapa][alphapapa]] during the [[https://github.com/melpa/melpa/pull/6527#issuecomment-551311397][melpa submission]])\n\nWhen working with Emacs, we are used to good auto-completion and live\nfeedback. Formerly, this was mostly done with static input, but with\nmodern completion frameworks like [[https://github.com/abo-abo/swiper][Ivy]], this can be done with dynamic\ninputs, as well.\n\ncounsel-jq is a package with which you can quickly test queries and\ntraverse a complex JSON and YAML structure whilst having live\nfeedback. Just call =M-x counsel-jq= in a buffer containing JSON or\nYAML, then start writing your =jq= or =yq= query string and see the\noutput appear live in the message area. Whenever you're happy, hit\n=RET= and the results will be displayed to you in the buffer\n=*jq-json*=.\n\nDemo:\n\n[[file:images/demo-counsel-jq.gif][./images/demo-counsel-jq.gif]]\n\n** Configuration\n\nTo define whether you want to use =yq= over =jq= as processing tool,\ncall =M-x customize= and set =counsel-jq-command= to =yq=.\n\nIn the same manner you can define the name of the results buffer by\ncustomizing the =counsel-jq-buffer= variable.\n\nLastly, by default, the results buffer =*jq-json*= buffer will have\nthe major mode =js-mode=, but that can be customized with the\n=counsel-jq-json-buffer-mode= variable if you prefer =json-mode=,\n=rsjx-mode= or any other mode.\n\n** EmacsConf 2020 talk on =counsel-jq=\n\nOn [2020-11-29 Sun], [[https://github.com/munen/][Zen Monk Alain M. Lafon (@munen)]] gave a talk at\nEmacsConf 2020 introducing =counsel-jq=. There's a video recording\nwith explanations and demos behind this complementary blog post:\nhttps://200ok.ch/posts/2020-11-30_emacsconf_traverse_complex_json_structures_with_live_feedback_with_counseljq.html\n\n#+html: \u003cp align=\"center\"\u003e\u003ca href=\"https://200ok.ch/posts/2020-11-30_emacsconf_traverse_complex_json_structures_with_live_feedback_with_counseljq.html\"\u003e\u003cimg src=\"https://github.com/200ok-ch/counsel-jq/raw/master/images/emacsconf-2020-video-preview.png\"/\u003e\u003c/a\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F200ok-ch%2Fcounsel-jq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F200ok-ch%2Fcounsel-jq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F200ok-ch%2Fcounsel-jq/lists"}