CLI
This is the list of CLI tools I found useful someday. It is useful reference as remembering all script names and options is cumbersome. Especially those I use rarely.
ripgrep
rg (ripgrep): great grep
replacement.
Recursive search and respects .gitignore by default.
Possible to configure per repository with .rgignore
Useful options:
-i
: case insentive-v
: invert matching-A n
(after),-B n
(before),-C n
(context).n
is number of lines-u
,-uu
,-uuu
: unrestricted searching with gitignored, hidden, and binary files-l
: list files matching-e
: pattern (regex) to search for. Useful when using multiple patterns-o
: show only matching fragment
sd
sd: sed alternative
Usage: sd before after
jq
jq: JSON command-line processor
Very powerful but it’s difficult to get used to the syntax.
Basics:
.
(dot) is root.[index]
: access array index.key
: access key in object.[]
: array/object iterator
See https://jqlang.github.io/jq/manual/ for more
gron
gron: Make JSON greppable!
Example: echo '{"foo": "bar", "a": {"b": 42}}' | gron
json = {};
json.a = {};
json.a.b = 42;
json.foo = "bar";
ncdu
ncdu: NCurses Disk Usage
Ultimate Plumber
up: Ultimate Plumber is a tool for writing Linux pipes with instant live preview
lazygit
lazygit: TUI git client
lazydocker
lazydocker: TUI for docker
gitui
gitui: Similar to lazygit, TUI git client
dive
dive: A tool for exploring each layer in a docker image
HTTPie
http (HTTPie): command-line HTTP client
xh
xh: HTTPie clone in Rust
comm
comm: Unix utility to compare files by common and distinct lines https://en.wikipedia.org/wiki/Comm
fd
fd: find
replacement
bat
bat: cat
replacement
hexyl
hexyl: A command-line hex viewer
rclone
rclone: rsync for cloud storage
topgrade
topgrade: A tool for automatic software (and more) upgrades
hadolint
hadolint: Dockerfile linter
shellcheck
shellcheck: Shell scripts linter
hey
hey: HTTP load generator
Usage: hey https://example.org/api/test
Example output:
Summary:
Total: 0.6848 secs
Slowest: 0.4713 secs
Fastest: 0.0267 secs
Average: 0.1289 secs
Requests/sec: 292.0483
Response time histogram:
0.027 [1] |■
0.071 [64] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
0.116 [41] |■■■■■■■■■■■■■■■■■■■■■■■■■■
0.160 [35] |■■■■■■■■■■■■■■■■■■■■■■
0.205 [16] |■■■■■■■■■■
0.249 [31] |■■■■■■■■■■■■■■■■■■■
0.293 [2] |■
0.338 [1] |■
0.382 [5] |■■■
0.427 [1] |■
0.471 [3] |■■
Latency distribution:
10% in 0.0384 secs
25% in 0.0587 secs
50% in 0.1089 secs
75% in 0.1864 secs
90% in 0.2285 secs
95% in 0.3336 secs
99% in 0.4677 secs
Details (average, fastest, slowest):
DNS+dialup: 0.0131 secs, 0.0267 secs, 0.4713 secs
DNS-lookup: 0.0071 secs, 0.0000 secs, 0.0439 secs
req write: 0.0000 secs, 0.0000 secs, 0.0007 secs
resp wait: 0.0211 secs, 0.0088 secs, 0.0704 secs
resp read: 0.0730 secs, 0.0073 secs, 0.3690 secs
Status code distribution:
[200] 200 responses