Oxidise your PC
- 4 minutes read - 789 wordsThis post was largely inspired by this No Boilerplate video (GitHub link) and this gist on GitHub.
Intro
I use a mix of operating systems, Windows 11 on my desktop (with WSL), Kubuntu on my laptop, Ubuntu on my work PC, Windows on another different work machine, various Linux distros on servers. Consistency makes life easier, but that is challenging when using so many different systems, especially when additional configuration is required. After watching the No Boilerplate video mentioned above, I started looking at Rust command line tools, found a gist with even more tools listed, and began experimenting.
All of the tools I will go through can be installed on Linux and Windows (and likely on ARM based Linux platforms), using cargo install. This gets the latest version of the code from crates.io, pulls all the dependencies and builds everything from scratch. Cargo can be used like a package manager to keep everything up-to-date, and because Rust enthusiasts love re-writing everything, there are rarely any dependencies to worry about. If you can’t locate a tool after installing, run cargo install --list
, some tools have a different name to invoke them (usually shorter), which will be shown under their name and version info.
The Tools
Below are tools I have used and tried so far. I may well update date this post as I try out more things in future, as a reminder to myself if nothing else. Other than the first, these will all be in alphabetical order.
After installing Rust for your system, all of the tools should be installable by simply running:
cargo install name
sccache
Sccache caches cargo binaries, improving compile times. A lot of rust packages have common dependencies, by default sccache will have a 10GB cache and will store any compiled artefacts in it. They are then loaded each time they are used by rustc, avoiding the need to re-compile. Extremely handy on lower powered machines. After installing, run the following command with a package name after it. (Not been able to get it working via Powershell yet).
RUSTC_WRAPPER=sccache cargo install
You can see how much space is being used and the cache hit rate by running:
sccache --show-stats
bandwhich
A command line network monitor. Easy to read and use.
bat
Cat with wings. Like cat it will display a text file in the terminal. Unlike cat, it will perform syntax highlighting for know formats, making reading code and config files much easier.
bottom
A better version of top, and maybe even nicer than htop.
cargo-update
Allows you to update all your cargo packages in the same way you would other packages managers like apt.
coreutils
A rust implementation of the GNU coreutils project. Because it’s cross platform it means you have access to them on Windows too!
difftastic
A git diff tool.
du-dust
du + rust. A really good visual tool to show you where the majority of disk space is being used. Multithreaded and blazing fast.
eza
A better version of ls. It uses colour to make it easier to read and has lots of nice formatting options.
fend
A arbitrary precision command line calculator, with loose syntax for unit conversion.
57 light us in furlongs
approx. 84.9447730553 furlongs
Very handy!
gitui
A simple command line gitui, surprisingly functional.
hyperfine
A simple and powerful benchmarking tool
macchina
System info at a glance
miniserve
A really simple in place web server. Great for quick testing.
monolith
Download a webpage as a single HTML file, with css and js embedded. Good for data hoarding!
nu
A modern shell environment. Outputs structured text and has handy command recall and completion.
ouch
Compression tool. Ouch will let you de-compress without having to remember flags for different containers.
pastel
Lets you look at colours in the terminal, expressed as Hex, RGB etc. Finds nearest named colours, has options for mixing them, adjusting or looking at them through different colour blind filters. Handy for UI work.
ripgrep
Grep, but faster!
ripsecrets
Check repos for secrets that shouldn’t be committed or pushed (such as auth keys and passwords).
tealdeer
Like man pages, gives you a quick tldr for a program, and more specific info for subcommands. Offline cache.
teehee
Command line hex viewer and editor.
tokei
Counts the lines of code in different languages. Handy to display at a glance what
topgrade
Maybe the star of the show, it upgrades everything for you with one command. apt, snap, pip, cargo, docker containers, rustup, tealdeer, windows update, winget, WSL, VS code extensions. You name it, it probably updates it.
zelij
A terminal multiplexer with support for tabs and split panes. On screen shortcut hints, just works out of the box. Brilliant when you are managing multiple different concurrent tasks.