https://github.com/shikaan/shmux Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Education + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} shikaan / shmux Public * Notifications * Fork 0 * Star 4 Shell script multiplexer License MIT license 4 stars 0 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights shikaan/shmux This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 3 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/s] Use Git or checkout with SVN using the web URL. [gh repo clone shikaa] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @shikaan shikaan feat: validate cli arguments ... 5cb9966 Dec 24, 2022 feat: validate cli arguments 5cb9966 Git stats * 18 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows docs pkg .gitignore LICENSE README.md go.mod go.sum main.go View code [ ] shmux [?][?] Quick start Installation Usage More Usage Documentation FAQs Contributing License README.md logo shmux Shell script multiplexer. Write and run multiple scripts from the same file. In (almost) any language. [?][?] Quick start Installation Unix OS=$(uname | tr '[:upper:]' '[:lower:]') ARCH=$([[ $(uname -m) == "x86_64" ]] && echo "amd64" || echo "386") wget -O /usr/local/bin/shmux https://github.com/shikaan/shmux/releases/latest/download/shmux-${OS}-${ARCH} chmod u+x /usr/local/bin/shmux Windows and manual instructions Head to the releases page and download the executable for your system and architecture. Usage A common use case for shmux is running simple scripts for your app in a standardised and language agnostic way. These scripts are to be found in the configuraiton file, also known as shmuxfile. For exmaple, a shmux.sh for a Go project might look like: build: go generate GOOS=$1 go build greet: echo "Hello $1, my old friend" Which can then be utilized from within the same folder as # Runs the test command $ shmux test # Runs the build command with "linux" as $1 $ shmux build -- "linux" # Runs the greet command with "darkness" as $1 $ shmux greet -- "darkness" # => Hello darkness, my old friend More Usage What if we wanted to write the scripts in JavaScript? Well, you then just need a shmux.js which reads something like greet: const friend = "$1" const author = "$@" const message = friend === "darkness" ? "Hello darkness, my old friend" : `Hello ${friend}, from ${author}` console.log(message) and run it like # As flags $ shmux -config="shmux.js" -shell=$(which node) greet -- "Manuel" # => Hello Manuel, from greet # or from environment export SHMUX_CONFIG="shmux.js" export SHMUX_SHELL=$(which node) shmux greet -- "Manuel" Documentation More detailed documentation can be found here. FAQs * Which languages are supported? shmux makes no assumptions about the underlying scripting language to utilize, because it always requires you to specify the shell. Any language whose syntax is compatible with shmuxfiles' requirements is supported. * Does it have editor support? As long as the language you choose is fine with having strings like script: in its syntax, you can just piggy-back on the existing editor support. For example, if your shmuxfile hosts JavaScript code, calling it shmux.js will give you decent syntax highlighting out of the box in most editors. More sophisticated editor support may be coming soon. If you are interested, feel free to open an issue. Contributing Have a look through existing Issues and Pull Requests that you could help with. If you'd like to request a feature or report a bug, please create a GitHub Issue. License MIT About Shell script multiplexer Topics go shell cli productivity terminal makefile scripts shell-script Resources Readme License MIT license Stars 4 stars Watchers 1 watching Forks 0 forks Releases 3 v0.1.2 Latest Dec 24, 2022 + 2 releases Languages * Go 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.