{"id":15853276,"url":"https://github.com/omrilotan/async-execute","last_synced_at":"2026-01-02T18:03:47.273Z","repository":{"id":254090305,"uuid":"845457455","full_name":"omrilotan/async-execute","owner":"omrilotan","description":"🦅 Execute command in a child process","archived":false,"fork":false,"pushed_at":"2024-09-11T19:41:35.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T04:11:30.311Z","etag":null,"topics":["async","execute","javascript","script"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/async-execute","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omrilotan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-08-21T09:41:13.000Z","updated_at":"2024-12-11T20:03:45.000Z","dependencies_parsed_at":"2024-08-21T11:22:00.485Z","dependency_job_id":null,"html_url":"https://github.com/omrilotan/async-execute","commit_stats":null,"previous_names":["omrilotan/async-execute"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fasync-execute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fasync-execute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fasync-execute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omrilotan%2Fasync-execute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omrilotan","download_url":"https://codeload.github.com/omrilotan/async-execute/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243792336,"owners_count":20348621,"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":["async","execute","javascript","script"],"created_at":"2024-10-05T19:03:54.862Z","updated_at":"2026-01-02T18:03:42.251Z","avatar_url":"https://github.com/omrilotan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-execute [![](https://img.shields.io/npm/v/async-execute.svg)](https://www.npmjs.com/package/async-execute)\n\n## 🦅 Execute command in a child process\n\n```js\nimport { execute } from \"async-execute\";\n\nconst commit_message = await execute(\"git log -1 --pretty=%B\"); // Committed some changes\n```\n\n## Options\n\n### Pipe stdout and stderr (default: false)\n\n```js\nawait execute(\"npm t\", { pipe: true });\n```\n\n### Exit process with child's exit code (default: false)\n\n```js\nawait execute(\"npm t\", { pipe: true, exit: true });\n```\n\n### Check a script exits properly\n\n```js\nlet code = 0;\n\ntry {\n\tconst result = await execute(\"exit 2\");\n\tcode = result.code;\n} catch (error) {\n\tcode = error.code;\n}\n\nif (code \u003e 0) {\n\t// something must have gone wrong\n}\n```\n\n## Any [exec option](https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback) can be passed\n\n```js\nawait execute(\"echo $API_KEY\", {\n\tenv: { API_KEY: \"vQQNJe7lnz4rTbYvr61VywR0wRlRzCyI\" },\n});\n\nawait execute(\"pwd\", { cwd: \"~/app\" });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomrilotan%2Fasync-execute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomrilotan%2Fasync-execute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomrilotan%2Fasync-execute/lists"}