A while ago, I made an article on cool command line tools. Maybe you got inspired to try some new ones? Are you as in love with the command line as I am? Time for another round of "cool command line tools"! Feel free to share your favorites in the comments! :)
Working with github a lot? Miss doing more from the command line instead of visiting the website? (actions, issues etc.). Then
gh is the tool for you! You can clone your repos, list issues, see workflows (Github Actions) and more. My favorite feature is to be able to see Actions runs directly in my terminal, which I find way more easy on the eyes than the web browser…
An example of viewing a Github Actions workflow with
gh run watch on this blog (which uses Github Actions if you didn't know!):
(if there are more runs, you get a selection list. If you prefer, you can also give the numeric id as an argument like this
gh run watch 123456)
Check the official site for a demonstration of all the features, as well as installation instructions.
Often misspell commands? You are not alone. There is actually a command line application to help you, with the fitting name
fuck! Wrote a command wrong? Just type
fuck, and it will be corrected and run. The first few times you run it, you will be prompted for suggestions (mostly correct the first time). This is probably just to set up rules based on your usage. There are even some default correction rules. Install it, type a command wrong (e.g,
got commit), type
fuck, and it will run the correctly spelled one (
The f**king github repo (sorry for being lame/fun) has screenshots, examples and other goodies!
Some people might feel like this is mundane and boring, but here goes…
tree is included in many GNU/Linux distros, but not all. I used to believe that this is a tool everybody use, but I keep getting surprised that people don't know about it. So what is
tree? Simply put, it prints the directory structure (including files) to the terminal (in pure text off course). That's it! You can pipe it, use it directly or whatever you want to do with it! There are several options, including filesizes, levels down, and so on. Many directories are big, and for that I sometimes pipe the output with
less like so
tree | less.
An article like this would be boring without a screenshot, right? Here I demonstrate the number of levels
-L option, by only printing the current directory (top level of this blog).
The features doesn't stop there! Other options include excluding empty directories (
--prune), printing directories first (
--dirsfirst), the previously mentioned filesizes (
--du) and more. Check out the man-pages and see if this is a tool you can use :)
(if you need to install it, it can be found with the name tree in most repositories. On Mac OS X you can use homebrew and install with
brew install tree)