🚀 Terminal Shortcuts Collection
A comprehensive collection of shell aliases and functions designed to enhance terminal productivity and streamline common development tasks. Every shortcut works in both Bash (4.0+) and Zsh (5.0+).
🚀 Quick Start
⚡️ Installation
- Clone or download this repository:
git clone <repository-url> ~/terminal_shortcuts
# or download and extract to ~/terminal_shortcuts
- Add to your shell configuration file (
~/.bashrc, ~/.zshrc, etc.):
# Add this line to source all terminal shortcuts
source ~/terminal_shortcuts/shortcuts.sh
- Reload your shell or run:
source ~/.bashrc # or ~/.zshrc
📝 Quick Reference
Use sc command to see all available shortcuts and their descriptions.
🚫 Excluding Shortcuts
Set EXCLUDE_SHORTCUTS to a space-separated list of names before sourcing
shortcuts.sh. Excluded names are never defined, and any alias or function you
already have under that name is left untouched:
export EXCLUDE_SHORTCUTS="p hashit sc"
source ~/terminal_shortcuts/shortcuts.sh
📦 Requirements
Core shortcuts rely on standard POSIX tools. Individual functions degrade
gracefully and tell you what is missing:
| Tool |
Used by |
bc |
calc, log2, pow2, numconv, unitconv |
openssl |
randstr, hashit (password hashes) |
xxd |
strconv hex-decode |
jq or python3 |
jsonpp |
curl |
apitest, isup, myip |
python3 |
all p* Python shortcuts |
zip, unzip, 7z, unrar |
matching compress / extract formats |
exiftool, pdfinfo, mediainfo |
richer meta output |
📋 Features Overview
📁 File and Directory Operations
- Enhanced file listing:
ll, la, l with colors and details
- Smart navigation:
.., ..., .... for quick directory traversal
- Archive operations: Universal
extract and compress functions for any archive type with volume splitting support
- File operations: Find files (
ff), find-and-replace (replace), timestamped backups (backup)
- Directory creation:
mkcd to create and enter directories
- Monitoring:
watchfile for real-time file monitoring and watchdir for directory content monitoring
- File viewing:
less (enhanced), le (less), tle (less +G)
- File analysis:
meta for comprehensive file type detection and metadata extraction
🔀 Git Enhancements
- Quick git operations:
gs, gc, gp, ga, gaa, etc.
- AI-powered commits:
gcm with GitHub Copilot for intelligent commit messages
- Auto-commit:
gac with intelligent commit messages
- Recursive pull:
gpullall pulls every repo under a directory, skipping any that would fail or conflict
- Repository info:
gitinfo for comprehensive repo status
- Branch management: Simplified checkout and branch creation
🖥️ System Information & Monitoring
- System overview:
sysinfo for comprehensive system details (OS, CPU, memory, GPU, disk)
- Process management:
killcmd with interactive confirmation for killing processes by name
- Resource monitoring:
topcpu, topmem for CPU and memory usage
- Time utilities:
now, nowtime, nowdate for current time/date
- History access:
h for command history, path for formatted PATH display
- Service management:
sctlstart, sctlstop, sctlrestart, sctlstatus for systemctl operations
- Log monitoring:
sctllog for service logs, sctlwatch for real-time log monitoring
- Nginx management:
nginxstart, nginxstop, nginxrestart, nginxstatus for nginx service control
- Nginx configuration:
nginxconf for config editing, nginxtest for syntax validation, nginxreload for config reload
- Package management:
brewi for Homebrew package installation, brewu for updating and upgrading packages (macOS)
🌐 Network Utilities
- Website monitoring:
isup to check if websites are accessible
- IP information:
myip for local and external IP addresses
- Network monitoring:
ports for active connections
- Enhanced ping: Standard and fast ping options
🐍 Python Development
- Virtual environment:
svenv for automatic venv activation, cdsvenv for navigate and activate
- Create and bootstrap venv:
cvenv to create .venv with conda's Python, activate it, and upgrade pip
- Quick Python access:
p alias for python3
- Package management:
pipi, pipu, pipl for pip operations
- Dependency analysis:
preq for analyzing project dependencies and environment
- Testing with coverage:
pytestcov for running tests with coverage reports
- Code formatting:
pfmt for formatting and linting with black, isort, and flake8
- Module execution:
pm for running Python modules using file paths
- Class inspection:
pmem for displaying members of classes
📦 Node.js Development
- Version management:
nu, nl, ni for nvm operations
- Quick switching: Easy Node.js version switching
✏️ Quick Configuration Access
- Config editing:
bashrc, zshrc, vimrc for instant config file access
- Config reloading:
sobashrc, sozshrc for quick shell configuration reload
🚀 Program Shortcuts
- Editor access:
v for Vim
- Source config:
so for source (reload shell config)
🛠️ Development Tools
- API testing:
apitest for quick HTTP API testing with curl
- Asset optimization:
optimizeassets for minifying JavaScript and CSS files
- Hash computation:
hashit for MD5, SHA1, SHA256, SHA512 hashing of strings, files, or stdin
- Password generation:
randstr for secure random passwords
- String/data conversion:
strconv for converting between hex, base64, and binary formats
- Number base conversion:
numconv for converting numbers between different bases (2-36) with auto-detection
- Unit conversion:
unitconv for converting between different units of measurement
- Entropy analysis:
entropy for calculating Shannon entropy of strings, files, or stdin
- Mathematical calculations:
calc, log2, and pow2 functions
- JSON formatting:
jsonpp for pretty-printing JSON
📝 Wordlist Processing
- Advanced filtering: Filter by length, character types, entropy, regex patterns
- Data processing: Sort, remove duplicates, randomize word order
- Output options: Split by size (MB/GB) or percentage distribution
- Memory efficiency: Streaming processing for large files
- Pattern matching: Case-sensitive/insensitive regex support
📚 Cheatsheets
- Vim reference:
csvim for comprehensive Vim usage guide including custom configurations
- tmux reference:
cstmux for terminal multiplexer usage with sessions, windows, and panes
- less reference:
csless for file viewer navigation, search, and advanced features
- Terminator reference:
csterminator for advanced terminal emulator with splits and layouts
- Terminal shortcuts:
csterminal for comprehensive terminal keyboard shortcuts and command line editing
📖 Detailed Function Reference
🖥️ System Information (sysinfo)
Displays comprehensive system information including:
- OS details and kernel version
- CPU specifications and core count
- Memory usage and availability
- GPU information (NVIDIA, macOS, Linux)
- Disk usage statistics
$ sysinfo
=== SYSTEM INFORMATION ===
OS Information:
Hostname: my-computer
OS: Darwin
Kernel: 21.6.0
...
🧩 Function Listing (list_functions)
Display all defined functions in the current shell session with optional filtering:
$ list_functions # List all functions
$ list_functions git # List functions containing 'git'
$ list_functions '^c' # List functions starting with 'c'
$ list_functions 'backup|restore' # List functions with 'backup' or 'restore'
Features:
- Alphabetically sorted output for easy browsing
- Optional grep pattern filtering for targeted searches
- Includes both built-in shell functions and user-defined functions
- Shows total count of functions found
- Supports regular expressions for advanced filtering
Common Use Cases:
- Explore available functions in your shell environment
- Find functions related to specific tasks (e.g., git, file operations)
- Debug shell configurations by listing loaded functions
- Discover functions from loaded modules and scripts
🗑️ Process Management (killcmd)
Interactive process termination by command name:
$ killcmd firefox
=== KILL COMMAND ===
Searching for processes containing: 'firefox'
Found 3 matching process(es):
PID: 1234 - /Applications/Firefox.app/Contents/MacOS/firefox
Kill all these processes? (y/N):
🛎️ Service Management
🛠️ Systemctl Operations (sctlstart, sctlstop, sctlrestart, sctlstatus)
Simplified systemd service management:
$ sctlstart nginx # Start nginx service
$ sctlstop apache2 # Stop apache2 service
$ sctlrestart ssh # Restart SSH service
$ sctlstatus postgresql # Check PostgreSQL status
📜 Service Logging (sctllog, sctlwatch)
Monitor systemd service logs:
$ sctllog nginx # View nginx service logs
$ sctlwatch apache2 # Watch apache2 logs in real-time
🕸️ Nginx Management (nginxstart, nginxstop, nginxrestart, nginxstatus, nginxconf, nginxtest, nginxreload)
Complete nginx service control:
$ nginxstart # Start nginx service
$ nginxstop # Stop nginx service
$ nginxrestart # Restart nginx service
$ nginxstatus # Check nginx status
$ nginxconf # Edit nginx configuration
$ nginxtest # Test nginx configuration syntax
$ nginxreload # Reload nginx configuration
📦 Archive Operations (extract, compress)
📤 Universal Archive Extractor (extract)
Automatically detects and extracts any archive format:
$ extract archive.zip # Extract ZIP file
$ extract data.tar.gz # Extract gzipped tar
$ extract backup.rar # Extract RAR file
$ extract package.7z # Extract 7-Zip file
Supports: .zip, .tar, .tar.gz, .tgz, .tar.bz2, .tbz2, .rar, .7z, .gz, .bz2, .Z.
📦 Archive Creator (compress)
Create archives with optional volume splitting (--split / -s, sizes in b, k, m, g):
$ compress myfile.zip file1.txt file2.txt # Create ZIP archive
$ compress backup.tar.gz folder/ # Create gzipped tar
$ compress --split 100m data.7z file1 file2 # Create 7z with 100MB volumes
$ compress -s 1g split.zip large_folder/ # Create ZIP with 1GB volumes
Supports: .tar.gz, .tgz, .tar.bz2, .tbz2, .tar, .zip, .7z, .gz, .bz2.
Volume splitting is available for every format except .gz and .bz2.
📁 File Operations
🔍 Find Files (ff)
Search for files by name pattern:
$ ff "*.py" # Find all Python files
$ ff "config" # Find files containing "config"
$ ff "test*.js" # Find JavaScript test files
🔎 Search in Files (search)
Advanced text search with regex support. Flags: -r recursive, -i ignore case,
-E extended regex, -z include .gz files. Short flags can be bundled (-riE):