You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A collection of zsh / iTerm2 shell scripts for developer productivity I've created and have been using for some time now.
Each script is self-contained and ships with a built-in installer that appends the necessary source line to your ~/.zshrc.
Contents
shell-utils/
├── aliases-injected.sh # Installs aliases inline into ~/.zshrc
├── aliases-mapped.sh # Installs a source pointer to an external aliases.sh
├── functions.sh # Developer utility functions
├── claude-keepalive/
│ └── keepalive.sh # Keeps a Claude.ai usage window active
Installation
Every script supports a one-shot installer. Clone or download this repo, then run any combination of the following. All installers are idempotent — running them twice will not create duplicate entries.
# Make scripts executable (once)
chmod +x aliases-injected.sh aliases-mapped.sh functions.sh
# Install each script you want
./aliases-injected.sh install
./aliases-mapped.sh install
./functions.sh install
# Reload your shellsource~/.zshrc
claude-keepalive/keepalive.sh
Pre-warms a Claude.ai usage window so that when you actually sit down to code, a large portion of the ~4–5 hour window has already elapsed — meaning your next window after hitting the limit will be available sooner.
How it works: The claude CLI (Claude Code) shares the same usage session as the Claude.ai web UI. The script sends a minimal "Hi" ping on a configurable interval using the haiku model, which costs the fewest tokens.
Requirements
claude CLI installed and authenticated (claude auth login)
macOS (caffeinate is used to prevent the machine from sleeping between intervals)
Usage
cd claude-keepalive
# Foreground (Ctrl+C to stop)
./keepalive.sh
# Background with log
nohup ./keepalive.sh >> keepalive.log 2>&1&# Background, fully detached
./keepalive.sh &disown# Stop a backgrounded instance
pkill -f keepalive.sh
aliases-injected.sh
Appends all alias definitions directly into ~/.zshrc as a heredoc block. Best if you want the aliases to be visible when you open your rc file without needing a second file on disk.
./aliases-injected.sh install
Aliases
Node / npm
Alias
Expands to
dev
nvm use (if .nvmrc present) + npm run dev
build
nvm use + npm run build
start
nvm use + npm start
test
nvm use + npm run test
run
nvm use + npm run
ni
nvm use + npm i
nci
nvm use + npm ci
nil
nvm use + npm i --legacy-peer-deps
use
nvm use
nv
node -v && npm -v
serve
npx serve .
System
Alias
Expands to
cls
clear
reload
source ~/.zshrc (or ~/.bashrc)
path
Print each $PATH entry on its own line
ports
lsof — list all listening TCP ports
ip
Local IP via ipconfig getifaddr en0
myip
Public IP via ifconfig.me
weather
Current weather via wttr.in
brewup
brew update && brew upgrade && brew cleanup
aliases-mapped.sh
Adds a source pointer in ~/.zshrc pointing to a separate aliases.sh file in the same directory. Useful when you want to keep your rc file clean and manage aliases in a dedicated, version-controlled file.
Note: You need to create aliases.sh alongside this script — it is the file that will be sourced. The aliases listed above (same set as aliases-injected.sh) can be placed there.
./aliases-mapped.sh install
functions.sh
Utility shell functions that extend what aliases can do. Sourced into your shell — no subshell spawned.
./functions.sh install
Navigation
Function
Description
mkcd <dir>
mkdir -p the directory and immediately cd into it
up [n]
Go up n directory levels (default: 1)
File & Archive
Function
Description
extract <file>
Auto-detect format and extract any archive: .tar.gz, .zip, .7z, .rar, .zst, and more
backup <file>
Create a timestamped copy — e.g. config.json.bak.2026-02-20T09:15:00
sized [dir]
Disk usage of a directory's contents, sorted largest-first (top 30)