{"id":21909735,"url":"https://github.com/yanivmo/shuz","last_synced_at":"2026-05-09T00:46:19.043Z","repository":{"id":67344187,"uuid":"255572741","full_name":"yanivmo/shuz","owner":"yanivmo","description":"Shell scripting utilz","archived":false,"fork":false,"pushed_at":"2024-10-06T04:57:25.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T08:13:49.799Z","etag":null,"topics":["bash","shell-scripting"],"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/yanivmo.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":"2020-04-14T09:59:07.000Z","updated_at":"2024-10-06T04:57:29.000Z","dependencies_parsed_at":"2024-07-25T10:47:08.372Z","dependency_job_id":null,"html_url":"https://github.com/yanivmo/shuz","commit_stats":null,"previous_names":["yanivmo/shuz"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanivmo%2Fshuz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanivmo%2Fshuz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanivmo%2Fshuz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanivmo%2Fshuz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanivmo","download_url":"https://codeload.github.com/yanivmo/shuz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244924801,"owners_count":20532878,"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","shell-scripting"],"created_at":"2024-11-28T17:25:52.850Z","updated_at":"2026-05-09T00:46:14.013Z","avatar_url":"https://github.com/yanivmo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shuz\n\nShell utilz for ergonomic shell scripting.\n\nThis is a collection of simple shell scripting utilities that I cultivated over\nthe years of writing uncountable amount of scripts in Linux/MacOS environments.\nThey are definitely opinionated, are in no way intended to address all the\npossible scripting problems or give a complete solution to anything. But they\nare battle proven and do their simple job very well.\n\nSupports Bash and Zsh.\n\n## Quick start\n\n1. Clone the repository or just download `shuz.sh`.\n2. Make sure `shuz.sh` location is in `PATH`.\n3. Add `source shuz.sh` to the beginning of your shell script.\n\n## Overview\n\nRun `test-zsh.sh` or `test-bash.sh` for a demonstration of the library features.\n\n### Terminal output functions\n\n- `shuz::ec` - More consistent echo.\n- `shuz::ecn` - More consistent echo; without the new line.\n- `shuz::br` - Outputs new line.\n- `shuz::success` - Informs that everything goes as planned.\n- `shuz::warn` - Outputs a menasing message.\n- `shuz::error` - Outputs a scary message.\n- `shuz::fail` - Outputs a message and kills the script.\n\n### Assertions and expectations\n\n- `shuz::assert_success` - Outputs a message and kills the script if the\n   previous command failed.\n- `shuz::expect_command`- Succeeds if the command in the argument can be found.\n- `shuz::assert_command`- Outputs a message and kills the script if the\n   command in the argument cannot be found.\n\n### Terminal colors\n\nshuz defines a set of variables containing ANSI escape codes controlling output\ncolor. The most common are: `bold`, `black`, `red`, `green`, `yellow`, `blue`, \n`magenta`, `cyan` and `white`. Use `noc` (no color) to reset the styling.\nFor example:\n\n```shell script\nec \"The last word will be printed in ${blue}blue${noc}\"\n```\n\n### Other functions\n\n- `shuz::multiline` - Reads multiline text from stdin into a variable.\n- `shuz::indent` - Reads multiline text from stdin and outputs it indented.\n- `shuz::are_you_sure` - Ask user a yes/no question.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanivmo%2Fshuz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanivmo%2Fshuz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanivmo%2Fshuz/lists"}