{"repo":"m10k/toolbox","free":true,"listed":false,"github":"https://github.com/m10k/toolbox","clone":"git clone https://github.com/m10k/toolbox.git","description":"Module framework for Bash","language":"Shell","stars":77,"topics":["bash","toolbox","messaging","module","publish-subscribe","pubsub","shell"],"license":"GPL-3.0","category":"cli-tools","readme_excerpt":"toolbox - A module framework for Bash Have you ever written a shell script and found yourself thinking \"if only the Bash had an include mechanism\", while copy-pasting the command line parser you wrote for a different shell script? Then you should try toolbox for your next shell script! What's toolbox? Toolbox is a simple framework for Bash that lets you modularize your scripts. At the heart of toolbox is the include() function, which works much like the import statement in Python. Once you source toolbox.sh , you can use include() to load the modules that ship with toolbox, or create your own ones. How do I use it? All you have to do is source toolbox.sh and you can start using the include() function. For example, the following code is a minimal publisher using the uipc module. . toolbox.sh include \"uipc\" endp=$(uipc endpoint open) uipc endpoint publish \"$endp\" \"mytopic\" \"Hello world\" And this is the corresponding subscriber. . toolbox.sh include \"uipc\" endp=$(uipc endpoint open) uipc endpoint subscribe \"$endp\" \"mytopic\" if msg=$(uipc endpoint recv \"$endp\"); then data=$(uipc msg get data \"$msg\") echo \"Received message: $data\" fi What modules are there? Toolbox comes with a number of modules that solve common problems. The following is a list of the default modules and what they are used for. Module Purpose -------- --------- array Comparing, searching, and sorting arrays conf Configuration handling git Interacting with git repositories inst Writing daemons ipc Message-based I","default_branch":null,"files":null,"tree":[],"storefront":"/r/m10k","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/m10k/toolbox/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}