Skip to content

Swiss-army-knife CLI compatible with BASH & ZSH on Debian and Macintosh with an array of utilities for optimising your development workflow and productivity in the terminal

License

Notifications You must be signed in to change notification settings

hwixley/WYX-CLI

Repository files navigation

⚡️ WYX CLI ⚡️

Optimize your development productivity in the terminal


CODEQL Deploy Jekyll GH-Pages Generate Stdout Image
License Version Shell Support Operating Systems



Table of Contents


What It Does

Provides developers with the ability for optimising the execution of commonly performed tasks, commands, directory navigations, and environment setups/script executions.

Why It Was Made

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!


Support This Project

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. ☕ ⚡


Dependencies

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 in setup.sh.

Installation

  1. Clone this repository into a folder of your choice:
git clone git@github.com:hwixley/WYX-CLI.git
  1. Navigate into the directory:
cd WYX-CLI
  1. Give permissions to the setup script and run it:
chmod +x setup.sh && ./setup.sh
  1. Reopen your terminal or run source ~/.bashrc (source ~/.zshrc for unix systems)

Type wyx to see the list of commands and start developing some magic!

Extra Feature Setup

  1. You can use OpenAI's ChatGPT to write commit messages for you (using git diff and git status outputs) when using the wyx push command. This requires an OpenAI API key.
wyx setup smart_commit

Factory-reset Installation

  1. Remove your installation
rm -rf <path-of-installation>
  1. Remove the wyx-cli script setup in your environment file
    • Open the file in an editor: (~/.bashrc for linux systems, and ~/.zshrc for unix systems)
      gedit ~/.bashrc
      
      If 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"
  2. Follow the installation instructions

List of Commands

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.

Defaults

  • <branch?> : if left empty the current branch will be used
  • <org?> : if left empty the default GitHub organisation set in myorgs will be used
  • Any other optional arguments that you omit will be prompted upon execution

**Note: all commands below should be preceded by the wyx command, this was ommitted for readability.**

VERSION:

  • version: WYX-CLI Version

SYSTEM:

  • sys-info: Get Detailed System Information

DEPENDENCIES:

  • install-deps: Install WYX-CLI dependencies
  • update-deps: Update the project dependencies
  • list-deps: List the project dependencies

DIRECTORY NAVIGATION:

  • cd: Navigate Directory Aliases
  • back: Go Back A Directory

CODE:

  • run: Run Script Aliases
  • vsc: Open Directory Aliases in VSCode

GIT AUTOMATION:

  • ginit: Initialise Git Repository
  • push: Add-Commit-Push Git Changes to Current Branch
  • pull: Pull Git Changes for Current Branch
  • mpull: Checkout-Pull Git Changes From Master/Main Branch
  • repo: View Your Repository On GitHub
  • branch: View Your Current Branch On GitHub
  • actions: View Your Repository Actions On GitHub
  • issues: View Your Repository Issues On GitHub
  • prs: View Your Repository PRs On GitHub
  • notifs: View Your GitHub Notifications
  • commits: View Your Branch Git Commits
  • lastcommit: View Your Last Commit & Copy It's ID
  • nb: Checkout-Add-Commit-Push A New Git Branch
  • pr: Open A Pull Request From Your Current Git Branch on GitHub
  • bpr: Checkout-Add-Commit-Push A New Git Branch & Open A PR For It On GitHub
  • profile: View Your GitHub Profile
  • org: View Your GitHub Organisation
  • pp: Pull-Push Git Changes to Current Branch

MY DATA:

  • user: View Your User Configuration
  • mydirs: View Your Directory Aliases Configuration
  • myorgs: View Your GitHub Organisation Configuration
  • myscripts: View Your Scripts Configuration
  • todo: View Your To-Do List

MANAGE MY DATA:

  • editd: Edit Your WYX-CLI Configuration
  • edits: Edit A Script File
  • newscript: Create A New Script

ENV/KEYSTORE:

  • keystore: Add a key-value pair to your '.env' keystore
  • setup: Setup WYX-CLI Third Party API-based utilities

FILE UTILITIES:

  • find: Regex Search Current Directory For File
  • fopen: Open current directory in your files application
  • encrypt: Encrypt a file using GPG
  • decrypt: Decrypt a GPG-encrypted file

NETWORK UTILITIES:

  • ip: View Your Local & Public IPs
  • wifi: View Available WiFi Networks
  • hardware-ports: View Your Hardware Ports
  • wpass: View Your Saved WiFi Passwords
  • speedtest: Run A Speed Test On Your Network

IMAGE UTILITIES:

  • genqr: Generate a QR code from a URL
  • upscale: Scale up an image (uses no smoothing)

TEXT UTILITIES:

  • genpass: Generate A Random Password
  • genhex: Generate A Random Hex String
  • genb64: Generate A Random Base64 String
  • lastcmd: Copy Your Last Command To Your Clipboard
  • copy: Copy output of a command to clipboard

WEB UTILITIES:

  • webtext: Read-only websites in your terminal

MISC UTILITIES:

  • weather: View the weather forecast for your location in the terminal
  • moon: View the moon phase
  • leap-year: Check when the next leap year is

HELP UTILITIES:

  • help: View WYX-CLI Documentation
  • explain: Explain a bash command
  • ask-gpt: Start a conversation with ChatGPT
  • google: Google a query