Enhance your terminal experience with elegant, efficient shell scripts
R00t
BestShell is a comprehensive collection of carefully crafted shell scripts designed to enhance your command-line experience and boost your productivity. Whether you're a system administrator, developer, or Linux enthusiast, BestShell provides elegant solutions for common tasks while offering powerful automation capabilities.
π‘ What makes BestShell special? Unlike many scattered script collections, BestShell focuses on quality, consistency, and usability. Each script follows best practices, includes detailed documentation, and undergoes testing to ensure reliability across different environments.
Getting started with BestShell is straightforward. Follow these simple steps:
git clone https://github.com/RootShelll/BestShell.git
cd BestShell
chmod +x install.sh
./install.sh
The installation script will:
- Verify system requirements
- Install necessary dependencies
- Configure your environment
- Add BestShell to your PATH
β οΈ Note: For full functionality, BestShell requires Bash 4.0+ and common Unix utilities. Some scripts may need additional tools that will be mentioned in their documentation.
BestShell comes packed with numerous utilities organized into functional categories:
- system-info.sh - Comprehensive system information dashboard
- disk-analyzer.sh - Visual disk usage analysis and cleanup recommendations
- proc-monitor.sh - Real-time process monitoring with intelligent alerts
- backup-wizard.sh - Automated, configurable backup solution with compression
- git-automator.sh - Streamlined Git workflow automation
- code-stats.sh - Code repository statistics and analysis
- env-setup.sh - Project environment configuration tool
- build-helper.sh - Build process automation and optimization
- quick-search.sh - Multi-source terminal search utility
- smart-rename.sh - Batch file renaming with pattern matching
- note-manager.sh - Terminal-based note-taking system
- term-pomodoro.sh - Productivity timer with notification integration
- net-monitor.sh - Network traffic analysis and visualization
- port-scanner.sh - Simple but effective port scanning utility
- ssh-manager.sh - SSH connection management and quick connect
- bandwidth-test.sh - Network speed testing and reporting
β Best Practice: Each script follows the Unix philosophy of doing one thing well, with consistent interfaces that allow scripts to be combined for more complex operations.
After installation, you can run any BestShell script directly from your terminal:
bestshell system-info
# or with the full path
~/BestShell/scripts/system-info.sh
Each script includes built-in help accessible with the -h
or --help
flag:
bestshell disk-analyzer --help
Common arguments and options across BestShell scripts:
-v, --verbose
: Detailed output with additional information-q, --quiet
: Minimal output, useful for scripting-o, --output [format]
: Output format (text, json, csv, etc.)-c, --config [file]
: Use custom configuration file
Let's explore how to use some of the most popular BestShell scripts in real-world scenarios:
bestshell system-info --health-check --report
This command runs a comprehensive system health check, analyzing CPU, memory, disk, and network performance, then generates a detailed report with recommendations.
bestshell smart-rename "*.jpg" --pattern "vacation_{{date:YYYY-MM-DD}}_{{counter}}.jpg" --sort-by date
This renames all JPG files in the current directory using a pattern that includes the creation date and a sequential counter, sorting files by date.
bestshell git-automator --interactive
Launches an interactive Git workflow assistant that guides you through common Git operations with intelligent suggestions based on your repository state.
Once you're comfortable with the basics, explore these advanced capabilities:
BestShell scripts can be used within your own shell scripts:
#!/bin/bash
# Run system check and save result
SYSTEM_STATUS=$(bestshell system-info --health-check --output json)
# Parse the JSON for critical issues
CRITICAL_ISSUES=$(echo $SYSTEM_STATUS | jq '.issues | select(.severity == "critical")')
# Take action based on findings
if [[ ! -z $CRITICAL_ISSUES ]]; then
echo "Critical issues found, sending notification..."
bestshell notify --urgent --message "System needs attention: $CRITICAL_ISSUES"
fi
Create personalized configurations to adapt BestShell to your specific needs:
# Create a custom configuration
cat > ~/.bestshell/disk-analyzer.conf << EOF
{
"exclude_dirs": ["/tmp", "/var/cache"],
"alert_threshold": 85,
"auto_cleanup": true,
"cleanup_targets": ["*.tmp", "*.log", "*.cache"],
"max_depth": 4,
"display": "tree"
}
EOF
# Use the custom configuration
bestshell disk-analyzer --config ~/.bestshell/disk-analyzer.conf
BestShell works seamlessly with other command-line tools:
# Pipe output to other tools
bestshell net-monitor --output csv | awk -F, '{sum+=$3} END {print "Total bandwidth: " sum/1024/1024 " MB"}'
# Use with watch for real-time monitoring
watch -n 5 "bestshell proc-monitor --top-cpu --count 10"
# Schedule with cron
echo "0 * * * * $(which bestshell) backup-wizard --quick ~/important-docs" | crontab -
Q: Will BestShell work on macOS?
A: Yes, most scripts work on macOS, but you may need to install GNU versions of some utilities via Homebrew. Run bestshell compat-check
to verify compatibility on your system.
Q: How can I update BestShell to the latest version?
A: Simply run bestshell update
or cd
to your BestShell directory and run git pull && ./install.sh
.
Q: Can I use BestShell in my own projects?
A: Absolutely! BestShell is open-source and free to use according to its license. Just remember to include proper attribution when incorporating scripts into your work.
Q: How secure are these scripts?
A: Security is a priority for BestShell. Scripts avoid common pitfalls like command injection and follow secure coding practices. However, always review scripts that require elevated privileges before execution.
Q: I found a bug, how can I report it?
A: Please open an issue on the GitHub repository with details about the bug, your environment, and steps to reproduce.
BestShell thrives on community contributions! Here's how you can help:
- Submit scripts: Create new scripts following our style guide
- Improve existing scripts: Enhance functionality or fix issues
- Documentation: Help improve documentation, examples, or this README
- Testing: Test scripts on different environments and report findings
π Get in Touch: Join our community forum or Discord server for discussions, script ideas, and assistance with BestShell.
BestShell is open source software released under the MIT License.
Β© 2025 RootShelll and contributors