Skip to content


This page is the master guide for my development environment. It contains short entries on all notable tools, commands, and other miscellaneous things that are worth documenting. As such, it's sort of a hodge podge, but I have attempted to keep it somewhat organized so that it remains useful.

Alias Cheat Sheet

Alias Definition Description
.. cd .. Changes to the parent directory
... cd ../.. Changes to the grandparent directory
- ls - Changes to the previous directory
brg batgrep Short for batgrep
cat bat --paging=never Replaces cat with bat
count find . -type f \| wc -l Counts all files in the directory and any subdirectories
ct column -t Formats input data into columns
cz chezmoi Short for chezmoi
cza chezmoi apply Applies pending chezmoi changes
czd cd ~/.local/share/chezmoi Changes into the chezmoi source directory
cze chezmoi edit Edits a file tracked by chezmoi
czr chezmoi apply ~/.nixpkgs/darwin-configuration.nix darwin-update && exec $SHELL Applies the nix-darwin configuration and resets the shell environment
g git Short for git
gcmsg git commit -m Commits changes with a short message
gd git diff Shows current diff of working tree
gst git status Shows status of working tree
left ls -t -1 Sorts files by most recently modified
ll ls -la Shows all files and their properties
lt du -sh * \| sort -h Sorts files by their size
mount mount \| grep -E ^/dev \| column -t Makes the mount output easier to read
now date +"%T" Returns the current time
ports sudo lsof -iTCP -sTCP:LISTEN -n -P Shows all open ports
today date +"%d-%m-%Y" Returns the current date
vi vim Short for vim

CLI Tools


A CLI tool for recording terminal sessions. To start a recording:

asciinema rec

Press ctrl+d to stop the recording. You can save the cast locally or upload it to the SaaS version. Unfortunately it doesn't provide a way to embed the output in something like a Github README. I've found the best method for making it portable is to convert the cast file to an SVG using svg-term-cli. This can be checked in and then referenced directly in the README.c


A general-purpose automation tool for managing system lifecycles in a declarative and idempotent way.


A self-learning CLI tool for quickly navigating filesystems. Example:

j co/de  # cd's into code/dev

The above works because I spend a large amount of time navigating to my ~/code folder and dev is the only child that partially matches. This will improve overtime as the learning algorithm progresses.


The official CLI tool for Amazon AWS.


A fancy version of cat. Performs syntax highlighting, pretty printing, line numbering, etc. In my environment I have aliased cat to bat since by default bat will remove formatting when it detects a pipe so it should be a suitable replacement.

cat myfile.json  # or bat myfile.json

These additional tools are also available:

  • batman: Displays man pages using bat
  • batgrep: Like ripgrep but passes output to bat (aliased to brg)
  • batdiff: Like diff but uses bat
  • batchwatch: Watches a file using bat for output
  • prettybat: Pretty prints a file using bat


The official CLI tool for Bitwarden. Provides programmatic access to a Bitwarden vault.

bw login  # Is persisted
bw unlock
bbw get folder lab


A dotfile manager. See the dedicated page for more information.


An advanced network mesh geared at connecting microservices in a distributed environment.


A sensible replacement for the find CLI tool. It supports regular expressions, glob patterns, and strict-text searching.

$ fd netfl

$ fd passwd /etc

$ fd '^x.*rc$'


A fuzzy-finder tool. Provides an interactive interface for performing a fuzzy search across arbitrary data piped into the program. Incredibly useful when combined with other tools like fd and tldr.

d=$(fd *.json code | fzf) && bat $d


The official Github CLI tool. Provides programmatic access to most features available on Github including the issues/PR lifecycles. Before it can be used it must be authenticated to a Github account:

gh auth login

Once authenticated, it's possible to begin interacting with repositories. Note that gh is context-aware based on the current repository.

gh pr create --title "The bug is fixed" --body "Everything works again"


The official Google Cloud CLI tool. Provides programmatic access to various Google Cloud services and a centralized interface for managing projects.


The official LastPass CLI tool. Provides programmatic access to a Vault for fetching secrets. Before using, requires authentication:

lpass login <username>

Once authenticated, you can begin querying the vault:

$ lpass ls

$ lpass show "Lab/AWS"


A tool for manipulating and generating JSON on the command-line. Examples:

$ echo '{"id": 1, "name": "Cam"}' | jq '.id'

$ echo '{"nested": {"a": {"b": 42}}}' | jq '.nested.a.b'

$ echo '[0, 1, 1, 2, 3, 5, 8]' | jq '.[3]'

$ echo '[{"id": 1, "name": "Mario"}, {"id": 2, "name": "Luigi"}]' | jq '.[1].name'

$ echo '{ "a": 1, "b": 2 }' | jq '{ a: .b, b: .a }'
{ "a": 2, "b": 1 }

$ echo '{ "a": 1, "b": 2 }' | jq 'keys'
[a, b]

$ echo '[1, 2, [3, 4]]' | jq 'flatten'
[1, 2, 3, 4]

Provides access to cheat sheets from the command-line. This tool is a staple in my environment as it provides a singular interface for storing rarely used CLI invocations that are useful but hard to remember. Cheats are stored in ~/.cheats directory in files that end with the .cheat extension. They are controlled by chezmoi.

Creating a new cheat:

% git, code

# Revert last commit
git reset HEAD~

The above creates a cheat tagged wit git and code with a description of "Revert last commit." When selected, the command it will return is git reset HEAD~.

Accessing cheats is done by either pressing ctrl + g or executing navi.


A tool for generating immutable images. Packer provides a syntax for defining immutable operating system images which can then be readily deployed through various services like AWS/GCP/Azure. These are often referred to as "golden images."


A sensible replacement for grep. It's faster, provides support for regular expressions, and provides more useful context then it's counterpart.

cat foo.txt | rg "^Option: .*partial value"

For source code files, it's recommended to use batgrep:

cat | brg "def myfunc_.*_name"

It provides more context around matche as well as syntax highlighting.


A tool for automating complex deployments. Provides a syntax for defining the state of a complex system and then supports interacting with that state by creating it, modifying it, and destroying it. Supports the IaC model.


A tool for generating short summaries of various popular CLI tools. A great alternative to --help or man as it often succinctly demonstrates what a tool is and how to quickly get started with it.

tldr git


A secrets backend for managing various secrets. Provides a secret store for arbitrary secrets, encryption on demand, dynamic credentials, certificate generation, etc.