{"id":17094,"date":"2019-04-30T14:19:38","date_gmt":"2019-04-30T11:19:38","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=17094"},"modified":"2026-03-22T23:38:38","modified_gmt":"2026-03-22T20:38:38","slug":"fx-command-line-json-processing-tool-and-viewer","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/fx-command-line-json-processing-tool-and-viewer\/","title":{"rendered":"Best Command-Line JSON Tool: Fx (Interactive &amp; Fast)"},"content":{"rendered":"\n<p>I stumbled upon one of the best Command Line JSON processing tools and Viewer, named fx. This tool is written in <a href=\"https:\/\/computingforgeeks.com\/install-nodejs-debian\/\">Node.js<\/a> and distributed as a single binary without external dependencies. It is designed to give you a nice view and navigation of JSON files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Features of fx JSON Viewer<\/h2>\n\n\n\n<p>To name a few, here are the core features of fx command line json processing tool.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It is easy to use<\/li>\n\n\n\n<li>Distributed as standalone binary<\/li>\n\n\n\n<li>You operate it in interactive mode<\/li>\n\n\n\n<li>Has support for themes to give it a nice look<\/li>\n\n\n\n<li>Bash completion support &#8211; more productivity<\/li>\n\n\n\n<li>Fx has streaming support<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Install fx from a standalone binary<\/h2>\n\n\n\n<p>The easiest installation method is from a standalone binary. Check the <a aria-label=\"fx downloads page (opens in a new tab)\" href=\"https:\/\/github.com\/antonmedv\/fx\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">fx downloads page<\/a> for available releases.<\/p>\n\n\n\n<p>Install wget<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em># Debian based systems<\/em><\/strong>\nsudo apt update &amp;&amp; sudo apt install wget<strong><em>\n<\/em><\/strong>\n<strong><em># RHEL based systems\n<\/em><\/strong>sudo yum -y install wget<\/code><\/pre>\n\n\n\n<p>Get latest release version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VERSION=$(curl --silent \"https:\/\/api.github.com\/repos\/antonmedv\/fx\/releases\/latest\" | grep '\"tag_name\"' | sed -E 's\/.*\"(&#91;^\"]+)\".*\/\\1\/')<\/code><\/pre>\n\n\n\n<p>Download binary for Linux that is suitable for your CPU.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em># Intel 64-bit\n<\/em><\/strong>wget https:\/\/github.com\/antonmedv\/fx\/releases\/download\/$VERSION\/fx_linux_amd64 -O fx\nchmod +x fx &amp;&amp; sudo mv fx \/usr\/local\/bin\/\n\n<strong><em># ARM 64-bit\n<\/em><\/strong>https:\/\/github.com\/antonmedv\/fx\/releases\/download\/$VERSION\/fx_linux_arm64 -O fx\nchmod +x fx &amp;&amp; sudo mv fx \/usr\/local\/bin\/<\/code><\/pre>\n\n\n\n<p>For <strong>macOS<\/strong> users, you can use Homebrew or binary.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em># Intel\n<\/em><\/strong>wget https:\/\/github.com\/antonmedv\/fx\/releases\/download\/$VERSION\/fx_darwin_amd64 -O fx\nchmod +x fx &amp;&amp; sudo mv fx \/usr\/local\/bin\/\n\n<strong><em># M1\/M2<\/em><\/strong>\nwget https:\/\/github.com\/antonmedv\/fx\/releases\/download\/$VERSION\/fx_darwin_arm64 -O fx\nchmod +x fx &amp;&amp; sudo mv fx \/usr\/local\/bin\n<strong><em>\n<\/em># Homebrew installation\n<\/strong>$ brew install fx<\/code><\/pre>\n\n\n\n<p>Test installation by checking the version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-pale-pink-color\">fx --version<\/mark>\n35.0.0<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"mce_8\">Install fx using npm<\/h2>\n\n\n\n<p>If you choose to go with <em>npm<\/em> installation method, install <a href=\"https:\/\/computingforgeeks.com\/install-node-js-on-debian-linux-system\/\">Node.js<\/a> on your system using our guide below.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Node.js on Linux \/ macOS<\/li>\n<\/ul>\n\n\n\n<p>Thereafter, install fx using below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install -g fx<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Using fx JSON command line viewer<\/h2>\n\n\n\n<p><strong>fx<\/strong> can work in two modes: cli and interactive. To start interactive mode pipe into fx any JSON:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ curl ... | fx<\/pre>\n\n\n\n<p>You can also pass file argument as first parameter. fx will apply it and prints to stdout.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fx myfile.json<\/code><\/pre>\n\n\n\n<p>Click on fields to expand or collapse JSON tree, use mouse wheel to scroll view.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"438\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2019\/04\/fx-read-json-file-1024x438.png\" alt=\"\" class=\"wp-image-17119\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2019\/04\/fx-read-json-file-1024x438.png 1024w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2019\/04\/fx-read-json-file-300x128.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2019\/04\/fx-read-json-file-768x328.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2019\/04\/fx-read-json-file-696x298.png 696w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2019\/04\/fx-read-json-file-1068x457.png 1068w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2019\/04\/fx-read-json-file-982x420.png 982w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2019\/04\/fx-read-json-file.png 1286w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Read <a rel=\"noreferrer noopener\" aria-label=\"fx documentation (opens in a new tab)\" href=\"https:\/\/github.com\/antonmedv\/fx\/blob\/master\/DOCS.md\" target=\"_blank\">fx documentation<\/a> to learn about all fx operation modes and see more examples which could work for your use case.<\/p>\n\n\n\n<p>Knowledge is the voice you need to break through the IT sphere, this is what will get you started.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>I stumbled upon one of the best Command Line JSON processing tools and Viewer, named fx. This tool is written in Node.js and distributed as a single binary without external dependencies. It is designed to give you a nice view and navigation of JSON files. Features of fx JSON Viewer To name a few, here &#8230; <a title=\"Best Command-Line JSON Tool: Fx (Interactive &amp; Fast)\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/fx-command-line-json-processing-tool-and-viewer\/\" aria-label=\"Read more about Best Command-Line JSON Tool: Fx (Interactive &amp; Fast)\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":17119,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[690,299,50,2666],"tags":[8333,8334,8332],"class_list":["post-17094","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev","category-how-to","category-linux-tutorials","category-tips-tricks","tag-code","tag-format","tag-json"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/17094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=17094"}],"version-history":[{"count":1,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/17094\/revisions"}],"predecessor-version":[{"id":163684,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/17094\/revisions\/163684"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/17119"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=17094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=17094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=17094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}