in ,

An Illustrated Guide to Useful Command Line Tools, Hacker News


    

    

      Published on       

  

Inspired bya similar post by Ben Boyterthis a list of useful command line tools that I use. It’s not a list of every tool I use. These are tools that are new or typically not part of a standard POSIX command line environment.

This post is a living document and will be updated over time. It should be obvious that I have astrongpreference for fast tools without a large runtime dependency like Python or node.js. Most of these tools are portable to * BSD, Linux, macOS. Many also work on Windows. For OSes that ship up to date software many are available via the system package repository.

About my CLI environment:I use thezshshell,Pragmata Profont, andbase 16 default darkcolor scheme. My prompt is generated byPromptline.

Table of Contents

(Alacritty)

Alacritty is fast terminal emulator. Whilst not strictly a command line tool, it does host everything I do in the command line. It is the terminal emulator in use in all the screenshots on this page.

Homepage

(alt)

altis a tool for finding the alternate to a file. E.g. the header for an implementation or the test for an implementation. I use it paired with Neovim to easily toggle between tests and implementation.

$ alt app / models / page.rb spec / models / page_spec.rb

Homepage

(bat)

batis an alternative to the common (mis) use ofcatto print a file to the terminal. It supports syntax highlighting and git integration.

bat screenshot

Homepage

(chars)

charsshows information about Unicode characters matching a search term.

chars screenshot

Homepage

(dot)

dotis a dotfiles manager. It maintains a set of symlinks according to a mappings file. I use it to manageMy dotfiles.

dot screenshot

Homepage

(dust)

dustis an alternative (du -sh) . It calculates the size of a directory tree, printing a summary of the largest items.

dust screenshot

Homepage

(exa)

exais a replacement forLSwith sensible defaults and added features like a tree view, git integration, and optional icons. I haveLSaliased to (exa) in my shell.

exa screenshot

Homepage

(EVA)

EVAis a command line calculator similar to (BC) , with syntax highlighting and persistent history.

eva screenshot

Homepage

(fd)

FDis an alternative tofindand has a more user friendly command line interface and respects ignore files, like.Gitignore. The combination of its speed and ignore file support make it excellent for searching for files in git repositories.

fd screenshot

Homepage

(hexyl)

Hexylis a hex viewer that uses Unicode characters and color to make the output more readable.

hexyl screenshot

Homepage

(jq)

JQis kind of likeAWKfor JSON. It lets you transform and extract information from JSON documents.

jq screenshot

Homepage

(mdcat)

mdcatrenders Markdown files in the terminal. In supported terminals (not Alacritty) links are clickable (without the url being visible like in a web browser) and images are rendered.

mdcat screenshot

Homepage

(pass)

passis a password manager that uses GPG to store the passwords. I use it with thepassffFirefox extension andPass for iOSon my phone.

pass screenshot

Homepage

(Podman)

Podmanis an alternative to Docker that does not require a daemon. Containers are run as the user running Podman so files written into the host don’t end up owned by root. The CLI is largely compatible with theDockerCLI.

podman screenshot

Homepage

(Restic)

resticis a backup tool that performs client side encryption, de-duplication and supports a variety of local and remote storage backends.

(Homepage)

(ripgrep)

ripgrep (RG) recursively searches file trees for content in files matching a regular expression. It’s extremely fast, and respects ignore files and binary files by default.

ripgrep screenshot

(Homepage)

(shotgun)

Shotgunis a tool for taking screenshots on X.org based environments. All the screenshots in this post were taken with it. It pairs well withslop.

$ shotgun $ (slop -c 0,0,0,0. 75 -l -f "-i% i -g% g") eva.png

(Homepage)

(skim)

SKIMis a fuzzy finder. It can be used to fuzzy match input fed to it. I use it with Neovim and zsh for fuzzy matching file names.

skim screenshot

Homepage

(slop)

slop(Select Operation) presents a UI to select a region of the screen or a window and prints the region to stdout. Works well withShotgun.

$ slop -c 0,0,0,0. 75 -l -f "-i% i -g% g" -i 8389044 -g  (x)    291   818

Homepage

(Syncthing)

Syncthing is a decentralized file synchronization tool. Like Dropbox but self hosted and without the need for a central third-party file store.

Homepage

(tig)

tigis a ncurses TUI for git. It’s great for reviewing and staging changes, viewing history and diffs.

tig screenshot

Homepage

(titlecase)

titlecaseis a little tool I wrote to format text using atitle case format described by John Gruber. It correctly handles puctuation, and words like iPhone. I use it to obtain consistent titles on all my blog posts.

$ echo 'an illustrated guide to useful command line tools' | titlecase An Illustrated Guide to Useful Command Line Tools

I typically use it from within Neovim where selected text is piped through it in-place. This is done by creating a visual selection and then typing:: Titlecase.

Homepage

(Universal Ctags)

Universal Ctags is a fork of exuberant ctags that is actively maintained.ctagsis used to generate atagsfile that (VIM) and other tools can use to navigate to the definition of symbols in files.

$ ctags --recurse src

Homepage

(watchexec)

Watchexecis a file a directory watcher that can run commands in response to file system changes. Handy for auto running tests or restarting a development web server when source files change.

# run command on file change $ watchexec -w content cobalt build  # kill and restart server on file change $ watchexec -w src -s SIGINT -r 'cargo run'

Homepage

(z)

ztracks your most used directories and allows you to jump to them with a partial name.

z screenshot

Homepage

(zola)

Zolais a full-featured very fast static site compiler.

zola screenshot

Homepage

Previous Post:What I Learnt Building a Lobsters TUI in Rust

  

Brave Browser
Read More
Payeer

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

Broken WWE 2K20's Buggy Mess Will Last Two More Agonizing Weeks, Crypto Coins News

Broken WWE 2K20's Buggy Mess Will Last Two More Agonizing Weeks, Crypto Coins News

Vahagn vardanian ⚡️ on twitter, hacker news

Vahagn vardanian on twitter, hacker news