{"id":16625523,"url":"https://github.com/aleclarson/cush-shell","last_synced_at":"2025-08-11T05:15:05.720Z","repository":{"id":57104975,"uuid":"357325440","full_name":"aleclarson/cush-shell","owner":"aleclarson","description":"Throwaway shell scripts","archived":false,"fork":false,"pushed_at":"2021-04-12T20:11:19.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T02:50:48.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/aleclarson.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":"2021-04-12T20:08:49.000Z","updated_at":"2021-04-14T00:27:23.000Z","dependencies_parsed_at":"2022-08-20T17:10:56.014Z","dependency_job_id":null,"html_url":"https://github.com/aleclarson/cush-shell","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aleclarson/cush-shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcush-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcush-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcush-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcush-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleclarson","download_url":"https://codeload.github.com/aleclarson/cush-shell/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcush-shell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269833176,"owners_count":24482396,"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-11T02:00:10.019Z","response_time":75,"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-12T04:05:59.685Z","updated_at":"2025-08-11T05:15:05.698Z","avatar_url":"https://github.com/aleclarson.png","language":"TypeScript","funding_links":["https://paypal.me/alecdotbiz"],"categories":[],"sub_categories":[],"readme":"# @cush/shell\n\n[![npm](https://img.shields.io/npm/v/@cush/shell.svg)](https://www.npmjs.com/package/@cush/shell)\n[![Code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/alecdotbiz)\n\n\u003e Throwaway shell scripts\n\n**Features:**\n\n- Anything a shell script can do\n  - Piping\n  - Multiple lines\n  - Shebang\n- Includes `set -e` automatically\n- Optional blocking mode\n- Cleans up after script finishes or when process exits\n- Executed with [`@cush/exec`](https://www.npmjs.com/package/@cush/exec)\n  - Arguments are passed through (see readme for more info)\n\n\u0026nbsp;\n\n## Usage\n\n```ts\nimport shell from '@cush/shell'\n\n// Scripts can be indented if you like.\nconst script = `\n  #!/usr/bin/bash\n  ls | xargs -I {} echo {}\n`\n\nconst proc = shell(script, (stdout, stderr) =\u003e {\n  // This callback is optional.\n  // See @cush/exec docs for more info.\n})\n\n// You can await the stdout.\nconst stdout = await proc\n\n// Blocking mode\nshell.sync(script)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Fcush-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleclarson%2Fcush-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Fcush-shell/lists"}