{"id":15497311,"url":"https://github.com/jwerle/batsh","last_synced_at":"2026-03-08T14:39:29.950Z","repository":{"id":20566166,"uuid":"23846393","full_name":"jwerle/batsh","owner":"jwerle","description":"Queue bash commands to run with a given concurrency","archived":false,"fork":false,"pushed_at":"2014-09-09T19:05:41.000Z","size":136,"stargazers_count":13,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T21:51:16.616Z","etag":null,"topics":[],"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/jwerle.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}},"created_at":"2014-09-09T19:03:53.000Z","updated_at":"2023-02-06T07:30:35.000Z","dependencies_parsed_at":"2022-09-06T11:11:46.853Z","dependency_job_id":null,"html_url":"https://github.com/jwerle/batsh","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jwerle/batsh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fbatsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fbatsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fbatsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fbatsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwerle","download_url":"https://codeload.github.com/jwerle/batsh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fbatsh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270183606,"owners_count":24541341,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-02T08:32:47.554Z","updated_at":"2026-03-08T14:39:24.927Z","avatar_url":"https://github.com/jwerle.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"batsh(1)\n=======\n\nQueue bash commands to run with a given concurrency. Similar to\n`batch(1)` without the crap\n\n## install\n\n```sh\n$ bpkg install jwerle/batsh\n```\n\n## usage\n\n```\nusage: batsh [-hV]\n   or: batsh push \u003cscript\u003e\n   or: batsh run [script]\n   or: batsh clear\n   or: batsh reset\n   or: batsh concurrency \u003cn\u003e\n```\n\n`batsh(1)` allows the user to queue jobs that will run with a set\nconcurrency (Default `0`). Jobs are pushed with `batsh push` onto\na queue and are ran with `batsh run`. The queue can be cleared with\n`batsh clear`.\n\n## push\n\nJobs that are pushed are just shell scripts that are invoked with the\nbatsh jobs are ran.\n\n```sh\n$ batsh push 'echo beep'\n```\n\n## run\n\nJobs are ran with `batsh run` which accepts optional code to be executed\nwhen all jobs have completed. This command has an alias of `batsh r`.\n\n```sh\n$ batsh run 'echo done'\nbeep\ndone\n```\n\n## concurrency\n\nConcurrency can be set with `batsh concurrency`. It has an alias of\n`batsh c`.\n\n```sh\n$ batsh concurrency 2\n```\n\n## batsh instance\n\n`batsh(1)` manages its state in a directory set with the `BATSH`\nenvironment variable. The default is `${HOME}/.batsh`. A user can manage\nmultiple `batsh` instances by settings this variable.\n\n## batch scripts\n\n`batsh(1)` can run a script exposing a few helper functions. Batsh\nscript is just bash.\n\n```sh\n#!/usr/bin/env batsh\n\n## jobs\npush 'echo beep'\npush 'echo boop'\npush 'sleep 1 \u0026\u0026 echo beeps'\npush 'sleep 1 \u0026\u0026 echo boops'\n\n## set concurrency\nconcurrency 2\n\n## run\nrun 'echo done'\n```\n\n## license\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwerle%2Fbatsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwerle%2Fbatsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwerle%2Fbatsh/lists"}