<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ListNUX</title>
    <description>The latest articles on DEV Community by ListNUX (@listnux).</description>
    <link>https://dev.to/listnux</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F190086%2F8dda6704-e83c-40e2-ae90-152804602f59.png</url>
      <title>DEV Community: ListNUX</title>
      <link>https://dev.to/listnux</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/listnux"/>
    <language>en</language>
    <item>
      <title>Fun with ImageMagick</title>
      <dc:creator>ListNUX</dc:creator>
      <pubDate>Wed, 17 Jul 2019 23:20:06 +0000</pubDate>
      <link>https://dev.to/listnux/fun-with-imagemagick-57d1</link>
      <guid>https://dev.to/listnux/fun-with-imagemagick-57d1</guid>
      <description>&lt;p&gt;&lt;a href="https://imagemagick.org/" rel="noopener noreferrer"&gt;ImageMagick&lt;/a&gt; is an amazing software suite, with tools for displaying images, editing, converting from one format to another and it works with both bitmap (raster) images and vector images. It can &lt;a href="https://imagemagick.org/script/formats.php#supported" rel="noopener noreferrer"&gt;read over 100 major file formats&lt;/a&gt;, including RAW files from various camera models, video files such as AVI or MPEG and more.&lt;/p&gt;

&lt;p&gt;Being command-line mostly tool, and ubiquitous, makes it the ideal tool to bundle with other software that needs image editing. It can be scripted - and some people have created some amazing script collections like &lt;a href="http://www.fmwconcepts.com/imagemagick/index.php" rel="noopener noreferrer"&gt;Fred&lt;/a&gt; and &lt;a href="http://im.snibgo.com/" rel="noopener noreferrer"&gt;Snibgo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This post is a compilation of some of my random notes and various examples from &lt;a href="http://www.imagemagick.org/Usage/" rel="noopener noreferrer"&gt;ImageMagick usage pages&lt;/a&gt;. I provide no explanation for the various tools and options, the official site (especially the &lt;a href="http://www.imagemagick.org/Usage/" rel="noopener noreferrer"&gt;usage pages&lt;/a&gt;) and the man-pages explain it much better than I can.&lt;/p&gt;




&lt;h2&gt;
  
  
  ImageMagick command-line tools.
&lt;/h2&gt;

&lt;p&gt;Here is the full list of all &lt;a href="https://imagemagick.org/script/command-line-tools.php" rel="noopener noreferrer"&gt;ImageMagick command-line tools&lt;/a&gt;. Some common tools are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;convert: image editing.&lt;/li&gt;
&lt;li&gt;mogrify: image editing, mostly used for batch editing.&lt;/li&gt;
&lt;li&gt;import: screenshot utility.&lt;/li&gt;
&lt;li&gt;display: ImageMagick GUI.&lt;/li&gt;
&lt;li&gt;animate: animates an image on a GUI window.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Create a text logo:
&lt;/h2&gt;

&lt;p&gt;Check available fonts:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

convert &lt;span class="nt"&gt;-list&lt;/span&gt; font


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and then:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

convert &lt;span class="nt"&gt;-background&lt;/span&gt; DarkSlateBlue &lt;span class="nt"&gt;-strokewidth&lt;/span&gt; 2 &lt;span class="nt"&gt;-stroke&lt;/span&gt; turquoise1 &lt;span class="nt"&gt;-font&lt;/span&gt; Aka-AcidGR-LivingSword &lt;span class="nt"&gt;-pointsize&lt;/span&gt; 256 &lt;span class="nt"&gt;-density&lt;/span&gt; 90 label:ListNUX test.png


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.imagemagick.org/script/color.php#color_names" rel="noopener noreferrer"&gt;List of colour names&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Result:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvc31a3k7cf99tkteyjf0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvc31a3k7cf99tkteyjf0.png" alt="text logo with imagemagick"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Resize images:
&lt;/h2&gt;

&lt;p&gt;Let's download some &lt;a href="https://en.wikipedia.org/wiki/Penguin" rel="noopener noreferrer"&gt;penguin images from Wikipedia&lt;/a&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; penguins &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$_&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;"url_list.txt"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
https://upload.wikimedia.org/wikipedia/commons/0/08/South_Shetland-2016-Deception_Island%E2%80%93Chinstrap_penguin_%28Pygoscelis_antarctica%29_04.jpg
https://upload.wikimedia.org/wikipedia/commons/1/1d/Penguin_in_Antarctica_jumping_out_of_the_water.jpg
https://upload.wikimedia.org/wikipedia/commons/f/fd/Antarctic_adelie_penguins_%28js%29_21.jpg
https://upload.wikimedia.org/wikipedia/commons/4/49/Pygoscelis_antarcticus_-Cooper_Bay%2C_South_Georgia%2C_British_Overseas_Territories%2C_UK-8.jpg
https://upload.wikimedia.org/wikipedia/commons/9/9e/Penguins_walking_-Moltke_Harbour%2C_South_Georgia%2C_British_overseas_territory%2C_UK-8.jpg
https://upload.wikimedia.org/wikipedia/commons/4/4f/Yellow-eyed_Penguin_MC.jpg
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;wget &lt;span class="nt"&gt;-i&lt;/span&gt; url_list.txt


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;First, let's resize all photos so that the biggest size (height or width, whichever is largest) is at maximum 800px. We will also reduce quality to 90%, for smaller file sizes.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.jpg&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;convert &lt;span class="nv"&gt;$i&lt;/span&gt; &lt;span class="nt"&gt;-resize&lt;/span&gt; &lt;span class="s2"&gt;"800x800&amp;gt;"&lt;/span&gt; &lt;span class="nt"&gt;-strip&lt;/span&gt; &lt;span class="nt"&gt;-quality&lt;/span&gt; 90 _&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  3. Crop images from center:
&lt;/h2&gt;

&lt;p&gt;And let's crop them all to 500x500px squares:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.jpg&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;convert &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;-gravity&lt;/span&gt; center &lt;span class="nt"&gt;-crop&lt;/span&gt; 500x500+0+0 +repage _&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now, let's rename them all to &lt;strong&gt;pengu01&lt;/strong&gt;, &lt;strong&gt;pengu02&lt;/strong&gt;, etc.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;num&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.jpg&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nv"&gt;new&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s2"&gt;"pengu%02d.jpg"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$num&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;mv&lt;/span&gt; &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$new&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
  &lt;span class="nb"&gt;let &lt;/span&gt;&lt;span class="nv"&gt;num&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;num+1
&lt;span class="k"&gt;done&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  5. Combine multiple images into a gif:
&lt;/h2&gt;

&lt;p&gt;And now, time to animate!&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# pop-up a window with all the images with 90sec delay&lt;/span&gt;
animate &lt;span class="nt"&gt;-delay&lt;/span&gt; 90 &lt;span class="k"&gt;*&lt;/span&gt;.jpg
&lt;span class="c"&gt;# write the previous animation to a gif image&lt;/span&gt;
convert &lt;span class="nt"&gt;-delay&lt;/span&gt; 90 &lt;span class="k"&gt;*&lt;/span&gt;.jpg test.gif


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkkcnqfx4nv86nxeykglf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkkcnqfx4nv86nxeykglf.gif" alt="gif image from previously downloaded static pictures"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Create a gradient:
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# simple linear gradient, two colours&lt;/span&gt;
convert &lt;span class="nt"&gt;-size&lt;/span&gt; 600x400 gradient:blue-red linear_gradient.png
&lt;span class="c"&gt;# simple radiant gradient, two colours&lt;/span&gt;
convert &lt;span class="nt"&gt;-size&lt;/span&gt; 600x400 radial-gradient:blue-red radial_gradient.png
&lt;span class="c"&gt;# a more complex, multi-colour gradient with bicubic interpolation&lt;/span&gt;
convert &lt;span class="se"&gt;\(&lt;/span&gt; &lt;span class="nt"&gt;-size&lt;/span&gt; 600x400 gradient: &lt;span class="nt"&gt;-interpolate&lt;/span&gt; Bicubic &lt;span class="nt"&gt;-rotate&lt;/span&gt; 180 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="se"&gt;\(&lt;/span&gt; +size xc:firebrick4 xc:crimson xc:MediumPurple xc:DarkSlateBlue &lt;span class="nt"&gt;-append&lt;/span&gt; &lt;span class="se"&gt;\)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-clut&lt;/span&gt; &lt;span class="se"&gt;\)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  gradient.png


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foq6x6l60ise2fq1vi6vk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foq6x6l60ise2fq1vi6vk.png" alt="Gradient created with ImageMagick"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Create a text logo with a 3D effect:
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

convert gradient.png &lt;span class="nt"&gt;-background&lt;/span&gt; purple &lt;span class="nt"&gt;-alpha&lt;/span&gt; shape &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-font&lt;/span&gt; Aka-AcidGR-ScrachThis &lt;span class="nt"&gt;-pointsize&lt;/span&gt; 192 &lt;span class="nt"&gt;-fill&lt;/span&gt; firebrick2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-stroke&lt;/span&gt; black &lt;span class="nt"&gt;-gravity&lt;/span&gt; Center &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-annotate&lt;/span&gt; 0 &lt;span class="s2"&gt;"ListNUX"&lt;/span&gt; logo_simple.png


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Overlay the text:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

convert logo_simple.png &lt;span class="nt"&gt;-alpha&lt;/span&gt; extract &lt;span class="nt"&gt;-blur&lt;/span&gt; 0x6 &lt;span class="nt"&gt;-shade&lt;/span&gt; 580x80 &lt;span class="nt"&gt;-normalize&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  logo_simple.png &lt;span class="nt"&gt;-compose&lt;/span&gt; Overlay &lt;span class="nt"&gt;-composite&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  logo_simple.png &lt;span class="nt"&gt;-alpha&lt;/span&gt; on &lt;span class="nt"&gt;-compose&lt;/span&gt; Dst_In &lt;span class="nt"&gt;-composite&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  logo_v1.png


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;... and then add some shadow&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

convert logo_v1.png &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="se"&gt;\(&lt;/span&gt; +clone &lt;span class="nt"&gt;-background&lt;/span&gt; CornflowerBlue &lt;span class="nt"&gt;-shadow&lt;/span&gt; 80x4+20+20 &lt;span class="se"&gt;\)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  +swap &lt;span class="nt"&gt;-background&lt;/span&gt; MidnightBlue &lt;span class="nt"&gt;-layers&lt;/span&gt; merge +repage &lt;span class="se"&gt;\&lt;/span&gt;
  logo.png


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F28qa08xgrjo189kwqhuf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F28qa08xgrjo189kwqhuf.png" alt="text logo with 3D effects"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Stars:
&lt;/h2&gt;

&lt;p&gt;Let's create an image with stars. We will create background noise, then delete and blur the excess noise, and use motion blur to create starbrusts.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

convert &lt;span class="nt"&gt;-size&lt;/span&gt; 500x500 xc: +noise Random &lt;span class="nt"&gt;-channel&lt;/span&gt; R &lt;span class="nt"&gt;-threshold&lt;/span&gt; 0.07% &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-negate&lt;/span&gt; &lt;span class="nt"&gt;-channel&lt;/span&gt; RGB &lt;span class="nt"&gt;-separate&lt;/span&gt; plasma:DarkOrchid1 &lt;span class="se"&gt;\&lt;/span&gt;
  +channel &lt;span class="se"&gt;\(&lt;/span&gt; +clone &lt;span class="se"&gt;\)&lt;/span&gt; &lt;span class="nt"&gt;-compose&lt;/span&gt; multiply &lt;span class="nt"&gt;-flatten&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-virtual-pixel&lt;/span&gt; tile  &lt;span class="nt"&gt;-blur&lt;/span&gt; 0x.5 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="se"&gt;\(&lt;/span&gt; &lt;span class="nt"&gt;-clone&lt;/span&gt; 0  &lt;span class="nt"&gt;-motion-blur&lt;/span&gt; 0x20+15 &lt;span class="nt"&gt;-motion-blur&lt;/span&gt; 0x20+195 &lt;span class="se"&gt;\)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="se"&gt;\(&lt;/span&gt; &lt;span class="nt"&gt;-clone&lt;/span&gt; 0  &lt;span class="nt"&gt;-motion-blur&lt;/span&gt; 0x20-45  &lt;span class="nt"&gt;-motion-blur&lt;/span&gt; 0x20+135 &lt;span class="se"&gt;\)&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-compose&lt;/span&gt; screen &lt;span class="nt"&gt;-background&lt;/span&gt; black &lt;span class="nt"&gt;-flatten&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-normalize&lt;/span&gt; stars.png


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fizmsrfc8v1cgfvozxbi4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fizmsrfc8v1cgfvozxbi4.png" alt="star field effect"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Credits&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;small&gt;&lt;em&gt;ImageMagick logo &lt;a href="https://en.wikipedia.org/wiki/File:ImageMagick_logo.svg" rel="noopener noreferrer"&gt;Wikimedia Commons&lt;/a&gt; under &lt;a href="http://www.imagemagick.org/script/license.php" rel="noopener noreferrer"&gt;ImageMagick License&lt;/a&gt;&lt;/em&gt;&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;&lt;em&gt;&lt;a href="https://www.imagemagick.org/Usage/" rel="noopener noreferrer"&gt;Examples of ImageMagick usage&lt;/a&gt;&lt;/em&gt;&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;
&lt;small&gt;&lt;em&gt;Fonts used: &lt;a href="http://aka-acid.com/" rel="noopener noreferrer"&gt;Aka-acid&lt;/a&gt; fonts, specifically:&lt;/em&gt;&lt;/small&gt;

&lt;ul&gt;
&lt;li&gt;&lt;small&gt;&lt;em&gt;&lt;a href="http://aka-acid.com/livingsword.html" rel="noopener noreferrer"&gt;Living sword&lt;/a&gt; font&lt;/em&gt;&lt;/small&gt;&lt;/li&gt;
&lt;li&gt;&lt;small&gt;&lt;em&gt;&lt;a href="http://aka-acid.com/scratchthis.html" rel="noopener noreferrer"&gt;Scratch this&lt;/a&gt; font&lt;/em&gt;&lt;/small&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

</description>
      <category>imagemagick</category>
      <category>commandline</category>
      <category>fun</category>
    </item>
    <item>
      <title>Seven ridiculously good command line tools</title>
      <dc:creator>ListNUX</dc:creator>
      <pubDate>Wed, 03 Jul 2019 19:09:47 +0000</pubDate>
      <link>https://dev.to/listnux/seven-ridiculously-good-command-line-tools-1479</link>
      <guid>https://dev.to/listnux/seven-ridiculously-good-command-line-tools-1479</guid>
      <description>&lt;p&gt;&lt;small&gt;&lt;strong&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.listnux.com/blog/seven-ridiculously-good-command-line-tools/" rel="noopener noreferrer"&gt;listnux.com&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;You are coding in Python. Your screen is filled up with terminals of various sizes and lenghts, and you have a deadline. It is 2.00 am, winter, the room is chilly, and there is a storm outside.&lt;/p&gt;

&lt;p&gt;You have a big dictionary, and you want to sort it by a numeric value. How to do this? You turn your head around the screen, to spot your favourite browser, and to ask your friends, Google, or StackOverflow. You know the browser is there, it has always been there for you. But all the terminals all over the screen cover it completely. You curse your decision to use a window manager without taskbar and frantically start moving and minimising terminals.&lt;/p&gt;

&lt;p&gt;Well, you are in luck. You might not need to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ridiculously good command line tools
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Contents&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;cheat.sh&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rebound&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mycli&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fiche - termbin.com&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GRV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GoAccess&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;1. &lt;a href="https://github.com/chubin/cheat.sh" rel="noopener noreferrer"&gt;cheat.sh&lt;/a&gt; - the only cheat sheet you need
&lt;/h3&gt;

&lt;p&gt;A cheatsheet that let's you access not only actual cheatsheets and simple overviews of various commands and programming languages, but it even queries Stack Overflow for answers? And automatically selects the most upvoted thread that matches your search term? Yes, that's &lt;a href="https://cheat.sh/" rel="noopener noreferrer"&gt;cheat.sh&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To find out what Stack Overflow has to say about our previous question, without leaving the terminal, is as simple as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl cheat.sh/python/sort+dictionary+by+value|more
&lt;span class="c"&gt;# OR&lt;/span&gt;
curl cht.sh/python/sort+dictionary+by+value|more
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-1.jpeg" alt="Screenshot of terminal output of above command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively,you can install the command line client, &lt;code&gt;cht.sh&lt;/code&gt;, so that you don't even have to type &lt;code&gt;curl&lt;/code&gt;, or add &lt;code&gt;+&lt;/code&gt; between the terms:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cht.sh python &lt;span class="nb"&gt;sort &lt;/span&gt;dictionary by value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-2.jpeg" alt="Screenshot of terminal output of above command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice the link at the end (&lt;code&gt;so/q/613183&lt;/code&gt;)? It stands for &lt;a href="https://stackoverflow.com/q/613183" rel="noopener noreferrer"&gt;https://stackoverflow.com/q/613183&lt;/a&gt; and it is the most upvoted question in Stack Overflow that contains the queried terms. Say, though, the most upvoted question does not answer your specific issue (though this particular answer is excellent)? Simply extend a &lt;code&gt;/1&lt;/code&gt; or &lt;code&gt;/2&lt;/code&gt; or any number at the end of your query. For instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl cht.sh/python/sort+dictionary+by+value/1
&lt;span class="c"&gt;#or&lt;/span&gt;
cht.sh python &lt;span class="nb"&gt;sort &lt;/span&gt;dictionary by value/1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;will return the top answer to &lt;a href="https://stackoverflow.com/q/52141785" rel="noopener noreferrer"&gt;this Stack Overflow question&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href="https://cheat.sh/" rel="noopener noreferrer"&gt;cheat.sh&lt;/a&gt; • &lt;a href="https://github.com/chubin/cheat.sh" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;2. &lt;a href="https://github.com/shobrook/rebound" rel="noopener noreferrer"&gt;Rebound&lt;/a&gt; - Command-line tool that instantly fetches Stack Overflow results
&lt;/h3&gt;

&lt;p&gt;So, with the help of &lt;code&gt;cht.sh&lt;/code&gt;, you figured out the answer of your question and finished a part of your project. So you run it, and, whoa... compile error. You can still type the error for &lt;code&gt;cht.sh&lt;/code&gt; to fetch an answered question from StackOverflow, but, why waste time typing a long error, when you can use &lt;a href="https://github.com/shobrook/rebound" rel="noopener noreferrer"&gt;Rebound&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/shobrook/rebound" rel="noopener noreferrer"&gt;Rebound&lt;/a&gt; is a fantastic Python tool, that allows you to simply execute the file and directly pull the error message and find related Stack Overflow questions. It works with Python, Ruby, Java, Goland and Node.js and it is as simple as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# instead of typing:&lt;/span&gt;
python app.py
&lt;span class="c"&gt;# you simply type:&lt;/span&gt;
rebound app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here is what happens:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-3.jpeg" alt="Screenshot of Rebound pulling an error code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you press enter, you get a list of related Stack Overflow threads:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-4.jpeg" alt="Screenshot of Rebound pulling Stack Overflow questions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fantastic? Absolutely!&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href="https://github.com/shobrook/rebound" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;3. &lt;a href="https://github.com/dbcli/mycli" rel="noopener noreferrer"&gt;mycli&lt;/a&gt; - A terminal client for MySQL
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.mycli.net/" rel="noopener noreferrer"&gt;mycli.net&lt;/a&gt;, at first glance, might not seem as sexy as the previous tools, but it is insanely handy when you are working with MySQL databases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-5.gif" alt="Gif animation displaying mycli.net shell in practice"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It packs auto-completion for SQL keywords and tables, views or columns, logs, colourful tabular data, multiline queries and more.&lt;/p&gt;

&lt;p&gt;But what's more, it permits you to save complex (or simple) queries as aliases for future use. It allows parameter substitution for your saved queries, so you can reuse them whenever applicable.&lt;/p&gt;

&lt;p&gt;For example, I have saved a query, which generates a &lt;code&gt;DROP&lt;/code&gt; statement for tables starting with a certain string:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;fs&lt;/span&gt; &lt;span class="n"&gt;cleardb&lt;/span&gt; &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;CONCAT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;'DROP TABLE '&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
                            &lt;span class="n"&gt;GROUP_CONCAT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;';'&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="k"&gt;statement&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt;
                            &lt;span class="n"&gt;information_schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tables&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;table_schema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'$1'&lt;/span&gt;
                            &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'$2__%'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with &lt;code&gt;$1&lt;/code&gt; being my database name and &lt;code&gt;$2&lt;/code&gt; the string I want my query to match on the table name. Simply invoking the alias with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="se"&gt;\f&lt;/span&gt; cleardb &lt;span class="s2"&gt;"my_database"&lt;/span&gt; &lt;span class="s2"&gt;"my_string_"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;will return the drop statement I need. You really don't realise how much you are missing a tool like this, before you actually try it.&lt;/p&gt;

&lt;p&gt;Also see the &lt;a href="https://github.com/dbcli/pgcli" rel="noopener noreferrer"&gt;pgcli&lt;/a&gt; project for Postgres&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href="https://www.mycli.net/" rel="noopener noreferrer"&gt;mycli.net&lt;/a&gt; • &lt;a href="https://github.com/dbcli/mycli" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;4. &lt;a href="https://github.com/sharkdp/bat" rel="noopener noreferrer"&gt;Bat&lt;/a&gt; - a cat clone with winds
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/sharkdp/bat" rel="noopener noreferrer"&gt;Bat&lt;/a&gt; is a Rust tool that aims to be the better, prettier and more handy replacement of cat(1). It features syntax highlithing, line numbering, theming, pagers, and it communicates with Git to display file modifications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-6.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-6.jpeg" alt="Screenshot of bat using markdown syntax highlighting"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bat&lt;/strong&gt; can completely replace &lt;code&gt;cat&lt;/code&gt; and it can be used in pipes (&lt;code&gt;bat .bash_profile |grep PATH&lt;/code&gt;), or with &lt;code&gt;find&lt;/code&gt;: &lt;code&gt;find -type f -name README.md -exec bat {} +&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-7.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-7.jpeg" alt="Screenshot of bat previewing find results"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href="https://github.com/sharkdp/bat" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;5. &lt;a href="https://github.com/solusipse/fiche" rel="noopener noreferrer"&gt;Fiche&lt;/a&gt; - termbin.com
&lt;/h3&gt;

&lt;p&gt;You were still coding that Python script, remember? And decided to share a file with your friend.&lt;/p&gt;

&lt;p&gt;Now, you can login to GitHub and post a gist, or to GitLab and post a snippet, or to Pastebin. But, yeah, your browser is hidden below a few stacks of terminals. So, what can you do?&lt;/p&gt;

&lt;p&gt;This:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;test_howdoi.py | nc termbin.com 9999 &lt;span class="c"&gt;# or 'bat test_howdoi.py...'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The terminal returns a simple URL: &lt;a href="https://termbin.com/wf6u" rel="noopener noreferrer"&gt;https://termbin.com/wf6u&lt;/a&gt; in the above case. You text this URL to your friend, and, behold, you just shared your file, without ever leaving your terminal. (&lt;em&gt;In case you are wondering, I shared a file from &lt;a href="https://github.com/gleitz/howdoi" rel="noopener noreferrer"&gt;howdoi&lt;/a&gt;, a fantastic command-line tool, which is not in the current list, as it has a bit similar function with the first two tools listed&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://termbin.com/" rel="noopener noreferrer"&gt;Termbin.com&lt;/a&gt; is a public pastebin server that works with the commandline pastebin tool &lt;a href="https://github.com/solusipse/fiche" rel="noopener noreferrer"&gt;fiche&lt;/a&gt;. It is very quick, keeps pastebins for a month and even has syntax highlighting (try the above link with &lt;code&gt;l.termbin&lt;/code&gt; instead of &lt;code&gt;termbin&lt;/code&gt;: &lt;a href="https://l.termbin.com/wf6u" rel="noopener noreferrer"&gt;l.termbin.com/wf6u&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;What's more, you can install &lt;strong&gt;fiche&lt;/strong&gt; and self-host your own pastebin server.&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href="https://termbin.com/" rel="noopener noreferrer"&gt;termbin.com&lt;/a&gt; • &lt;a href="https://github.com/solusipse/fiche" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;6. &lt;a href="https://github.com/rgburke/grv" rel="noopener noreferrer"&gt;GRV&lt;/a&gt; - terminal interface for git
&lt;/h3&gt;

&lt;p&gt;Sometimes you don't know anymore what's going on on your local git repo. You remember that your last few commits were "&lt;em&gt;Fix #1999&lt;/em&gt;", "&lt;em&gt;Prev fix broke things, revert to #1998&lt;/em&gt;", "&lt;em&gt;Fix #2000&lt;/em&gt;", "&lt;em&gt;revert Fix #2000&lt;/em&gt;", "&lt;em&gt;final fix&lt;/em&gt;", "&lt;em&gt;%#&amp;amp;@ this I go to sleep&lt;/em&gt;", but you need to see what files you changed on each commit, the diffs, the commit messages.&lt;/p&gt;

&lt;p&gt;And of course &lt;strong&gt;git&lt;/strong&gt; allows you to do all of this. And of course, there is an even easier way, to see all your commits, diffs and refs on a nice, easy to browse table.&lt;/p&gt;

&lt;p&gt;"Yes, &lt;em&gt;*I know*&lt;/em&gt; ", you say, "it is called &lt;em&gt;*GitHub*&lt;/em&gt;. I need to dig out that browser".&lt;/p&gt;

&lt;p&gt;Or you can simply use &lt;a href="https://github.com/rgburke/grv" rel="noopener noreferrer"&gt;GRV&lt;/a&gt;. It presents all the above info on a nice table right on your terminal. It has tabs and splits and custom views, queries, and your terminal refreshes automatically whenever there is a change on the filesystem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-8.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-8.jpeg" alt="GRV on a terminal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GRV&lt;/strong&gt; is a tool you don't realise how much you need it, until you actually use it. It makes the presentation of your git repo so easy to grasp and browse, that it is a must-have tool if you work with Git a lot (and you should work with Git &lt;em&gt;all&lt;/em&gt; the time, if you are coding).&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href="https://github.com/rgburke/grv" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a&gt;&lt;/a&gt;7. &lt;a href="https://github.com/allinurl/goaccess/" rel="noopener noreferrer"&gt;GoAccess&lt;/a&gt; - real-time web log analyzer
&lt;/h3&gt;

&lt;p&gt;One of these things is not like the others. The last tool on today's list is not going to help you in your coding adventures. But, if you have a website, it will analyse the logs of your web server and allow you to view them directly on your terminal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-9.jpeg" alt="GoAccess web log analyser screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is awesome, cause the &lt;code&gt;access.log&lt;/code&gt; logs on most servers are hard to read and even harder to analyse quickly. &lt;a href="https://goaccess.io/" rel="noopener noreferrer"&gt;GoAccess&lt;/a&gt; will allow you to have visitor statistics for your website without tracking your visitors, &lt;a href="https://www.listnux.com/blog/six-biggest-offenders-of-the-right-to-privacy/" rel="noopener noreferrer"&gt;compromising their privacy&lt;/a&gt; and sharing their browser habits with big Internet monopolies.&lt;/p&gt;

&lt;p&gt;It's meant to satisfy a simple curiosity about how many people visit your site and what pages they view. It's not a tool to replace Google Analytics, or Piwiq/Matomo, or Statcounter. It is meant to simply present nicely the logs your web server already keeps.&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href="https://goaccess.io/" rel="noopener noreferrer"&gt;GoAccess&lt;/a&gt; • &lt;a href="https://github.com/allinurl/goaccess/" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  [Bonus] &lt;a href="https://github.com/chubin/wttr.in" rel="noopener noreferrer"&gt;wttr.in&lt;/a&gt; - the right way to check the weather
&lt;/h3&gt;

&lt;p&gt;So, is this storm still going outside? You can't hear any rain dropping on your windows, but you can't be sure without leaving that terminal (or that chair). Why don't you simply &lt;code&gt;curl wttr.in&lt;/code&gt; or &lt;code&gt;curl wttr.in/YOUR-LOCATION&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-10.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.listnux.com%2Fstatic%2Fpictures%2F20190702-10.jpeg" alt="wttr.in screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nope, not a single cloud. Nice!&lt;/p&gt;

&lt;p&gt;&lt;small&gt;&lt;a href="https://wttr.in/" rel="noopener noreferrer"&gt;wttr.in&lt;/a&gt; • &lt;a href="https://github.com/chubin/wttr.in/" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;

</description>
      <category>commandline</category>
      <category>unix</category>
      <category>linux</category>
      <category>firstpost</category>
    </item>
  </channel>
</rss>
