Optimize your development productivity in the terminal
Provides developers with the ability for optimising the execution of commonly performed tasks, commands, directory navigations, and environment setups/script executions.
I found myself executing the same commands repeatedly, finding navigation on the terminal for frequently accessed locations needlessly slow, and the task of pushing out new code via manually submitting a PR on my browser repetitive and time-wasting. I decided to start developing my own bash scripting library to help alleviate these issues, and realized the whole world of opportunity I had to help optimize my own daily workflows on the terminal. Due to my experience working simultaneously on Mac and Linux machines one of the key parts of the WYX-CLI project was to also allow the same code to run in different shells and operating systems.
If you have found this tool useful/insightful please leave a β on the repository it really helps me out!
I also have a buymeacoffee sponsor link if you would like to help turn my caffeine addiction into a problem ββ‘
- Clone this repository into a folder of your choice:
git clone [email protected]:hwixley/WYX-CLI.git
- Navigate into the directory:
cd WYX-CLI
- Give permissions to the setup script and run it:
chmod +x setup.sh && ./setup.sh
- Reopen your terminal or run
source ~/.bashrc
(source ~/.zshrc
for ZSH shells)
Type wyx
to see the list of commands and start developing some magic!
- GPT Smart Commit - a feature that uses OpenAI's ChatGPT to write informative commit messages for you (using your
git diff
andgit status
outputs) when using thewyx push
command (or other wyx commands which use push, ie.wyx nb
,wyx bpr
etc.). This requires an OpenAI API key.
wyx setup smart_commit
- Terminal GPT client - a feature that allows you to talk to OpenAI's ChatGPT directly in the terminal using the
wyx ask-gpt
command. This requires an OpenAI API key.
wyx setup openai_key
- WYX-CLI Auto Update - a feature that allows you to toggle auto-updates on your WYX-CLI installation. When turned on this will perform a git pull to the upstream repository whenever you call
wyx
with no arguments (to prevent slowing down regular command usage).
wyx setup auto_update
- Remove your cloned repository
rm -rf <path-of-installation>
- Remove the wyx-cli script setup in your environment file
- Open the file in an editor: (
~/.bashrc
or~/.zshrc
depending on your shell)Ifgedit ~/.bashrc
gedit
is not available you can always use vim instead:vi ~/.bashrc
- Remove the 2 lines for the wyx-cli:
- The first line is a comment:
# WYX-CLI
- The second line is where the command is actually setup:
alias wyx="<path-of-installation>/wyx-cli.sh"
- The first line is a comment:
- Open the file in an editor: (
- Follow the installation instructions
View current dependencies for your WYX-CLI configuration by running:
wyx list-deps
version
: WYX-CLI Version
install-deps
: Install WYX-CLI dependenciesupdate-deps
: Update the project dependencieslist-deps
: List the project dependencies
sys-info
: Get Detailed System Information
cd <mydir?>
: Navigate Directory Aliasesback
: Go Back A Directory
run <myscript>
: Run Script Aliasesvsc <mydir>
: Open Directory Aliases in VSCode
ginit
: Initialise Git Repositorypush
: Add-Commit-Push Git Changes to Current Branchpull
: Pull Git Changes for Current Branchmpull
: Checkout-Pull Git Changes From Master/Main Branchcommits
: View Your Branch Git Commitslastcommit
: View Your Last Commit & Copy It's SHAnb <branch-name?>
: Checkout-Add-Commit-Push A New Git Branchpr
: Open A Pull Request From Your Current Git Branch on GitHub/GitLab/BitBucket/Azurebpr <branch-name?>
: Checkout-Add-Commit-Push New Git Branch & Open PR On GitHub/GitLab/BitBucket/Azurepp
: Pull-Push Git Changes to Current Branch
repo
: View Your Repository On GitHub/GitLab/BitBucket/Azurebranch
: View Your Current Branch On GitHub/GitLab/BitBucket/Azurepipelines
: View Your Pipelines On GitHub/GitLab/BitBucket/Azureissues
: View Your Repository Issues On GitHub/GitLab/BitBucket/Azureprs
: View Your Repository PRs On GitHub/GitLab/BitBucket/Azurenotifs
: View Your GitHub Notificationsprofile
: View Your GitHub Profileorg <myorg?>
: View Your GitHub Organisation
keystore <key?> <value?>
: Add a key-value pair to your '.env' keystoresetup <smart_commit|openai_key|auto_update>
: "Setup: ChatGPT commits, ChatGPT client, WYX-CLI auto-updates"
user
: View Your User Configurationmydirs
: View Your Directory Aliases Configurationmyorgs
: View Your GitHub Organisation Configurationmyscripts
: View Your Scripts Configurationtodo
: View Your To-Do List
editd <user|myorgs|mydirs|myscripts|todo>
: Edit Your WYX-CLI Configurationedits <myscript?>
: Edit A Script Filenewscript <name?>
: Create A New Script
find <regex?>
: Regex Search Current Directory For Filefopen <dir|mydir?>
: Open current directory in your files applicationencrypt <file|dir?>
: Encrypt a file using GPGdecrypt <file?>
: Decrypt a GPG-encrypted file
ip
: View Your Local & Public IPswifi
: View Available WiFi Networkshardware-ports
: View Your Hardware Portswpass
: View Your Saved WiFi Passwordsspeedtest
: Run A Speed Test On Your Networkport-scan <host?> <port-range?>
: Scan for open ports on a host
webtext <url?>
: Read-only websites in your terminal
ask-gpt
: Start a conversation with ChatGPT
genpass <pass-length?>
: Generate A Random Passwordgenhex <length?>
: Generate A Random Hex Stringgenb64 <length?>
: Generate A Random Base64 Stringlastcmd
: Copy Your Last Command To Your Clipboardcopy $(<command?>)
: Copy output of a command to clipboard
genqr <url?> <name?>
: Generate a QR code from a URLupscale <file?> <scale-multiplier?>
: Scale up an image (uses no smoothing)
weather
: View the weather forecast for your location in the terminalmoon
: View the moon phaseleap-year
: Check when the next leap year is
help
: View WYX-CLI Documentationexplain <command?>
: Explain a bash commandgoogle <query?>
: Google a query