Skip to content

March 2026 (v0.1.1)

Latest

Choose a tag to compare

@JasnRathore JasnRathore released this 14 Mar 13:30

JCommandChain (JCC) v0.1.1

JCC is a simple CLI tool that lets you alias long commands and run multiple of them concurrently — all from a single jcc.config.json in your project directory.

This is the first release of JCommandChain, establishing the core aliasing and concurrent command execution workflow for developers tired of typing the same long commands over and over.


Release Highlights

  • Command aliasing — Map short names to long, complex commands in a simple JSON config. Type jcc client instead of LiveReloadWebServer 'path/client' --port 1200 -useSsl --useLiveReload.
  • Concurrent execution — Run multiple aliased commands in parallel with a single jcc invocation, using Go's sync.WaitGroup under the hood.
  • Named command groups — Define groups of aliases under multiple and run them all at once with a single key (e.g. jcc run).
  • --init scaffolding — Generates an empty jcc.config.json in the current directory. Prompts before overwriting an existing config.
  • Colored output — Clear, color-coded terminal feedback for errors, hints, and internal command output.
  • Windows installerJCommandChainSetup@v0.1.1.exe handles installation and PATH registration on Windows via NSIS.

Changes

This is the initial release — all features are new.

Added

  • main.go — Entry point; reads config, resolves aliases and multiple groups, and runs commands concurrently via goroutines.
  • internal_commands/internal_commands.go — Handles --init (config scaffolding with overwrite prompt) and --help (usage guidance). Checks for config file existence before any command execution.
  • jcc.config.json format — JSON config with two top-level keys:
    • aliases — maps a short name to a full shell command string
    • multiple — maps a group name to a list of alias keys to run concurrently
  • Concurrent execution — All resolved commands are dispatched as goroutines and waited on with sync.WaitGroup.
  • Duplicate key guard — If a name exists in both aliases and multiple, JCC surfaces a red error and halts rather than silently misbehaving.
  • NSIS installer (script.nsi) — Windows installer that copies jcc.exe to Program Files\JCommandChain, registers it on the system PATH, and adds an uninstall entry.

Dependencies

Package Version Purpose
github.com/fatih/color v1.17.0 Colored terminal output
github.com/mattn/go-colorable v0.1.13 Cross-platform color support
github.com/mattn/go-isatty v0.0.20 Terminal detection for color
golang.org/x/sys v0.18.0 System-level OS support

Installation & Usage

Option 1 — Windows Installer (Recommended for Windows)

Download JCommandChainSetup@v0.1.1.exe from the Releases page and run it. The installer will:

  • Copy jcc.exe to Program Files\JCommandChain
  • Automatically add the install directory to your system PATH
  • Register an uninstaller under Add or Remove Programs

Open a new terminal and jcc is ready to use.

Option 2 — Build from Source

git clone https://github.com/JasnRathore/JCommandChain.git
cd JCommandChain
go build -o jcc.exe

Add the resulting jcc.exe to your PATH manually.

Option 3 — Manual Binary

Download the pre-built binary from the Releases page, place it somewhere on your PATH, and you're done.


Initialize a Config

In your project directory:

jcc --init

This creates a jcc.config.json with empty aliases and multiple sections.

Configure Your Commands

{
    "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"]
    }
}

Run Commands

jcc client              # Run a single alias
jcc client tailwind     # Run two aliases concurrently (ad-hoc)
jcc run                 # Run all commands defined in the "run" group

Config Rules

  • Don't reuse a name across both aliases and multiple — JCC will error and halt.
  • multiple entries must reference alias keys, not raw command strings.

Known Issues

  • Windows-only testing — JCC uses sh -c to run commands, which requires a Unix shell. On Windows this depends on Git Bash, WSL, or a similar shell being available. Native cmd/PowerShell execution is not yet supported.
  • No error recovery — If one command in a concurrent group fails, log.Fatal is called, which kills the entire process including other running commands.
  • No --add command — The --add internal command (for adding aliases via the terminal) is stubbed out in the source but not yet implemented.
  • Config must be in the current directory — JCC always looks for jcc.config.json in the working directory; there is no way to specify a custom config path.

What's Next

  • 🖥️ Native Windows shell support — Run commands via cmd /c on Windows instead of requiring sh.
  • --add command — Add aliases directly from the terminal without editing the JSON file.
  • 📁 Custom config path — Support a --config flag to point JCC at a config file in a different directory.
  • 🛑 Graceful error handling — Stop one failing command from taking down the entire concurrent group.
  • 🐧 Linux/macOS binary distribution — Shell install script or package manager support.

Get Involved

JCC is intentionally minimal — a small Go binary with a simple JSON config. Feedback and contributions are welcome.

  • 🐛 Found a bug? Open an issue
  • 💡 Have an idea? Start a discussion or submit a PR
  • Find it useful? A GitHub star helps others discover the project