Skip to content

JasnRathore/JCommandChain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JCommandChain (JCC)

JCC is A Simple CLI Tool That Allows you to alias Commands/scripts or run multiple of them concurrently

Note this is Only Tested and Used on Windows On My Side

Building the Executable

go build -o jcc.exe

Now Add The Executable to Path

Building the Installer (NSIS)

Prerequisites:

  • NSIS installed and makensis available in PATH.

Build the installer:

.\build-installer.ps1 -Version 0.1.0

Output:

  • dist\JCommandChain-Setup-0.1.0.exe

Usage

Creating The Config File if Exe is Added To Path

  jcc --init

if Exe is not Added To Path

  ./jcc.exe --init
Empty Config Created
  {
    aliases: {},
    multiple: {}
  }

The Config {jcc.config.json}

Example

  {
    aliases: {
      "client": "LiveReloadWebServer 'path/client' --port 1200 -useSsl --useLiveReload"
      "tailwind": "npx tailwindcss -i ./client/input.css -o ./client/output.css --watch"
    },
    multiple: {
      "run": ["client","tailwind"] 
    }
  }
Donts in Config
  • Dont Have Same Names In both Aliaes and Multiple
  {
    aliases: {
      "client": "LiveReloadWebServer 'path/client' --port 1200 -useSsl --useLiveReload"
      "tailwind": "npx tailwindcss -i ./client/input.css -o ./client/output.css --watch"
    },
    multiple: {
      // dont
      "client": ["client","tailwind"] 
    }
  }
  • Dont use Commands Directly in Multiple like Shown in "run" command
  {
    aliases: {
      "client": "LiveReloadWebServer 'path/client' --port 1200 -useSsl --useLiveReload"
      "tailwind": "npx tailwindcss -i ./client/input.css -o ./client/output.css --watch"
    },
    multiple: {
      // dont
      "run": ["client","npx tailwindcss -i ./client/input.css -o ./client/output.css --watch"] 
    }
 }
Using Your Commands

Using the first Correct Config given above in Example

  • To only use One command
  jcc client
  • To run Multiple Commands directly
  jcc client tailwind
  • To Run Multiple Commands Defind in Config
  jcc run 

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors