Optimize your development productivity in the terminal
- ⚡️ WIX CLI ⚡️
- Table of Contents
- What It Does
- Dependencies
- Installation
- Extra Feature Setup
- Factory-reset Installation
- List of Commands
- Defaults
- Navigation
- Code Editing
- Custom Script/Environment Execution
- Git Automation
- Quick-access URLs
- Data for Custom Scripting Logic
- Editing Data for Custom Scripting Logic
- Env/Keystore Management
- File Utilities
- Network Utilities
- Image Utilities
- Text Utilities
- Web Utilities
- Miscellaneous Utilities
- Help Utilities
- Bugs, New Features, & Questions
- Make A Contribution
- Support This Project
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 script to help alleviate these issues, and realized the whole world of opportunity I had to help optimize my own daily workflows on the terminal.
I knew I was not the only one who had suffered from these productivity issues as my co-workers saw interest in the tool I was developing. Upon this I decided to start developing a more generic and robust version of my original tool to allow developers across the world optimize their productivity with this tool too!
The dependencies include:
openssl
for the Random String Generation commands.git
for all Git Automation commands.- Visual Studio Code for the
vsc
code editor command. - XCode for the
xc
code editor command (only available for Macintosh systems). speedtest
(the Ookla speedtest-cli) for runnning network speed tests. The installation commands for this on MacOS and Debian are insetup.sh
.
- Clone this repository into a folder of your choice:
git clone git@github.com:hwixley/WIX-CLI.git
- Navigate into the directory:
cd WIX-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 unix systems)
Type wix
to see the list of commands and start developing some magic!
- You can use OpenAI's ChatGPT to write commit messages for you (using
git diff
andgit status
outputs) when using thewix push
command. This requires an OpenAI API key.
wix setup smart_commit
- Remove your installation
rm -rf <path-of-installation>
- Remove the wix-cli script setup in your environment file
- Open the file in an editor: (
~/.bashrc
for linux systems, and~/.zshrc
for unix systems)Ifgedit ~/.bashrc
gedit
is not available you can always use vim instead:vi ~/.bashrc
- Remove the 2 lines for the wix-cli:
- The first line is a comment:
# WIX-CLI
- The second line is where the command is actually setup:
alias wix="<path-of-installation>/wix-cli.sh"
- The first line is a comment:
- Open the file in an editor: (
- Follow the installation instructions
Please note any command with an argument in angle brackets below (ie. <branch>
) denotes a dynamic variable which is given by the user. If the text inside these angle has a ?
character at the end (ie. <branch?>
) this denotes that this argument is optional and if left empty will fallback to the default.
<branch?>
: if left empty the current branch will be used<org?>
: if left empty the default GitHub organisation set inmyorgs
will be used- Any other optional arguments that you omit will be prompted upon execution
**Note: all commands below should be preceded by the wix
command, this was ommitted for readability.**
cd <mydir>
: directory navigation using custom aliases stored inmydirs
back
: go back to last directory
vsc <mydir>
: open location of alias in Visual Studio Codexc <mydir>
: open location of alias in XCode (only available for macintosh systems)
run <myscript>
: setup and run the script saved under the given script alias
push <branch?>
: push changes to the given repository branch (prompts you to enter a commit message on execution and leaves a default message if left empty)pull <branch?>
: pull changes from the given repository branchginit <newdir?>
: initialize git repository in current directory if<newdir>
is not set, otherwise, a new directory is created called<newdir>
and a git repository is initialized there instead
nb <name?>
: create a new branchpr
: create a PR against the default branch from the current branchbpr <name?>
: checkout changes to a new branch and create a PR from this branchcommits
: view detailed commit historylastcommit
: view last commit
repo
: go to the respective GitHub repository url on the default branch from your current directorybranch
: go to the respective GitHub repository url on the current branch from your current directoryprs
: go to the Pull Requests page for the respective GitHub repository url from your current directoryactions
: go to the Action Workflows page for the respective GitHub repository url from your current directoryissues
: go to the Issues page for the respective GitHub repository url from your current directorynotifs
: go to your GitHub Notificationsprofile
: go to your GitHub profileorg <myorg?>
: go to the specified url of the GitHub organizationhelp
: go to the wix-cli GitHub Pages url for documentation
user
: displays stored user-specific data such as:username
- which represents the user's GitHub username (for configuring GitHub urls),name
- for software licensing copyright clauses (when setting up GitHub software licenses for your repositories)myorgs
: displays stored aliases for user's GitHub organizations (for configuring GitHub urls). Please note you can use thedefault
alias for your most commonly used organization, allowing you to not have to type the organization alias in cases where a<myorg?>
argument is presentmydirs
: displays stored aliases for user's directories (for efficient terminal navigation)myscripts
: displays stored aliases for user's custom scripts (for efficient environment setup or script execution)
editd <data>
: allows the user to edit the specified piece of data (user
,myorgs
,mydirs
,myscripts
, ortodo
)edits <myscript>
: allows the user to edit the specified script (this edits the script referenced from the alias stored inmyscripts
not themyscripts
aliases data)newscript <script-name?>
: allows the user to create a new script
keystore <key> <value?>
: this allows you to add a key-value pair to your '.env' keystoresetup openai_key
: this allows you to useask-gpt
and smart commit features which use OpenAI's API.setup smart_commit
: this allows you to use OpenAI's ChatGPT to write commit messages for you (usinggit diff
andgit status
outputs). This requires an OpenAI API key.
fopen
: open the current directory in your native files applicationfind <fname>.<fext>
: find a file inside the current directory with the respective name (usefind "*.<ext>"
for finding all files with the given extension)regex <regex?> <fname?>
: counts number of regex matches found in the given filergxmatch <regex?> <fname?>
: returns strings of regex matches found in the given fileencrypt <dirname|fname?>
: GPG encrypt a file/directory (saves a new .gpg file)decrypt <fname?>
: GPG decrypt a file (must be a .gpg file)
ip
: get local and public IP addresses of your computerwifi
: lists details about available wifi networks on your host machinewpass
: lists your saved wifi passwordsspeedtest
: run a network speedtesthardware-ports
: list your hardware network ports
genqr <url?> <fname?>
: generate a png QR code for the specified URLupscale <fname?> <scale?>
: upscale an image's resolution (does not smooth interpolated pixels)
genpass <pass-length>
: generate and copy random password string (includes punctuation, digits, upper/lowercase ASCII) of specified length (of default length 16)genhex <hex-length?>
: generate and copy random hex string of specified length (of default length 32)genb64 <base64-length?>
: generate and copy random base64 string of specified length (of default length 32)copy <string?|cmd?>
: copy a string or the output of a shell command (using $() syntax) to your clipboardlastcmd
: copy the last command you ran to your clipboard
webtext
: extract readable text from a website
weather <city?>
: get the weather for your current/specified locationmoon
: get the current moon phaseleap-year
: tells you the next leap year
explain "<cmd?>"
: explain the syntax of the specified bash commandask-gpt
: start a conversation with OpenAI's ChatGPT in the terminal. This requires an OpenAI API key.google <query?>
: google a query
Please post bug reports and new features in the issues section - there are custom templates you can use for each of these. And please post any questions you may have in the discussion section, I will reply to these as soon as I can! :)
Contributions are welcome! Pick up a ticket from the Issues section and link it in your PR, I will review it when I can!
I am developing this project in my spare time to help developer's across the globe maximize their productivity in the terminal. If you have found this tool useful please leave a star on this repository it really helps me out! I also have a buymeacoffee sponsor link if you would like to help me to continue to be able to develop OSS in spare time by helping me stay caffeinated and coding. ☕ ⚡