BashBot is an interactive CLI tool that provides instant explanations, syntax help, and practical examples for common bash and development commands. Never forget command syntax again!
-
** Comprehensive Command Database**: Pre-loaded with 172+ commands across 10 categories:
- Development:
git,npm,pip,docker,pytest - Python:
venv(create, activate, deactivate, install, freeze, troubleshoot) - Localhost:
localhost(kill dev servers, find ports, manage local projects) - Windows:
powershell(Get-Process, Stop-Process, etc.),cmd(netstat, tasklist, etc.) - Linux/Ubuntu:
linux(ls, grep, ps, kill, chmod, apt, etc.)
- Development:
-
π¨ Beautiful Terminal Output: Color-coded, easy-to-read command information
-
π Smart Search: Find commands by name or description
-
π‘ Practical Examples: Real-world usage examples for every command
-
β‘ Interactive Mode: REPL-style interface for quick lookups
-
π Detailed Documentation: Syntax, flags, and explanations for each command
-
π₯οΈ Cross-Platform: Works on Windows (PowerShell, CMD), Linux, and macOS
-
π List All Flags Mode: Condensed view of ALL available flags/options for quick reference
-
π Cheat Sheet Generator: Create comprehensive single-page reference cards
-
π Global Access: Quick
bbcommand available from anywhere in PowerShell
- Clone or navigate to the project directory:
cd c:\Users\William\OneDrive\Desktop\AppIdeas\bashCommands- No dependencies required! Uses Python standard library only.
To use bashbot from anywhere:
- Create a
setup.pyfile (see below) - Install in development mode:
pip install -e .- Now run
bashbotfrom anywhere!
Start BashBot in interactive mode:
python bashbot.pyThen type commands to get help:
bashbot> git
bashbot> git commit
bashbot> search push
bashbot> list
bashbot> exit
Get help directly from the command line:
# Show all commands
python bashbot.py list
# Show git subcommands
python bashbot.py git
# Show git commit details
python bashbot.py git commit
# Search for commands
python bashbot.py search clone$ python bashbot.py git commitOutput shows:
- Description of what
git commitdoes - Syntax:
git commit [options] - Common flags (
-m,-a,--amend, etc.) - Practical examples with explanations
$ python bashbot.py search push$ python bashbot.py -i
bashbot> docker
# Shows all docker subcommands
bashbot> docker run
# Shows detailed help for docker runpython bashbot.py [options] [command]
Options:
-i, --interactive Start in interactive mode
-l, --list-all Show condensed list of ALL flags/options
-c, --cheatsheet Generate comprehensive cheat sheet
--no-color Disable colored output
-h, --help Show help message
Arguments:
command Command to look up (e.g., "git commit")
Examples:
python bashbot.py git # Show git subcommands
python bashbot.py git commit # Show git commit details
python bashbot.py -l cmd taskkill # Show ALL taskkill flags (condensed)
python bashbot.py -c git # Generate git cheat sheetRun the setup script to use bb from anywhere:
cd c:\Users\William\OneDrive\Desktop\AppIdeas\bashCommands
.\setup_bashbot.ps1Then restart PowerShell or run: . $PROFILE
Now you can use:
bb git commit # Quick lookup
bbflags taskkill # Show all flags
bbcheat git # Generate cheat sheetbashCommands/
βββ bashbot.py # Main CLI application
βββ commands/ # Command database (JSON files)
β βββ git.json # Git version control
β βββ npm.json # Node.js package manager
β βββ pip.json # Python package manager
β βββ docker.json # Docker containers
β βββ pytest.json # Python testing
β βββ venv.json # Python virtual environments
β βββ localhost.json # Localhost/port management
β βββ powershell.json # Windows PowerShell
β βββ cmd.json # Windows Command Prompt
β βββ linux.json # Linux/Ubuntu commands
βββ core/ # Core modules
β βββ __init__.py
β βββ database.py # Database loader
β βββ formatter.py # Terminal output formatting
β βββ search.py # Search functionality
βββ requirements.txt
βββ README.md
Currently includes comprehensive help for:
Development Tools:
- git: 21 subcommands (clone, commit, push, pull, branch, merge, rebase, etc.)
- npm: 15 subcommands (install, run, test, publish, etc.)
- pip: 13 subcommands (install, list, freeze, etc.)
- docker: 18 subcommands (run, build, ps, exec, compose, etc.)
- pytest: 10 common testing patterns and flags
Python Virtual Environments:
- venv: 17 subcommands for managing Python virtual environments
- Create and activate venv (PowerShell, CMD, Linux)
- Run scripts without activating venv
- Install, list, and freeze packages
- Troubleshoot common venv issues
- Clone venv to another machine
- Check which venv is active
Localhost/Port Management:
- localhost: 15 commands for managing dev servers and ports
- Find what's running on any port (PowerShell, CMD, Linux)
- Kill processes on specific ports
- Kill all dev servers at once
- List all localhost connections
- Quick reference for common dev ports
Windows Commands:
- powershell: 22 PowerShell commands (Get-Process, Stop-Process, Get-Service, Get-ChildItem, etc.)
- cmd: 20 Command Prompt commands (netstat, tasklist, taskkill, ipconfig, findstr, etc.)
Linux/Ubuntu Commands:
- linux: 30+ bash commands (ls, grep, find, ps, kill, chmod, tar, curl, systemctl, apt, etc.)
To add a new command:
- Create a JSON file in the
commands/directory (e.g.,commands/yarn.json) - Follow this structure:
{
"commandname": {
"description": "Brief description",
"subcommands": {
"subcommand1": {
"syntax": "commandname subcommand1 [options]",
"description": "What this subcommand does",
"flags": [
{
"flag": "-f, --flag",
"description": "What this flag does"
}
],
"examples": [
{
"command": "commandname subcommand1 --flag",
"explanation": "What this example demonstrates"
}
]
}
}
}
}- Restart BashBot - it will automatically load the new command!
Create a setup.py file in the project root:
from setuptools import setup, find_packages
setup(
name='bashbot',
version='1.0.0',
packages=find_packages(),
include_package_data=True,
install_requires=[],
entry_points={
'console_scripts': [
'bashbot=bashbot:main',
],
},
package_data={
'': ['commands/*.json'],
},
)Then install:
pip install -e .- Create a batch file
bashbot.bat:
@echo off
python "C:\Users\William\OneDrive\Desktop\AppIdeas\bashCommands\bashbot.py" %*- Add the directory to your PATH or copy to a directory already in PATH
Add to your ~/.bashrc or ~/.zshrc:
alias bashbot='python /path/to/bashCommands/bashbot.py'Potential improvements:
- Add more commands (curl, wget, ssh, rsync, etc.)
- System commands (ls, grep, find, chmod, etc.)
- Autocomplete in interactive mode
- Export command cheat sheets to PDF/Markdown
- Integration with
manpages - Custom user commands/aliases
- Command history in interactive mode
- Fuzzy matching for typos
- Context-aware suggestions
To add more commands or improve existing ones:
- Edit the appropriate JSON file in
commands/ - Follow the existing format
- Include clear, practical examples
- Test with
python bashbot.py <your-command>
Free to use and modify for personal and commercial projects.
If you find this helpful, consider:
- Adding more commands to the database
- Sharing with other developers
- Providing feedback on which commands to add next
Made with for developers who can never remember all those flags and options!