Skip to main content

Small tools

The small commands that make the terminal nicer, on one page.

In useCLIWindowsmacOSLinux

Some commands do not deserve a page each, but I would not do without them. They all install with Scoop, are mostly written in Rust, and nicely replace an older tool.

ToolForReplaces
batshow a file with syntax highlighting, line numbers and git statuscat
bottom (btm)watch CPU, memory, disk, network and processes, as graphsTask Manager, top
dustsee what takes space in a folder, as a treedu
dufeach disk's free space, in a readable tabledf
tokeicount a project's lines of code, per languagecloc
tealdeer (tldr)concrete examples of a command, rather than its man pageman
glowread a formatted Markdown file in the terminal—
hyperfinemeasure and compare commands' run time, with statisticstime
sdsearch and replace in files, with a simple syntaxsed
fastfetchthe machine summary (system, CPU, memory) when a terminal opensneofetch
yt-dlpdownload a video or extract the audio from a video site—

A few uses​

bat src/main.rs # read a file, highlighted
dust -d 2 # the biggest folders, two levels deep
tldr tar # "how does it go again…"
hyperfine "rg TODO" "grep -r TODO" # compare two commands
sd "old" "new" src/*.ts # replace across files
yt-dlp -x --audio-format mp3 <url> # keep only the audio

fastfetch shows up every time a terminal opens, with a home-made ASCII logo; CortX runs it with the rest of the shell initialisation. hyperfine is how I check that an optimisation really is one, for instance in my Advent of Code solutions.