{"id":16676990,"url":"https://github.com/jeckel/bash-toolkit","last_synced_at":"2026-04-21T10:02:47.790Z","repository":{"id":70148762,"uuid":"90859750","full_name":"jeckel/bash-toolkit","owner":"jeckel","description":"Bash scripts and tools","archived":false,"fork":false,"pushed_at":"2017-05-22T12:24:20.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T06:14:00.719Z","etag":null,"topics":["bash","bash-script","docker","monit"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeckel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-10T12:05:30.000Z","updated_at":"2025-01-29T15:56:54.000Z","dependencies_parsed_at":"2023-02-27T08:46:22.251Z","dependency_job_id":null,"html_url":"https://github.com/jeckel/bash-toolkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeckel%2Fbash-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeckel%2Fbash-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeckel%2Fbash-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeckel%2Fbash-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeckel","download_url":"https://codeload.github.com/jeckel/bash-toolkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243352034,"owners_count":20276916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-script","docker","monit"],"created_at":"2024-10-12T13:24:49.385Z","updated_at":"2025-12-27T13:20:08.511Z","avatar_url":"https://github.com/jeckel.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Twitter](https://img.shields.io/badge/Twitter-%40jeckel4-blue.svg)](https://twitter.com/intent/user?screen_name=jeckel4) [![LinkedIn](https://img.shields.io/badge/LinkedIn-Julien%20Mercier-blue.svg)](https://www.linkedin.com/in/jeckel/)\n\n# Bash ToolKit\nBash scripts and tools\n\n## Usages\n\n### In your scripts\n\nTo use this toolkit in your own `bash` scripts just start your script with the following lines :\n```bash\n# Load framework\nreadonly BIN=\"$(dirname \"$0\")\"\nsource ${BIN}/../main.sh\n```\n\nReplace the path to the `main.sh` according to your installation.\n\nThen you can load the modules you want with the `module` command :\n\n```bash\nmodule colors\nmodule logs\nmodule docker\n```\n\n### In [Monit](https://www.mmonit.com/monit/)'s configuration file for docker\n\nYou can use this Toolkit to monitor docker's container with [Monit](https://www.mmonit.com/monit/).\n\nHere is a sample config you can use for monitoring a container named `portainer` :\n\n```monit\ncheck program docker_portainer with path \u003cpath_to_toolkit\u003e/scripts/docker_monit.sh -s portainer\n      if status != 0 then alert\n      start program \"\u003cpath_to_toolkit\u003e/scripts/docker_monit.sh -s portainer start\"\n      stop program \"\u003cpath_to_toolkit\u003e/scripts/docker_monit.sh -s portainer stop\"\n```\n\nDon't forget to replace \u003cpath_to_toolkit\u003e with the install directory of this toolkit.\n\n## Modules\n\n### colors\n\nThis module is used by other modules, it define some ANSI constants to use colors in your script.\n\n### logs\n\nThis module provide a list of usefull methods to display fancy log during the execution of your scripts.\n\n### docker\n\nThis module provide a list of function to manipulates docker container, with secure dependencies, and with fancy log messages.\n\n\n\n## Resources\n\n* [\"Usage\" message](https://en.wikipedia.org/wiki/Usage_message) or *How to show help in scripts?*\n* [How to handle command line arguments](http://mywiki.wooledge.org/BashFAQ/035)\n* [Small `getopts` tutorial](http://wiki.bash-hackers.org/howto/getopts_tutorial)\n* [Bash parameters and parameter expansions](https://www.ibm.com/developerworks/library/l-bash-parameters/index.html)\n* [Conditions in Bash scripting (`if` statements)](https://linuxacademy.com/blog/linux/conditions-in-bash-scripting-if-statements/)\n* [4 bash `if` statements example](http://www.thegeekstuff.com/2010/06/bash-if-statement-examples/)\n* [ANSI Escape Sequences](http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/c327.html)\n* [Returning values from Bash functions](http://www.linuxjournal.com/content/return-values-bash-functions)\n\n### Makefile\n* [Makefile statements](http://makepp.sourceforge.net/1.19/makepp_statements.html)\n* [Introduction à Makefile](http://gl.developpez.com/tutoriel/outil/makefile/) :fr:\n\n### Screen\n* [Split screen reminders](https://unix.stackexchange.com/questions/7453/how-to-split-the-terminal-into-more-than-one-view#7455)\n\n### Misc\n* [10 tools to add some spice to your UNIX shell scripts](https://www.cyberciti.biz/tips/spice-up-your-unix-linux-shell-scripts.html)\n\n### Bash Framework\n* [Bashinator](https://github.com/wschlich/bashinator)\n* [Bashworks](https://github.com/jpic/bashworks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeckel%2Fbash-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeckel%2Fbash-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeckel%2Fbash-toolkit/lists"}