Let's make a list of our favorite CLI utilities.

3 years ago by chaoticAnimals to c/commandline

mug9145 6 points 3 years ago path: 0 842765, hotness: undefined, score: 6, children: 1
chaoticAnimals 1 point 3 years ago

Interesting :)

path: 0 842765 866575, hotness: undefined, score: 1, children: 0
sisyphean 5 points 3 years ago

I really like jless. You can pipe the JSON output of a cURL command into it and it displays it in a really nice, easy to read way with collapsible arrays and objects.

path: 0 286367, hotness: undefined, score: 5, children: 1
sirnak 2 points 3 years ago

Why haven't I heard of this before?? Absolute gamechanger o_O

path: 0 286367 546876, hotness: undefined, score: 2, children: 0
Algae 4 points 3 years ago

My answers (mostly running in powershell - not that it makes much of a difference!)

Rust-based utilities I couldn't live without:

  • fd (fd-find) for finding my files
  • rg (ripgrep) for string searches
  • sd (sed) for search and replace
  • dust (dust) for information about my directories
  • lsd (aliased to ls or l) for replacing Dir
  • bat (better cat) - for when the help pages are too long

Other stuff I love:

  • htop - I just learned you can run this in WSL to see all your system cores. It's pretty!
  • nvim - obviously. The best vim. Even works in VSCode
path: 0 230669, hotness: undefined, score: 4, children: 0
mim 4 points 3 years ago

Taskwarrior.

path: 0 455252, hotness: undefined, score: 4, children: 0
FiveAcres 4 points 3 years ago

In Bash, I like to use cdargs

sudo apt-get install cdargs

It allows you to set up shortcuts on the fly,

cv sdbackup

rather than cd /media/user/Backup Plus/ MyFiles/current/sdbackup

cv with no argument will give you a list to select from current shortcuts

path: 0 446063, hotness: undefined, score: 4, children: 1
dark776174657273 1 point 3 years ago

Of those mentioned, this one intrigues me most. Thanks!

path: 0 446063 1210006, hotness: undefined, score: 1, children: 0
attn_dfct_dev 4 points 3 years ago
  • scoop - closest to apt on Windows
  • yt-dlp - active fork of youtube-dl
  • neofetch - System information display
  • winfetch - Same as neofetch, but for windows
  • pandoc - Ultimate converter
  • ffmpeg - must have tool
  • taskwarrior - best task manager imho
path: 0 464426, hotness: undefined, score: 4, children: 0
RandomDevOpsDude 3 points 3 years ago

I write a lot of bash scripts that end up running in automation in some fashion.

#!/usr/bin/env bash

set -euxo pipefail

Is pretty standard for me.

-e exit on error

-o pipefail exit on pipeline fail

-u error on unset variables

-x trace

path: 0 324279, hotness: undefined, score: 3, children: 0
fallenpixel 3 points 3 years ago

Always partial to yq and jq. No easier way to interact with kubernetes outputs on the fly.

path: 0 323609, hotness: undefined, score: 3, children: 3
Andy 2 points 3 years ago

I don't know about k8s work in particular, but I enjoy jello and yamlpath more than jq and yq.

path: 0 323609 358073, hotness: undefined, score: 2, children: 0
nevalem 2 points 3 years ago

Don't forget about fq!

path: 0 323609 719353, hotness: undefined, score: 2, children: 0
RandomDevOpsDude 2 points 3 years ago

How I have never heard of yq, I'm unsure, but thank you as I'm sure it will make life easier

path: 0 323609 324132, hotness: undefined, score: 2, children: 0
chaoticAnimals 2 points 3 years ago

I'm a pretty big fan of icdiff. This utility allows you to compare two files to see what has been added or removed by using colorful fonts to highlight values.

https://github.com/jeffkaufman/icdiff

path: 0 358332, hotness: undefined, score: 2, children: 2
Andy 3 points 3 years ago

Another good one is riff (riffdiff on crates.io).

EDIT: for single-column view, that is

path: 0 358332 358333, hotness: undefined, score: 3, children: 0
cd_slash_rmrf 0 points 3 years ago

I recently learned about diffsitter which uses tree-sitter for meaningful diffs

path: 0 358332 852126, hotness: undefined, score: 0, children: 0
gamma 2 points 3 years ago

pv, which is like cat, simply copying files or stdin to stdout, but prints statistics to the terminal.

A related tip: dd isn't special in the way most people use it. This works too, if you're root: pv my-fav-distro.iso > /dev/sdc

path: 0 746987, hotness: undefined, score: 2, children: 0
commandline
commandline

@programming.dev

login for more options
2242
131
23

go to feed...