Cheat sheet
Every shell alias and function the roles add to your shell. There are 132 aliases and 66 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 warning keyvalue tab list aliases functions commands |
| Ubuntu | version |
| macOS | version |
| WSL | open copy desktop downloads documents |
| Claude | fable opus sonnet haiku claude-authenticate claude-account |
| Codex | chatgpt codex-authenticate codex-account |
| 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 |
| Projects | project projects projectinfo |
| GitHub | github prl prc prv ghi ghr gh-authenticate gh-account |
| GitLab | gitlab mrl mrc mrv gli glci glab-authenticate glab-account |
| Atlassian | atlassian jira confluence acli acli-authenticate acli-account |
| Python | pip python |
| Sentry | sentry sentry-info sentry-projects sentry-issues sentry-releases sentry-authenticate sentry-account |
| Grafana | grafana grafana-check grafana-dashboards grafana-datasources grafana-firing gcx-authenticate gcx-account |
| 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 doctl-projects doctl-authenticate doctl-account doctl-kubernetes doctl-kubeconfig |
| Google Cloud | googlecloud gcp gcloud-kubernetes gcloud-authenticate gcloud-account gcloud-project gcloud-region gcloud-kubeconfig |
| Google Workspace | googleworkspace google inbox gws-authenticate gws-account mail-search mail-read emails |
| 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 }} "$@" |
warning | _warning '{{ unix_header_styles[unix_header_style] | list | join("' '") }}' "$@" |
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 c=-n[ -t 1 ] && c=-Cheader "List"keyvalue 'Location' "$(pwd)"echo ""if [ "$(tree -d -L 1 --gitignore --noreport | wc -l)" -gt 13 ]; then… 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 |
AI
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 |
Codex
| Alias | Runs |
|---|---|
chatgpt | codex-account |
Functions
| Function | Runs |
|---|---|
codex-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " codex-authenticate <name>"echo ""echo "Options:"echo ""… full function |
codex-account | header 'Codex'if [ -z "$1" ]; thenif [ -n "$CODEX_HOME" ]; thenkv "Account" "$(basename "$CODEX_HOME")"kv "Config" "${CODEX_HOME/$HOME/\~}"codex login status 2>&1 | sed 's/^/ /'… full function |
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 |
Projects
| Function | Runs |
|---|---|
project | if [ -z "${1:-}" ]; thenprojectsreturn 0filocal match name path title contextmatch=$(_projects_data | awk -F'\t' -v n="$1" '$1 == n')… full function |
projects | header 'Projects'_projects_data | while IFS="$(printf '\t')" read -r name path title context; dokeyvalue "$name" "$path"doneecho "" |
projectinfo | header "Project $(basename "$PWD")"keyvalue Location "$PWD"keyvalue Repository "$(git remote get-url origin 2>/dev/null)"header 'Git branches'git branchgit branch -rv… full function |
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 | glab-account |
mrl | glab mr list |
mrc | glab mr create |
mrv | glab mr view |
gli | glab issue list |
glci | glab ci status |
Functions
| Function | Runs |
|---|---|
glab-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " glab-authenticate <name> [hostname]"echo ""echo "Options:"echo ""… full function |
glab-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 |
Atlassian
| Alias | Runs |
|---|---|
atlassian | acli-account |
jira | acli jira |
confluence | acli confluence |
Functions
| Function | Runs |
|---|---|
acli | if [ -n "$ACLI_ACCOUNT" ]; thenHOME="$HOME/.config/acli-accounts/$ACLI_ACCOUNT" command acli "$@"elsecommand acli "$@"fi |
acli-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " acli-authenticate <name>"echo ""echo "Options:"echo ""… full function |
acli-account | header 'Atlassian'if [ -z "$1" ]; thenif [ -n "$ACLI_ACCOUNT" ]; thenkv "Account" "$ACLI_ACCOUNT"kv "Home" "~/.config/acli-accounts/$ACLI_ACCOUNT"acli auth status 2>&1 | sed 's/^/ /'… full function |
Python
| Alias | Runs |
|---|---|
pip | pip3 |
python | python3 |
Sentry
| Alias | Runs |
|---|---|
sentry | sentry-account |
sentry-info | sentry-cli info |
sentry-projects | sentry-cli projects list |
sentry-issues | sentry-cli issues list |
sentry-releases | sentry-cli releases list |
Functions
| Function | Runs |
|---|---|
sentry-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " sentry-authenticate <name> [url]"echo ""echo "Options:"echo ""… full function |
sentry-account | header 'Sentry'if [ -z "$1" ]; thenif [ -n "$SENTRY_PROPERTIES" ]; thenlocal url orgurl="$(sed -n 's/^defaults\.url *= *//p' "$SENTRY_PROPERTIES" 2>/dev/null)"org="$(sed -n 's/^defaults\.org *= *//p' "$SENTRY_PROPERTIES" 2>/dev/null)"… full function |
Infrastructure
Grafana
| Alias | Runs |
|---|---|
grafana | gcx-account |
grafana-check | gcx config check |
grafana-dashboards | gcx dashboards list |
grafana-datasources | gcx datasources list |
grafana-firing | gcx alert rules list --state firing |
Functions
| Function | Runs |
|---|---|
gcx-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " gcx-authenticate <name> [gcx login flags]"echo ""echo "Examples:"echo " gcx-authenticate company --server https://company.grafana.net"… full function |
gcx-account | header 'Grafana'if [ -z "$1" ]; thenif [ -n "$GCX_CONFIG" ]; thenkv "Account" "$(basename "$GCX_CONFIG" .yaml)"kv "Config" "${GCX_CONFIG/$HOME/\~}"kv "Context" "$(gcx config current-context 2>/dev/null)"… full function |
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 | doctl-account |
doctl-projects | doctl projects list |
Functions
| Function | Runs |
|---|---|
doctl-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " doctl-authenticate <context>"echo ""echo "Options:"echo ""… full function |
doctl-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 |
doctl-kubernetes | header 'Clusters'doctl kubernetes cluster listecho ""echo "Tip: use 'doctl-kubeconfig <cluster>' to save a kubeconfig" |
doctl-kubeconfig | local activate="" name=""while [ "$#" -gt 0 ]; docase "$1" in--activate) activate=1 ;;*) name="$1" ;;esac… full function |
Google Cloud
| Alias | Runs |
|---|---|
googlecloud | gcloud-account |
gcp | gcloud-account |
Functions
| Function | Runs |
|---|---|
gcloud-kubernetes | header 'Clusters'gcloud container clusters listecho ""echo "Tip: use 'gcloud-kubeconfig <cluster>' to save a kubeconfig" |
gcloud-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " gcloud-authenticate <configuration>"echo ""echo "Options:"echo ""… full function |
gcloud-account | header 'Google Cloud'if [ -z "$1" ]; thenif [ -n "$CLOUDSDK_CORE_ACCOUNT" ]; thenkv "Config" "${CLOUDSDK_CONFIG:-~/.config/gcloud}"kv "Configuration" "${CLOUDSDK_ACTIVE_CONFIG_NAME:-default}"kv "Account" "$CLOUDSDK_CORE_ACCOUNT"… full function |
gcloud-project | if [ -z "$1" ]; thenecho "Usage:"echo " gcloud-project <project>"echo ""echo "Options:"echo ""… full function |
gcloud-region | if [ -z "$1" ]; thenecho "Usage:"echo " gcloud-region <region>"echo ""echo "Options:"echo ""… full function |
gcloud-kubeconfig | local activate="" cluster=""while [ "$#" -gt 0 ]; docase "$1" in--activate) activate=1 ;;*) cluster="$1" ;;esac… full function |
Google Workspace
| Alias | Runs |
|---|---|
googleworkspace | gws-account |
google | gws-account |
inbox | gws gmail +triage |
Functions
| Function | Runs |
|---|---|
gws-authenticate | if [ -z "$1" ]; thenecho "Usage:"echo " gws-authenticate <name> [gws auth login flags]"echo ""echo "Options:"echo ""… full function |
gws-account | header 'Google Workspace'if [ -z "$1" ]; thenif [ -n "$GOOGLE_WORKSPACE_CLI_CONFIG_DIR" ]; thenkv "Account" "$(basename "$GOOGLE_WORKSPACE_CLI_CONFIG_DIR")"kv "Config" "${GOOGLE_WORKSPACE_CLI_CONFIG_DIR/$HOME/\~}"kv "Auth" "$(gws auth status 2>/dev/null | jq -r '.auth_method')"… full function |
mail-search | if [ -z "$1" ]; thenecho "Usage:"echo " mail-search <gmail query>"echo ""echo "Examples:"echo " mail-search from:alice@example.com"… full function |
mail-read | if [ -z "$1" ]; thenecho "Usage:"echo " mail-read <message-id>"echo ""echo "Message ids come from 'inbox', 'emails' or 'mail-search'."return 0… full function |
emails | case "${1:-20}" in[1-9] | [1-9][0-9] | 100) ;;*)echo "Usage:"echo " emails [count]"echo ""… 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 |