Skip to content
LounisBouPublic

About

Your Ultimate Companion for Bash Productivity! πŸš€

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

89 Commits

Folders and files

Repository files navigation

BashMate πŸš€

Your Ultimate Companion for Bash Productivity!

BashMate Logo

Description

BashMate is a curated collection of bash commands, functions, and aliases designed to supercharge your terminal experience. Whether you're wrangling Git, managing macOS specifics, or sailing through Laravel tasks, BashMate is here to assist. Explore, contribute, and make your command-line experience efficient and enjoyable!

Features

  • Git Enhancements: Simplified git commands and useful aliases.
  • macOS Utilities: Tools specifically tailored for macOS users.
  • Laravel Shortcuts: Commands to streamline Laravel development.
  • Envoyer.io Api Commands: Commands to consult deployment status of envoyer.io projects.
  • And More!: Discover various other utilities to boost your productivity.

Installation

Manual Installation

  1. Clone the repository:

    git clone https://github.com/LounisBou/BashMate.git
  2. Source the main bash file (or add this to your .bashrc or .zshrc for permanent use):

    cd BashMate
    echo "source $(PWD)/bashmate.sh" >> ~/.zshrc
  3. Restart your terminal or run source ~/.zshrc or source ~/.bashrc to load the new configuration.

Automatic Installation

  1. Clone the repository:

    git clone https://github.com/LounisBou/BashMate.git
  2. Run the installation script:

     cd BashMate
     chmod +x install.sh
     ./install.sh

Documentation

BashMate Aliases and Functions

Note: This section documents various aliases and functions for the bourne again shell. These were created by LounisBou.

General Shell Utilities

  • Restart bash:

    rebash
  • Restart zsh:

    rezsh
  • Shutdown:

    shutdown
  • Reboot:

    reboot
  • List all files:

    ll
  • Get the real path of a file:

    path
  • Clear terminal:

    cl
  • Watch aliases:

    watcha

System User Utilities

  • Add group to user:
    add-group

Filesystem Utilities

  • Create folder for each file:

    folderPack
  • Rename files:

    rname

Network Utilities (using NMAP)

  • Check all machines on LAN:

    onLan
  • Check for specific port on LAN:

    onLanPort

Compression & Decompression (using TAR)

  • Compress folder in tar.gz file:

    targz
  • Uncompress tar.gz file:

    untargz

BrewMate: Homebrew Utilities for BashMate

This section documents various functions and aliases designed to manage Homebrew services and updates.

Brew Services Management

  • View and manage services:

    services
  • Start a service:

    start
  • Start a service with sudo:

    sstart
  • Stop a service:

    stop
  • Stop a service with sudo:

    sstop
  • Restart a service:

    restart
  • Restart a service with sudo:

    srestart

Brew Update Utilities

  • Update, upgrade, clean, and check Homebrew:

    brewup
  • Update, upgrade, clean, check Homebrew, and upgrade casks:

    brewupc

EnvoyerMate: Envoyer API Utilities for BashMate

This section documents various functions designed to interact with the Envoyer API. These utilities allow you to fetch and display project and deployment information.


List of All Projects: envoyer-projects

Displays a list of all the projects fetched from the Envoyer API.

Usage:

envoyer-projects

Ensure you include any required instructions or prerequisites for using these functions. For example, users might need to have jq and curl utilities installed and the API endpoint & token should be correctly set in the environment variables.


Specific Project Details:

Fetches and displays detailed information of a specific project from the Envoyer API based on the provided Project ID.

Usage:

envoyer-project [PROJECT_ID]

Note: Make sure the environment variables $ENVOYER_API_URL and $ENVOYER_API_TOKEN are set correctly before using these functions. Also, it's a good practice to have the jq utility installed for JSON parsing.

Git: Shortcuts

  • Initialize a New Local Git Repository:

    gcreate
  • Initialize a New Local Git Repository and Create a New GitHub Repository:

    gcreate-remote [RepoName]
  • Add Files to Staging Area:

    ga [FileName]
  • Commit Changes:

    gc "Commit Message"
  • Push Changes to Origin:

    gp [BranchName]
  • Pull Changes from Origin:

    gpl
  • Check Git Status:

    gs
  • Clone a Repository:

    gcl [RepositoryURL]
  • List Branches:

    gbr
  • Delete Branch:

    gbrd [BranchName]
  • Force Delete Branch:

    gbrD [BranchName]
  • Rename Branch:

    gbrm [OldName] [NewName]
  • Force Rename Branch:

    gbrM [OldName] [NewName]
  • Verbose List Branches:

    gbrv
  • Visualize Git Log:

    glg
  • See Differences:

    gdf
  • Initialize Git Flow:

    gfi
  • Start a New Feature Branch:

    gfs [FeatureName]
  • Finish a Feature Branch:

    gff [FeatureName]
  • Start a New Release Branch:

    grs [ReleaseName]
  • Finish a Release Branch:

    grf [ReleaseName]
  • Start a New Hotfix Branch:

    ghs [HotfixName]
  • Finish a Hotfix Branch:

    ghf [HotfixName]
  • Start a New Bugfix Branch:

    gbs [BugfixName]
  • Finish a Bugfix Branch:

    gbf [BugfixName]
  • Checkout to a Branch:

    gco [BranchName]
  • Checkout to a Feature Task Branch:

    gcft [TaskName]
  • Checkout to a Feature Branch:

    gcf [FeatureName]
  • Checkout to a Release Branch:

    gcr [ReleaseName]
  • Checkout to a Hotfix Branch:

    gch [HotfixName]
  • Checkout to a Bugfix Branch:

    gcb [BugfixName]
  • Checkout to the Develop Branch:

    gcd
  • Checkout to the Master Branch:

    gcm
  • Checkout to the Tests Branch:

    gct
  • Checkout to the Prod Branch:

    gcp
  • Checkout to the Preprod Branch:

    gcpp
  • Stash Changes:

    gst
  • List Stashed Changes:

    gstl
  • Pop Stashed Changes:

    gstp
  • Clear Stashed Changes:

    gstc
  • Merge a Feature Task into Current Branch:

    gmf [TaskName]
  • Merge Current Branch into Specified Branch:

    gmergin [BranchName]
  • Update Multiple Branches (Develop, Master, Current):

    git-update
  • Push Multiple Branches (Develop, Master, Current) After MEP:

    git-after-mep
  • Display Git Configuration Info:

    ginfo

Laravel: Shortcuts

  • Execute Artisan Command:

    art [command]
  • Create Artisan Resources:

    artm [type] [name]

    Where [type] can be any of the make options like controller, model, migration, etc., and [name] is the desired name for the resource.

  • Run Migrations:

    artmig
  • Start Laravel Development Server:

    artserve
  • Interact with Laravel Tinker:

    arttink
  • Clear Various Laravel Caches:

    artclean

MacOS: Shortcuts

Mkcert

  • Local SSL certificates:
    sslcert
    Generate SSL certificates for local development using mkcert.

Tor

  • Activate TOR Proxy:

    torStart

    This command sets up the proxy configuration on your Mac to use the local TOR instance and then starts the TOR service using Homebrew.

  • Deactivate TOR Proxy:

    torStop

    This will disable the proxy configuration on your Mac and stop the TOR service that's been started with Homebrew.

  • Restart TOR Proxy:

    torRestart

    This command is a combination of torStop and torStart, effectively restarting your TOR proxy setup.

  • Check TOR Exit Node Configuration:

    torCheck

    This displays the current configuration values for your TOR exit node by reading the /etc/torrc.exit file.

  • Set TOR Entry Node:

    torIn [country_code]

    Where [country_code] is the desired entry node's country code.
    It sets the entry node for TOR to the specified country and then restarts the TOR service.

  • Set TOR Exit Node:

    torOut [country_code]

    Where [country_code] is the desired exit node's country code.
    It configures the exit node for TOR to use nodes from the specified country and then restarts the TOR service.

Note: These utilities are designed for macOS and use specific macOS commands for configuring network settings. Before using these commands, ensure that you have proper permissions, and be careful when editing configuration files. Always make backups before making any changes.


Contributing

We welcome contributions! Whether you're adding new commands, improving existing ones, or fixing issues, your input enriches the BashMate experience. See the CONTRIBUTING.md for more details.


License

This project is licensed under the CC BY-NC - see the LICENSE file for details.

About

Your Ultimate Companion for Bash Productivity! πŸš€

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages