A personal collection of modern, lightweight, and cross-distribution terminal utilities designed to streamline system management, development workflows, and server operations. Built with ANSI styling and automatic dependency management.
| Command | Description |
| :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | --- |
| myssh | Interactive SSH connection manager powered by a local JSON config. |
| sysup | Cross-distribution system upgrade and cleanup tool (Arch/CachyOS, Debian, Fedora, openSUSE, Alpine). |
| portkill | Quick utility to find and safely terminate processes blocking specific ports. |
| dtop | Interactive Docker container dashboard and management menu. |
| git-resign | Retroactively validates GPG configurations, re-signs, and updates author history for all commits. |
| git-undo | Interactive helper menu to safely unstage, amend, or roll back recent Git commits. |
| json-lint | Validates JSON syntax and outputs detailed error messages for malformed data. |
| json-fmt | Pretty-prints JSON data with optional in-file saving support. |
| license-gen | Generates standard open-source licenses interactively based on your Git config. |
| netspeed | Measures download/upload speeds in Mbit/s and MB/s with ISP & server info. |
| dns-flush | Automatically detects Linux network resolvers and flushes local DNS caches. |
| alias-gen | Interactively creates and saves custom shell aliases for Bash, Zsh, or Fish. |
| port-inspect | Scans and lists all active listening ports mapped to their protocol, PID, and process. | |
This repository comes with automated installer and updater scripts that handle global symlinking and Git sync.
Clone the repository and run the install script (requires sudo for global /usr/local/bin installation):
git clone https://github.com/sanguine6660/bash-scripts.git
cd bash-scripts
./install.sh
To pull the latest changes from your remote repository and automatically re-apply global links, simply run:
./update.sh
- What it does: Reads from a local configuration file (
~/.ssh/connections.json) and presents an interactive menu to select and connect to your remote servers. - Features: Automatically installs
jqif missing across various package managers. - Usage:
myssh
- What it does: Detects your Linux distribution and executes the correct package manager upgrades (
pacman/yay/paru,apt,dnf,zypper,apk). - Features: Handles system package updates, optional AUR helper integration, package cache cleanup, and orphaned package removal.
- Usage:
sysup
- What it does: Accepts a port number as an argument, finds the process ID utilizing it, displays details, and prompts to terminate it.
- Features: Automatically checks for and installs
lsofif needed. - Usage:
portkill 3000
- What it does: Provides an interactive menu of all running and stopped Docker containers.
- Features: Allows you to stream live logs (
tail), open an interactive shell (exec), restart, stop, or start containers on the fly. - Usage:
dtop
- What it does: Validates your local Git email, GPG configuration, and secret key ring before rewriting and cryptographically re-signing your entire commit history from the root.
- Features: Automated safety checks, interactive prompt confirmations, fixes author metadata across past commits, and handles seamless force-pushing to your remote branch.
- Usage:
git-resign
- What it does: Presents an interactive menu allowing you to quickly select common rollback actions like unstaging files, amending the last commit, performing a soft reset, or running a guarded hard reset.
- Features: Built-in repository safety checks, colored warning prompts, and clear status feedback.
- Usage:
git-undo
- What it does: Accepts file paths or piped standard input to check JSON documents for syntax compliance and print descriptive error traces if malformed.
- Features: Automatic
jqinstaller fallback, robust input checking, and color-coded status reports. - Usage:
json-lint config.json
cat config.json | json-lint
- What it does: Formats and pretty-prints messy or minified JSON inputs from files or pipes using
jq. - Features: Includes an interactive prompt to safely save and overwrite changes directly back to your target file in place.
- Usage:
json-fmt messy.json
cat messy.json | json-fmt
- What it does: Interactively generates standard open-source license files (MIT, Apache-2.0, GPL-3.0, BSD-3-Clause) in the current directory.
- Features: Automatically defaults to your active Git username and current year, with safety prompts before overwriting existing files.
- Usage:
license-gen
- What it does: Measures your current network download and upload speeds using accurate
speedtest-climetrics, displaying both Mbit/s and MB/s alongside connection metadata. - Features: Automatically detects and installs missing dependencies (
speedtest-cliandjq), handles local formatting dynamically, and displays a clean ANSI summary box including ISP, server location, and ping. - Usage:
netspeed
- What it does: Automatically detects active Linux network resolvers/caching daemons and flushes or reloads their DNS cache.
- Features: Supports
resolvectl,systemd-resolve, NetworkManager (dns-rc),nscd, anddnsmasqwith automatic fallback. - Usage:
dns-flush
- What it does: Interactively guides you through creating custom terminal shortcuts and safely appends them to your active shell configuration.
- Features: Supports Bash (
~/.bashrc), Zsh (~/.zshrc), and Fish (~/.config/fish/config.fish) with syntax formatting and reload instructions. - Usage:
alias-gen
- What it does: Scans system network sockets to display all active listening ports, protocols, associated PIDs, and process/user ownership in a clean, aligned table.
- Features: Automatically utilizes
sswith fallback user/process resolution viaps, acting as an ideal companion utility toportkill. - Usage:
port-inspect
- A Unix-like environment (Linux / macOS)
- Bash (v4+ recommended)
- Standard core utilities (
curl,awk,git,gpg, etc.)
This project is licensed under the MIT License.