{"id":22367605,"url":"https://github.com/hugojosefson/deno-run-simple","last_synced_at":"2025-07-04T23:05:52.051Z","repository":{"id":57711502,"uuid":"514253222","full_name":"hugojosefson/deno-run-simple","owner":"hugojosefson","description":"Simple `run` function to execute shell commands in Deno.","archived":false,"fork":false,"pushed_at":"2025-04-25T12:40:41.000Z","size":95,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-09T12:14:38.671Z","etag":null,"topics":["bash","command","deno","exec","process","run","sh","shell","simple","spawn"],"latest_commit_sha":null,"homepage":"https://jsr.io/@hugojosefson/run-simple","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/hugojosefson.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":"2022-07-15T11:58:49.000Z","updated_at":"2025-04-25T12:41:04.000Z","dependencies_parsed_at":"2023-10-17T02:05:31.023Z","dependency_job_id":"708dcd73-7a06-4439-a223-5f810e221c31","html_url":"https://github.com/hugojosefson/deno-run-simple","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"09a6372a55688fd0288a80b3a82219cc1bad2c45"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/hugojosefson/deno-run-simple","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-run-simple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-run-simple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-run-simple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-run-simple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugojosefson","download_url":"https://codeload.github.com/hugojosefson/deno-run-simple/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-run-simple/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263632055,"owners_count":23491530,"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","command","deno","exec","process","run","sh","shell","simple","spawn"],"created_at":"2024-12-04T18:19:21.960Z","updated_at":"2025-07-04T23:05:52.026Z","avatar_url":"https://github.com/hugojosefson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @hugojosefson/run-simple\n\nSimple `run` function to execute shell commands in Deno.\n\nReturns a Promise of what the command printed. Rejects with status if the\ncommand fails.\n\n[![JSR Version](https://jsr.io/badges/@hugojosefson/run-simple)](https://jsr.io/@hugojosefson/run-simple)\n[![JSR Score](https://jsr.io/badges/@hugojosefson/run-simple/score)](https://jsr.io/@hugojosefson/run-simple)\n[![CI](https://github.com/hugojosefson/deno-run-simple/actions/workflows/release.yaml/badge.svg)](https://github.com/hugojosefson/deno-run-simple/actions/workflows/release.yaml)\n\n## Requirements\n\nRequires [Deno](https://deno.com/) v1.46.3 or later. Version 2+ is recommended.\n\n## API\n\nPlease see docs on\n[jsr.io/@hugojosefson/run-simple](https://jsr.io/@hugojosefson/run-simple).\n\n## Installation\n\n```sh\n# add as dependency to your project\ndeno add jsr:@hugojosefson/run-simple\n```\n\n## Example usage\n\n```typescript\n// example-usage.ts\n\nimport { run } from \"@hugojosefson/run-simple\";\n\n// Simple command\nconst dir: string = await run(\"ls -l\");\nconsole.log(dir);\n\n// Command with variable argument\nconst uid = 1000;\nconst idLine: string = await run([\"id\", uid]);\nconsole.log(idLine);\n\n// An argument contains spaces\nconst remoteHost = \"10.20.30.40\";\nconst remoteCommand = \"ps -ef --forest\";\nconst remoteProcessTree: string = await run([\"ssh\", remoteHost, remoteCommand]);\nconsole.log(remoteProcessTree);\n\n// Supply STDIN to the command\nconst contents = `# Remote file\n\nThis will be the contents of the remote file.\n`;\nawait run(\n  [\"ssh\", remoteHost, \"bash\", \"-c\", \"cat \u003e remote_file.md\"],\n  { stdin: contents },\n);\n```\n\nYou may run the above example with:\n\n```sh\ndeno run --allow-run ./example-usage.ts\n```\n\nOr directly from here:\n\n```sh\ndeno run --allow-run --reload jsr:@hugojosefson/run-simple/example-usage\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugojosefson%2Fdeno-run-simple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugojosefson%2Fdeno-run-simple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugojosefson%2Fdeno-run-simple/lists"}