Cheat sheet
Every shell alias and function the roles add to your shell. There are 113 aliases and 43 functions across the roles below.
This page is generated from each role's defaults/main.yaml, so it always matches what dotpro apply installs. The role pages it links to explain the why behind each command.
Quick reference
| Role | Commands |
|---|---|
| Ansible | play playcheck |
| Unix | system upgrades whereami kv home profile files folders nameservers mxrecords header keyvalue tab list aliases functions commands |
| Ubuntu | version |
| macOS | version |
| WSL | open copy desktop downloads documents |
| Git | branches branch branch-delete branches-removed branches-delete branches-cleanup status commit checkout add pull push develop remote origin gitrepo main master log gbs gbd gcm gaa gpp gss worktree who what when bugs hotfixes git-wtf precommit precommit-all |
| GitHub | github prl prc prv ghi ghr gh-authenticate gh-account |
| GitLab | gitlab mrl mrc mrv gli glci gl-authenticate gl-account |
| Python | pip python |
| Kubernetes | kube kubeconfig kubernetes kube-contexts kube-clusters kube-namespaces kube-nodes clusters namespace nodes nodesw nodestopcpu nodestopmemory pods podsw podsclean podstopcpu podstopmemory deployments services secrets configs ingresses events eventsw logs logsf kube-configs kube-config kube-namespace kubectl |
| OpenTofu | opentofu plan apply workspaces workspace tfi tfp tfa |
| Terraform | plan apply workspaces workspace tfi tfp tfa |
| DigitalOcean | digitalocean do-projects do-authenticate do-account do-kubernetes do-kubeconfig |
| Agents | worklog |
| Claude | fable opus sonnet haiku claude-authenticate claude-account |
| Bitwarden | bitwarden bitwarden-generate bitwarden-password password bitwarden-lock bitwarden-sync bitwarden-status bitwarden-logout bitwarden-list bitwarden-unlock bitwarden-copy bitwarden-username bitwarden-totp bitwarden-notes bitwarden-item bitwarden-add bitwarden-open |
| SSH | ssh-public ssh-private |
Dotfiles Pro
Ansible
| Alias | Runs |
|---|---|
play | ansible-playbook --diff --ask-become-pass \$ANSIBLE_PLAYBOOK |
playcheck | ansible-playbook --check --diff --ask-become-pass \$ANSIBLE_PLAYBOOK |
System
Unix
| Alias | Runs |
|---|---|
system | header 'System'; version; header 'Software'; versions |
upgrades | versions-history |
whereami | pwd |
kv | keyvalue |
home | cd ~; list |
profile | cd ~/.profile.d; list |
files | ls -a -p | grep -v / |
folders | ls -1 -a -d */ --color=never |
nameservers | nslookup -type=NS |
mxrecords | nslookup -type=MX |
Functions
| Function | Runs |
|---|---|
header | header-{{ unix_header_style }} "$@" |
keyvalue | local d="" r="" c=""if [ -t 1 ]; thend=$'\033[2m'; r=$'\033[0m'[ -n "$3" ] && c=$'\033['"$(_sgr "$3")"mfiif [ -n "$c" ]; then… full function |
tab | printf '\033]0;%s\007' "${*:-}" |
list | local storage={{ unix_list_storage | default(false) | ternary(1, 0) }}header "List"keyvalue 'Location' "$(pwd)"keyvalue 'Files' "$(_count ./ files "$storage")"keyvalue 'Folders' "$(_count ./ folders "$storage")"echo ""… full function |
aliases | local filter="$1" f group name val any=0for f in ~/.profile.d/aliases/*.sh; do[ -f "$f" ] || continuegroup=${f##*/}; group=${group%.sh}[ -n "$filter" ] && [ "$group" != "$filter" ] && continuegrep -q '^alias ' "$f" || continue… full function |
functions | local filter="$1" f group sig any=0for f in ~/.profile.d/aliases/*.sh; do[ -f "$f" ] || continuegroup=${f##*/}; group=${group%.sh}[ -n "$filter" ] && [ "$group" != "$filter" ] && continuegrep -q '^[a-zA-Z][a-zA-Z0-9_-]*() {' "$f" || continue… full function |
commands | aliases "$@"functions "$@" |
Ubuntu
| Alias | Runs |
|---|---|
version | lsb_release -a |
macOS
| Alias | Runs |
|---|---|
version | sw_vers |
WSL
| Alias | Runs |
|---|---|
open | wslview |
copy | clip.exe |
Functions
| Function | Runs |
|---|---|
desktop | cd "$WIN_HOME/Desktop" && list |
downloads | cd "$WIN_HOME/Downloads" && list |
documents | cd "$WIN_HOME/Documents" && list |
Development
Git
| Alias | Runs |
|---|---|
branches | header 'Git branches' && git branch && git branch -rv |
branch | git switch |
branch-delete | git branch --delete |
branches-removed | git fetch --prune && git branch --format='%(refname:short) %(upstream:track)' | grep '\[gone\]' | cut -d' ' -f1 |
branches-delete | git fetch --prune && git branch --format='%(refname:short) %(upstream:track)' | grep '\[gone\]' | cut -d' ' -f1 | xargs -r git branch -D |
branches-cleanup | header 'Branches (cleanup)' && branches-removed && read -rp 'Do you want to cleanup these branches and switch to main? [y/N] ' reply && case "\$reply" in [yY]*) branches-delete && main;; esac |
status | header 'Git status' && git status |
commit | git commit -m |
checkout | git checkout |
add | git add |
pull | git pull |
push | git push |
develop | git checkout develop && git pull |
remote | git remote -v |
origin | git remote show origin |
gitrepo | git remote get-url origin |
main | git checkout main && git pull |
master | git checkout master && git pull |
log | header 'Git log' && git log --oneline --graph --decorate |
gbs | header 'Git branches' && git branch && git branch -rv |
gbd | git branch --delete |
gcm | git commit -m |
gaa | git add --all |
gpp | git push |
gss | git-statuses |
Functions
| Function | Runs |
|---|---|
worktree | case "${1:-}" in"" | list | add | path | names | pick | exec | rm | clean | prune | hook | version | --version | -V | help | -h | --help)command worktree "$@";;*)cd "$(command worktree add "$@")" || return… full function |
who | git shortlog -sn --no-merges |
what | git log --format=format: --name-only --since='1 year ago' | sort | uniq -c | sort -nr | head -20 |
when | git log --format='%ad' --date=format:'%Y' | sort | uniq -c |
bugs | git log -i -E --grep='fix|bug|broken' --name-only --format='' | sort | uniq -c | sort -nr | head -20 |
hotfixes | git log --oneline --since='1 year ago' --grep='revert\|hotfix\|emergency\|rollback' --regexp-ignore-case |
git-wtf | header 'Who'; who; header 'What'; what; header 'When'; when; header 'Bugs'; bugs; header 'Hotfixes'; hotfixes |
precommit | pre-commit |
precommit-all | pre-commit run --all-files |
GitHub
| Alias | Runs |
|---|---|
github | gh-account |
prl | gh pr list |
prc | gh pr create |
prv | gh pr view |
ghi | gh issue list |
ghr | gh run list |
Functions
| Function | Runs |
|---|---|
gh-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " gh-authenticate <name> [hostname]"echo ""echo "Options:"echo ""… full function |
gh-account | header 'GitHub'if [ -z "$1" ]; thenif [ -n "$GH_CONFIG_DIR" ]; thenkeyvalue "Account" "$(basename "$GH_CONFIG_DIR")"keyvalue "Config" "${GH_CONFIG_DIR/$HOME/\~}"gh auth status 2>&1 | sed 's/^/ /'… full function |
GitLab
| Alias | Runs |
|---|---|
gitlab | gl-account |
mrl | glab mr list |
mrc | glab mr create |
mrv | glab mr view |
gli | glab issue list |
glci | glab ci status |
Functions
| Function | Runs |
|---|---|
gl-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " gl-authenticate <name> [hostname]"echo ""echo "Options:"echo ""… full function |
gl-account | header 'GitLab'if [ -z "$1" ]; thenif [ -n "$GLAB_CONFIG_DIR" ]; thenkv "Account" "$(basename "$GLAB_CONFIG_DIR")"kv "Config" "${GLAB_CONFIG_DIR/$HOME/\~}"glab auth status 2>&1 | sed 's/^/ /'… full function |
Python
| Alias | Runs |
|---|---|
pip | pip3 |
python | python3 |
Infrastructure
Kubernetes
| Alias | Runs |
|---|---|
kube | kubectl |
kubeconfig | kube-config |
kubernetes | kube-config |
kube-contexts | kubectl config get-contexts |
kube-clusters | kubectl config get-clusters |
kube-namespaces | kubectl get namespaces |
kube-nodes | kubectl get nodes |
clusters | kubectl config get-clusters |
namespace | kube-namespace |
nodes | kubectl get nodes |
nodesw | kubectl get nodes --watch |
nodestopcpu | kubectl top node --sort-by='cpu' |
nodestopmemory | kubectl top node --sort-by='memory' |
pods | kubectl get pods |
podsw | kubectl get pods --watch |
podsclean | kubectl delete pod --all-namespaces --field-selector='status.phase==Failed' |
podstopcpu | kubectl top pod --sort-by='cpu' |
podstopmemory | kubectl top pod --sort-by='memory' |
deployments | kubectl get deployments |
services | kubectl get services |
secrets | kubectl get secrets |
configs | kubectl get configmaps |
ingresses | kubectl get ingresses |
events | kubectl get events --sort-by='.lastTimestamp' |
eventsw | kubectl get events --sort-by='.lastTimestamp' --watch |
logs | kubectl logs |
logsf | kubectl logs --follow |
Functions
| Function | Runs |
|---|---|
kube-configs | ls -1 ~/.kube/configs/*.yaml 2>/dev/null | xargs -I{} basename {} .yaml |
kube-config | header 'Kubernetes'if [ -z "$1" ]; thenif [ -n "$KUBECONFIG" ]; thenkv 'Kubeconfig' "${KUBECONFIG/$HOME/\~}"kv 'Cluster' "$(kubectl config get-clusters 2>/dev/null | tail -n +2 | head -1)"kv 'Version' "$(kubectl version -o json 2>/dev/null | jq -r '.serverVersion.gitVersion')"… full function |
kube-namespace | if [ -z "$1" ]; thenkubectl get namespacesreturn 0fiif ! kubectl get namespace "$1" >/dev/null 2>&1; thenecho "Namespace not found: $1"… full function |
kubectl | if [ -n "$KUBECTL_NAMESPACE" ] && [[ ! " $* " =~ " --namespace " ]] && [[ ! " $* " =~ " -n " ]]; thencommand kubectl --namespace "$KUBECTL_NAMESPACE" "$@"elsecommand kubectl "$@"fi |
OpenTofu
| Alias | Runs |
|---|---|
opentofu | tofu |
plan | tofu plan |
apply | tofu apply |
workspaces | tofu workspace list |
workspace | tofu workspace select |
tfi | tofu init |
tfp | tofu plan |
tfa | tofu apply |
Terraform
| Alias | Runs |
|---|---|
plan | terraform plan |
apply | terraform apply |
workspaces | terraform workspace list |
workspace | terraform workspace select |
tfi | terraform init |
tfp | terraform plan |
tfa | terraform apply |
Cloud
DigitalOcean
| Alias | Runs |
|---|---|
digitalocean | do-account |
do-projects | doctl projects list |
Functions
| Function | Runs |
|---|---|
do-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " do-authenticate <context>"echo ""echo "Options:"echo ""… full function |
do-account | header 'DigitalOcean'if [ -z "$1" ]; thenif [ -n "$DIGITALOCEAN_CONTEXT" ]; thenlocal info email teaminfo=$(doctl account get --format Email,Team --no-header 2>/dev/null)email=$(echo "$info" | awk '{print $1}')… full function |
do-kubernetes | header 'Clusters'doctl kubernetes cluster listecho ""echo "Tip: use 'do-kubeconfig <cluster>' to save a kubeconfig" |
do-kubeconfig | local activate="" name=""while [ "$#" -gt 0 ]; docase "$1" in--activate) activate=1 ;;*) name="$1" ;;esac… full function |
AI
Agents
| Function | Runs |
|---|---|
worklog | local dir="$HOME/.agents/worklog" fileif [ -n "$1" ]; thenfile="$dir/$1.md"elsefile="$dir/$(date +%F).md"[ -f "$file" ] || file=$(ls -1 "$dir"/[0-9]*.md 2>/dev/null | tail -1)… full function |
Claude
| Alias | Runs |
|---|---|
fable | claude --model fable |
opus | claude --model opus |
sonnet | claude --model sonnet |
haiku | claude --model haiku |
Functions
| Function | Runs |
|---|---|
claude-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " claude-authenticate <name>"echo ""echo "Options:"echo ""… full function |
claude-account | header 'Claude'if [ -z "$1" ]; thenif [ -n "$CLAUDE_CONFIG_DIR" ]; thenkv "Account" "$(basename "$CLAUDE_CONFIG_DIR")"kv "Config" "${CLAUDE_CONFIG_DIR/$HOME/\~}"claude auth status 2>&1 | sed 's/^/ /'… full function |
Security
Bitwarden
| Alias | Runs |
|---|---|
bitwarden | bw |
bitwarden-generate | bw generate -uln --length 32 |
bitwarden-password | bw get password |
password | bw generate -uln --length 32 |
bitwarden-lock | bw lock |
bitwarden-sync | bw sync |
bitwarden-status | bw status |
bitwarden-logout | bw logout |
Functions
| Function | Runs |
|---|---|
bitwarden-list | bw list items --search "$1" | jq '[.[] | {id, name, username: .login.username, uri: .login.uris[0].uri}]'; |
bitwarden-unlock | export BW_SESSION=$(bw unlock --raw) |
bitwarden-copy | bw get password "$1" | xclip -selection clipboard |
bitwarden-username | bw get username "$1" |
bitwarden-totp | bw get totp "$1" |
bitwarden-notes | bw get notes "$1" |
bitwarden-item | bw get item "$1" | jq '{name, username: .login.username, uri: .login.uris[0].uri, totp: .login.totp}' |
bitwarden-add | if [ -z "$1" ] || [ -z "$2" ]; thenecho "Usage:"echo " bitwarden-add <name> <username>"echo ""echo "Prompts for the password, so it never lands in the shell history."return 1… full function |
bitwarden-open | bw get item "$1" | jq -r '.login.uris[0].uri' | xargs xdg-open |
SSH
| Alias | Runs |
|---|---|
ssh-public | cat ~/.ssh/id_ed25519.pub |
ssh-private | cat ~/.ssh/id_ed25519 |