Skip to content

MelisseLima/dev-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🛠 DevUtils

A collection of handy CLI scripts to speed up your dev workflow. Stop, clean, build, debug — all from short memorable commands.

Installation

git clone https://github.com/melisselima/dev-utils.git
cd dev-utils
./install.sh

Then reload your shell:

source ~/.zshrc   # or ~/.bashrc / ~/.bash_profile

That's it. All commands are now available globally.

Re-run ./install.sh anytime you add new scripts — it will pick them up automatically.


Scripts

Docker & Infrastructure

Command Description
good-morning Prune unused Docker images. Use --hard to stop all containers, remove images, volumes, networks, and full system prune.
dockerup [dir ...] Find docker-compose.yml files and spin up services. Pass project directories as arguments or run in the current directory.
port-who <port> Show which process is using a specific port.
killport <port> [...] Kill whatever is running on one or more ports.

Examples

good-morning                     # remove unused Docker images
good-morning --hard              # nuke all Docker resources
dockerup ~/projects/api          # spin up a specific project
port-who 3000                    # who's on port 3000?
killport 3000 8080               # free up ports 3000 and 8080

Git

Command Description
git-nuke Delete local branches already merged into main/master, prune remote tracking branches, and run git gc.
git-fresh <branch-name> Checkout the default branch, pull latest, and create a new branch.
git-oops Undo the last commit with a soft reset — your changes stay staged.

Examples

git-nuke                         # clean up old branches
git-fresh feature/new-login      # start fresh from main
git-oops                         # undo last commit, keep changes

Project

Command Description
nuke-modules [dir] Recursively remove node_modules, .next, dist, build, __pycache__, and other build artifacts.
dev-up [dir] Auto-detect project type (Node.js, Python, Go, Rust, Docker Compose) and run install + start.
env-check [dir] Compare .env.example (or .env.sample / .env.template) with .env and flag missing or empty variables.

Examples

nuke-modules ~/projects          # free up disk space across all projects
dev-up                           # detect and start the current project
env-check                        # check for missing env vars

System

Command Description
ram-hog [n] Display the top n processes by memory usage (default: 10).
cleanup Purge caches from Homebrew, npm, yarn, pnpm, pip, Docker, and macOS system caches. Optionally empties the Trash.

Examples

ram-hog                          # top 10 memory hogs
ram-hog 20                       # top 20
cleanup                          # reclaim disk space from all caches

Productivity

Command Description
wtf Show recent error logs for the current project. Auto-detects Docker Compose, Next.js, npm/yarn/pnpm logs, Python, Laravel, and Rails.
note "text" Save a quick timestamped note to ~/dev-notes/YYYY-MM-DD.md.
note View today's notes.
note --list List all note files.
note --search <term> Search across all notes.

Examples

wtf                              # what broke? show me the logs
note "fixed the auth bug"        # jot it down
note --search auth               # find past notes about auth

React Native

Command Description
rn-init <Name> [flags] Scaffold a bare React Native project (no Expo) with TypeScript. Supports --yarn, --pnpm, --skip-pod.
rn-nuke Nuclear clean: kill Metro, clear Watchman, remove node_modules, ios/Pods, android/build, DerivedData, temp caches — then reinstall everything.
rn-pod [--clean] Install CocoaPods with --repo-update. Use --clean to wipe Pods and Podfile.lock first. Shows elapsed time.
rn-run <ios|android> [flags] Smart launcher — auto-detects physical devices, picks simulator/emulator, supports --device, --simulator, --release, --clean.
rn-build <ios|android> [flags] Build APK/AAB or iOS archive. Supports --release (default), --debug, --clean, --apk, --aab.

Examples

rn-init MyApp                    # scaffold bare RN project
rn-init MyApp --yarn             # use yarn instead of npm
rn-init MyApp --skip-pod         # skip pod install
rn-nuke                          # full nuclear clean + reinstall
rn-pod                           # pod install --repo-update
rn-pod --clean                   # wipe pods first, then install
rn-run ios                       # run on simulator (or device if connected)
rn-run android --device          # force run on physical device
rn-run ios --release --clean     # clean release run
rn-build android                 # release AAB
rn-build android --apk           # release APK
rn-build ios --clean             # clean iOS archive

Uninstall

./uninstall.sh

This removes the DevUtils PATH entry from your shell config. Then reload your shell:

source ~/.zshrc   # or ~/.bashrc / ~/.bash_profile

Optionally, delete the repo folder to fully remove everything.


Adding Your Own Scripts

  1. Create a new file in the scripts/ directory (no file extension needed).
  2. Add #!/usr/bin/env bash as the first line.
  3. Run ./install.sh to make it executable and available.

Requirements

  • bash 4+ (macOS ships with zsh by default — all scripts use #!/usr/bin/env bash)
  • Docker (for Docker-related scripts)
  • Git (for git-related scripts)
  • lsof (pre-installed on macOS/Linux — used by port-who and killport)
  • Xcode & CocoaPods (for React Native iOS scripts)
  • Android SDK & adb (for React Native Android scripts)

License

MIT

About

A collection of handy CLI scripts to speed up your dev workflow. Stop, clean, build, debug — all from short memorable commands.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages