🛠️ macOS Terminal Toolkit - All-in-One System Maintenance & Development Tools
👤 Author: JIANGJINGZHE (江景哲)
📧 Email: contact@jiangjingzhe.com
💬 WeChat: jiangjingzhe_2004
English | 简体中文
Features • Installation • Usage • Tools • Screenshots • Contributing
- 🎨 Beautiful TUI Interface - ASCII Art Logo + Colorful Interactive Menu
- ⚡ One-Click Cleanup - Quickly clean all development environment caches
- 🔧 Modular Design - Each tool runs independently
- 🌐 Global Command - Type
toolanywhere to launch - 📦 Multi Package Manager Support - Homebrew, pip, npm, pnpm, yarn, etc.
- 🔍 Network Diagnostics - Comprehensive network connection checks
- 🔌 Port Management - Quickly view and release occupied ports
| Category | Tool | Description |
|---|---|---|
| 🍺 | Homebrew | Clean download cache, old versions |
| 🐍 | pip | Clean pip cache, wheel cache |
| 📦 | npm/pnpm/yarn | Clean Node.js package manager caches |
| 🔨 | Xcode | Clean DerivedData, simulators, build cache |
| 🐳 | Docker | Clean images, containers, volumes, build cache |
| 🐹 | Go | Clean module cache, build cache |
| 🦀 | Cargo | Clean Rust registry, Git cache |
| 💎 | Ruby Gems | Clean gem cache, old versions |
| 🎮 | Steam | Clean Steam download/app/http cache |
| 📺 | Apple TV | Clean Apple TV app caches/download cache |
| 🌐 | DNS Lookup | Resolve domain nameserver IPv4 |
| 🌐 | Network | Network diagnostics, DNS check |
| 🔌 | Port | Port usage viewer & process manager |
brew install khakhasshi/tap/shelltoolsOr:
brew tap khakhasshi/tap
brew install shelltoolsAfter installation, run tool to start.
# Clone repository to MacDevTools directory
git clone https://github.com/khakhasshi/MacDevTools.git ~/MacDevTools
# Add to PATH (auto-write to .zshrc)
echo 'export PATH="$HOME/MacDevTools:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Verify installation
tool helptoolLaunch to see a beautiful TUI interface, use number keys to select functions:
__ ___ ____ ______ __
/ |/ /___ ______/ __ \___ _ _/_ __/___ ____ / /____
/ /|_/ / __ `/ ___/ / / / _ \ | / // / / __ \/ __ \/ / ___/
/ / / / /_/ / /__/ /_/ / __/ |/ // / / /_/ / /_/ / (__ )
/_/ /_/\__,_/\___/_____/\___/|___//_/ \____/\____/_/____/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ Terminal Toolkit v1.0 | macOS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 Cache Cleanup
1) Homebrew Cache Cleanup
2) pip Cache Cleanup
3) npm/pnpm/yarn Cache Cleanup
...
Execute specific functions directly without entering the menu:
# Cache Cleanup
tool brew # Clean Homebrew cache
tool pip # Clean pip cache
tool node # Clean npm/pnpm/yarn cache
tool xcode # Clean Xcode cache
tool docker # Clean Docker cache
tool steam # Clean Steam download cache
tool appletv # Clean Apple TV cache
tool go # Clean Go module cache
tool cargo # Clean Cargo cache
tool gem # Clean Ruby Gems cache
tool dns example.com # Lookup domain NS IPv4
# System Tools
tool network # Network connection check
tool port 3000 # View port 3000 usage
tool port -k 8080 # Kill process using port 8080
tool port -l # List all listening ports
tool port -c # Check common dev ports
# Quick Actions
tool all # One-click clean all caches
tool help # Show helptool brewFeatures:
- ✅ Clean download cache
- ✅ Remove old software versions
- ✅ Deep clean all cache files
- ✅ Show before/after space comparison
tool pipFeatures:
- ✅ Clean pip download cache
- ✅ Clean wheel cache
- ✅ Clean http cache
- ✅ Support macOS specific paths
tool nodeFeatures:
- ✅ npm cache clean
- ✅ pnpm store prune
- ✅ yarn cache clean
- ✅ Clean /tmp temporary files
tool xcodeFeatures:
- ✅ Clean DerivedData (build artifacts)
- ✅ Clean module cache
- ✅ Clean LLVM/SPM cache
- ✅ Delete unavailable simulators
- ✅ Clean Playground cache
⚠️ Optional: Clean DeviceSupport/Archives
tool dockerFeatures:
- ✅ Remove stopped containers
- ✅ Remove dangling images
- ✅ Remove unused volumes and networks
- ✅ Clean build cache
⚠️ Optional: Deep clean (remove all unused resources)
tool goFeatures:
- ✅ Clean build cache
- ✅ Clean test cache
- ✅ Clean fuzz test cache
⚠️ Optional: Clean module cache
tool cargoFeatures:
- ✅ Clean registry cache
- ✅ Clean Git checkouts
- ✅ Clean Git database
⚠️ Optional: Clean all target directories
tool gemFeatures:
- ✅ Clean gem cache
- ✅ Remove old gem versions
- ✅ Clean Bundler cache
- ✅ Support rbenv/rvm
⚠️ Optional: Clean CocoaPods cache
tool steamFeatures:
- ✅ Clean Steam download cache
- ✅ Clean app/http/depot caches
- ✅ Remove partial download markers
⚠️ Recommend quitting Steam before cleaning
tool dns example.comFeatures:
- ✅ List NS records for a domain
- ✅ Resolve each nameserver's IPv4 (and show IPv6 if available)
⚠️ Requiresdig(macOS has it by default)
tool networkFeatures:
- ✅ Check network interface status
- ✅ Test gateway connection
- ✅ DNS resolution test
- ✅ Ping test (Google/Cloudflare/Alibaba)
- ✅ HTTP/HTTPS connection test
- ✅ Dev service check (npm/PyPI/Docker Hub)
- ✅ Local port listening check
⚠️ Optional: Network speed test
tool appletvFeatures:
- ✅ Clean Apple TV app caches and download cache
- ✅ Clear group container caches
⚠️ Recommend quitting Apple TV app before cleaning
tool port [options] [port]Options:
| Option | Description |
|---|---|
tool port 3000 |
View port 3000 usage details |
tool port -k 8080 |
Kill process using port 8080 |
tool port -l |
List all listening ports |
tool port -c |
Show common dev port status |
Features:
- ✅ View port usage details (process name, PID, CPU, memory)
- ✅ One-click kill process
- ✅ Support force terminate
- ✅ Quick check common ports
~/MacDevTools/
├── tool # Main entry (global command)
├── clean_brew_cache.sh # Homebrew cache cleanup
├── clean_pip_cache.sh # pip cache cleanup
├── clean_node_cache.sh # Node.js cache cleanup
├── clean_xcode_cache.sh # Xcode cache cleanup
├── clean_docker_cache.sh # Docker cache cleanup
├── clean_go_cache.sh # Go cache cleanup
├── clean_cargo_cache.sh # Cargo cache cleanup
├── clean_gem_cache.sh # Ruby Gems cache cleanup
├── clean_steam_cache.sh # Steam download cache cleanup
├── clean_appletv_cache.sh # Apple TV cache cleanup
├── dns_lookup.sh # DNS nameserver IPv4 lookup
├── check_network.sh # Network connection check
├── port_killer.sh # Port killer
├── README.md # English documentation
└── README_CN.md # Chinese documentation
Click to expand screenshots
__ ___ ____ ______ __
/ |/ /___ ______/ __ \___ _ _/_ __/___ ____ / /____
/ /|_/ / __ `/ ___/ / / / _ \ | / // / / __ \/ __ \/ / ___/
/ / / / /_/ / /__/ /_/ / __/ |/ // / / /_/ / /_/ / (__ )
/_/ /_/\__,_/\___/_____/\___/|___//_/ \____/\____/_/____/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛠️ Terminal Toolkit v1.0 | macOS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📦 Cache Cleanup
1) Homebrew Cache Cleanup
2) pip Cache Cleanup
3) npm/pnpm/yarn Cache Cleanup
4) Xcode Cache Cleanup
5) Docker Cache Cleanup
6) Go Cache Cleanup
7) Cargo Cache Cleanup
8) Ruby Gems Cache Cleanup
9) Steam Download Cache Cleanup
10) Apple TV Cache Cleanup
🔧 System Tools
11) Network Connection Check
12) DNS Nameserver Lookup
13) Port Killer
⚡ Quick Actions
a) One-Click Clean All
l) List All Listening Ports
c) Check Common Ports
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
h) Help q) Quit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌐 Network Connection Check Tool
===================
📡 Network Interface Status:
✓ Active Interface: en0
✓ Local IP: 192.168.1.100
🚪 Gateway Connection:
Gateway: 192.168.1.1
✓ Gateway reachable
🔍 DNS Resolution:
✓ google.com → 142.250.xx.xx
✓ baidu.com → 220.181.xx.xx
✓ github.com → 20.205.xx.xx
🌍 Internet Connection:
✓ Google DNS (8.8.8.8): 25ms
✓ Cloudflare (1.1.1.1): 18ms
✓ Alibaba DNS (223.5.5.5): 12ms
🔌 Port Killer Tool
🔍 Checking port 3000
⚠ Port 3000 is occupied
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 1234 user 23u IPv4 0x... 0t0 TCP *:3000 (LISTEN)
Process Details:
PID: 1234
Name: node
User: user
CPU: 2.5%
Memory: 1.2%
Command: node /path/to/server.js
Kill this process? (y/N):
cd ~/MacDevTools
git pull origin main- Create a new
.shfile in~/MacDevTools/ - Add execute permission:
chmod +x your_script.sh - Edit the
toolfile to add menu options
Some system-level operations require administrator privileges. The script will prompt when needed.
# Remove directory
rm -rf ~/MacDevTools
# Remove PATH config (edit .zshrc to remove related lines)
nano ~/.zshrcContributions are welcome! Please feel free to submit a Pull Request.
- Fork this repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 JIANGJINGZHE (江景哲)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Made with ❤️ by JIANGJINGZHE