{"id":1224,"date":"2021-02-21T14:00:13","date_gmt":"2021-02-21T23:00:13","guid":{"rendered":"https:\/\/accretiondisc.com\/blog\/?page_id=1224"},"modified":"2021-02-22T22:02:49","modified_gmt":"2021-02-23T07:02:49","slug":"cli-rust","status":"publish","type":"page","link":"https:\/\/accretiondisc.com\/blog\/cli-rust\/","title":{"rendered":"Command Line Utilities in Rust"},"content":{"rendered":"\n<p>To install one of these, do<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ cargo install <em>crate-name<\/em><\/pre>\n\n\n\n<p>(assuming you&#8217;ve got a working Rust installation). I found these via <a href=\"https:\/\/crates.io\/crates\/awesome-rust\">awesome-rust<\/a>, <a href=\"https:\/\/lib.rs\/command-line-utilities\">lib.rs<\/a>, and other places out there on the intertubes.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/sharkdp\/bat\">bat<\/a> &#8211; more like <em>more<\/em>, <em>pg<\/em>, <em>less<\/em>, and <em>most<\/em> than <em>cat<\/em>, but whatever<\/p>\n\n\n\n<p><a href=\"https:\/\/dystroy.org\/broot\/navigation\/\">broot<\/a> &#8211; directory tree navigation tool<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/Freaky\/cw\">cw<\/a> &#8211; like <em>wc<\/em> but different<\/p>\n\n\n\n<p><a href=\"https:\/\/lib.rs\/crates\/diffr\">diffr<\/a> &#8211; a diff tool (about which see my <a href=\"https:\/\/accretiondisc.com\/blog\/2011\/09\/20\/diff-tools\/\">posting<\/a> and <a href=\"https:\/\/accretiondisc.com\/blog\/2020\/05\/24\/diff-tools-redux\/\">the other one<\/a>)<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/darakian\/ddh\">ddh<\/a> &#8211; directory differential tool<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/anthraxx\/dfrs\">dfrs<\/a> &#8211; like <em>df<\/em> but a bit fancier<\/p>\n\n\n\n<p><a href=\"https:\/\/lib.rs\/crates\/diskspace\">ds<\/a> (a\/k\/a diskspace) &#8211; like <em>du<\/em> but simpler and colorful.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/bootandy\/dust\">dust<\/a> (a\/k\/a du-dust) &#8211; like <em>du<\/em> but more intuitive. See also <em>spruce<\/em> and <em>ds<\/em>.<\/p>\n\n\n\n<p><a href=\"https:\/\/ownyourbits.com\/2018\/03\/25\/analyze-disk-usage-with-dutree\/\">dutree<\/a> &#8211; analyze disk usage<\/p>\n\n\n\n<p><a href=\"https:\/\/the.exa.website\/\">exa<\/a> &#8211; like <em>ls<\/em> but different. See also <em>lsd<\/em>.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/sharkdp\/fd\">fd<\/a> (a\/k\/a fd-find) &#8211; like <em>find<\/em> but better<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/vishaltelangre\/ff\">ff<\/a> &#8211; like find but better (see also <em>fd<\/em>)<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/jhspetersson\/fselect\">fselect<\/a> &#8211; like <em>find<\/em> but with SQL-inspired syntax<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/sharkdp\/hexyl\">hexyl<\/a> &#8211; a simple hex dumper<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.rs\/hx\/0.4.0\/hx\/\">hx<\/a> &#8211; futuristic hex dump utility<\/p>\n\n\n\n<p><a href=\"https:\/\/lib.rs\/crates\/jql\">jql<\/a> &#8211; JSON query language<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/casey\/just\">just<\/a> &#8211; like Make or maybe Rake.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/peltoche\/lsd\">lsd<\/a> &#8211; like <em>ls<\/em> but different. See also <em>exa<\/em>.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/lunaryorn\/mdcat\">mdcat<\/a> &#8211; render Markdown on the command line<\/p>\n\n\n\n<p><a href=\"https:\/\/crates.io\/crates\/petname\">petname<\/a> &#8211; generator of plausible names<\/p>\n\n\n\n<p><a href=\"https:\/\/crates.io\/crates\/renamer\">renamer<\/a> &#8211; file\/folder renamer (see my <a href=\"https:\/\/accretiondisc.com\/blog\/2020\/05\/24\/file-renaming-tools\/\">posting about these<\/a>)<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/ChuckDaniels87\/rnr\">rnr<\/a> &#8211; file\/folder renamer (see <em>renamer<\/em>)<\/p>\n\n\n\n<p><a href=\"https:\/\/git.sr.ht\/~heapunderflow\/streaming-xor\">ripgrep<\/a> &#8211; better <em>grep<\/em> replacement inspired by <em>ack<\/em> and <a href=\"https:\/\/github.com\/ggreer\/the_silver_searcher\"><em>ag<\/em><\/a> (the silver searcher)<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/chmln\/sd\">sd<\/a> &#8211; like <em>sed<\/em> but better<\/p>\n\n\n\n<p><a href=\"https:\/\/gitlab.com\/Dzejkop1\/spruce\">spruce<\/a> &#8211; like <em>du<\/em> but different<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/RazrFalcon\/SVGCleaner\">svgcleaner<\/a> &#8211; cleans up SVG files<\/p>\n\n\n\n<p><a href=\"https:\/\/git.sr.ht\/~heapunderflow\/streaming-xor\">sxor<\/a> &#8211; streaming xor utility<\/p>\n\n\n\n<p><a href=\"https:\/\/crates.io\/crates\/tealdeer\">tldr<\/a> &#8211; solution to man pages like the one for <em>bash<\/em> \ud83d\ude42<\/p>\n\n\n\n<p><a href=\"https:\/\/crates.io\/crates\/xsv\">xsv<\/a> &#8211; manipulate CSV files on the command line<\/p>\n\n\n\n<p><a href=\"https:\/\/lib.rs\/crates\/yj\">yj<\/a> &#8211; convert YAML to JSON<\/p>\n\n\n\n<p>Also, if you need a tool and can&#8217;t be bothered to get macports (e.g.) working, consider looking at the <a href=\"https:\/\/lib.rs\/crates\/uu_od\">coreutils implemented in Rust<\/a> page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To install one of these, do $ cargo install crate-name (assuming you&#8217;ve got a working Rust installation). I found these via awesome-rust, lib.rs, and other places out there on the intertubes. bat &#8211; more like more, pg, less, and most than cat, but whatever broot &#8211; directory tree navigation tool cw &#8211; like wc but [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1224","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/PaRqpr-jK","_links":{"self":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/pages\/1224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/comments?post=1224"}],"version-history":[{"count":0,"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/pages\/1224\/revisions"}],"wp:attachment":[{"href":"https:\/\/accretiondisc.com\/blog\/wp-json\/wp\/v2\/media?parent=1224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}