12 Useful Command-Line Tools

Weather report for Paris from wttr.in

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.

1
curl "wttr.in/paris?m"

imagemagick

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

1
magick input.jpg output.png 

mat2

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

1
2
3
4
5
6
$ 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.

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

Examples

youtube-dl

A very rich Youtube video/audio downloader.

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

ffmpeg

Record, convert and stream audio / video.

1
ffmpeg -i input.mp4 output.avi

languagetool

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ 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.

1
2
3
4
5
$ 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.

1
2
$ pass username/verybadfrags.com
hunter2

jq

Manipulate and filter JSONs.

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

mpv

A powerful media player.

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

Bonus

qrenco.de

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

1
curl qrenco.de/https://www.verybadfrags.com
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
█████████████████████████████████
█████████████████████████████████
████ ▄▄▄▄▄ █▄▀▄▄ ███ ▄▄▄▄▄ ████
████ █ █ ██▄ ▄█ █ █ █ ████
████ █▄▄▄█ ██▀█ ▄█ █▄█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█ ▀▄█▄▀ █▄█▄▄▄▄▄▄▄████
████ ▄█ █▄█▀▄▀ ▄█ ▀█▀▄▀▀▀▀▀▄████
██████ █ ▀▄ ▄▄█▄█▄█ ▀█▄ █ ▀▀ ████
████ ▄ ▀▀▄ ▄▄ ▀▄▀█ ▀▀▄█▀██▀▄████
████ ▄▀▀ ▄▄█▀█▀▀█▀▄█ ▄▀▄ ▄ ████
████▄█▄█▄▄▄▄▀▀ ▄▄▄█▄ ▄▄▄ █ █████
████ ▄▄▄▄▄ ██ ▄ ▄▀ █▄█ ███▄████
████ █ █ █ ▄▀ █ ▄▄▄ ▄▄██ ▀████
████ █▄▄▄█ █▀▀█▄▀▄▀▀█▄█▀ ▄ ████
████▄▄▄▄▄▄▄█▄█▄▄████▄▄███▄██▄████
█████████████████████████████████
█████████████████████████████████