12 Useful Command-Line Tools


Here are some cool command-line tools I use. Feel free to share your tips in the comments.

wttr.in

A terminal-friendly weather API.

curl "wttr.in/paris?m"

Weather report for Paris from wttr.in

imagemagick

Convert an image into another format, with rich customization options.

magick input.jpg output.png

mat2

A metadata removal tool to anonymize files (like GPS coordinates added by your phone when taking a picture).

$ mat2 --show chicago1.jpg
[+] Metadata for chicago1.jpg:
    CreateDate: 2013:04:21 19:50:18-05:00
    CreatorTool: Adobe Photoshop CS5.1 Windows
    DeviceManufacturer: Hewlett-Packard

Pandoc

Convert common document formats into other common document formats. I use it to convert Markdown into basic html pages or PDF documents. You can also generate more sophisticated formats like .docx and PowerPoint slideshows.

pandoc --standalone index.md -o index.html

Examples

youtube-dl

A very rich Youtube video/audio downloader.

youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch\?v\=turjyoThzHY

ffmpeg

Record, convert and stream audio / video.

ffmpeg -i input.mp4 output.avi

languagetool

A free offline grammar / spelling checker. Warning: requires JRE for the offline client.

$ echo "This frase is knot gret." | languagetool -l en-US
Expected text language: English (US)
Working on STDIN...
1.) Line 1, column 6, Rule ID: MORFOLOGIK_RULE_EN_US prio=-10
Message: Possible spelling mistake found.
Suggestion: phrase; frame; phrases; Fraser; erase; phrased; frisé
This frase is knot gret.
     ^^^^^

2.) Line 1, column 12, Rule ID: CONFUSION_KNOT_NOT[1]
Message: Did you mean the negation 'is not'?
Suggestion: is not
This frase is knot gret.
           ^^^^^^^
More info: https://en.wiktionary.org/wiki/knot

3.) Line 1, column 20, Rule ID: MORFOLOGIK_RULE_EN_US prio=-10
Message: Possible spelling mistake found.
Suggestion: get; great; grew; Greg; greet; Bret; fret; grit; GRE; Greta; egret; grep; GET; GREC; GRED; GRETA; Grey; RET
This frase is knot gret.
                   ^^^^
Time: 1949ms for 1 sentences (0.5 sentences/sec)

rig

rig generates a random identity from a pool of names and locations.

$ rig -m
Paul Bentley
857 Flanty Terr
Emporia, KS  66801
(316) xxx-xxxx

pass

A simple password manager that uses gpg. The file-based format lets you easily synchronize your store using git or other file sync tools.

$ pass username/verybadfrags.com
hunter2

jq

Manipulate and filter JSONs.

$ echo '{"foo": 0, "bar" : "abc"}' | jq .bar
"abc"

mpv

A powerful media player.

mpv https://www.youtube.com/watch?v=dQw4w9WgXcQ

Bonus

qrenco.de

Generate a text-based QR Code by calling this service.

curl qrenco.de/https://www.verybadfrags.com

QR Code link to this site