{"id":17962555,"url":"https://github.com/eneko/processrunner","last_synced_at":"2025-09-29T05:31:56.102Z","repository":{"id":63909351,"uuid":"146395939","full_name":"eneko/ProcessRunner","owner":"eneko","description":"Execute child processes and system commands from Swift","archived":false,"fork":false,"pushed_at":"2021-01-17T17:13:05.000Z","size":271,"stargazers_count":17,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-10T19:27:43.503Z","etag":null,"topics":["child-process","cli","command","package","process","shell","swift","swiftpm","system"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/eneko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"eneko","patreon":"eneko"}},"created_at":"2018-08-28T05:24:41.000Z","updated_at":"2024-11-02T04:42:55.000Z","dependencies_parsed_at":"2022-11-29T07:09:27.535Z","dependency_job_id":null,"html_url":"https://github.com/eneko/ProcessRunner","commit_stats":null,"previous_names":["eneko/system"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneko%2FProcessRunner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneko%2FProcessRunner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneko%2FProcessRunner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eneko%2FProcessRunner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eneko","download_url":"https://codeload.github.com/eneko/ProcessRunner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234594221,"owners_count":18857420,"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":["child-process","cli","command","package","process","shell","swift","swiftpm","system"],"created_at":"2024-10-29T11:19:44.852Z","updated_at":"2025-09-29T05:31:50.813Z","avatar_url":"https://github.com/eneko.png","language":"Swift","funding_links":["https://github.com/sponsors/eneko","https://patreon.com/eneko"],"categories":[],"sub_categories":[],"readme":"# ProcessRunner\n\n![ProcessRunner](/processrunner.png)\n\n![Release](https://img.shields.io/github/release/eneko/System.svg)\n![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![Build Status](https://travis-ci.org/eneko/System.svg?branch=master)](https://travis-ci.org/eneko/System)\n[![codecov](https://codecov.io/gh/eneko/System/branch/master/graph/badge.svg)](https://codecov.io/gh/eneko/System)\n[![codebeat badge](https://codebeat.co/badges/51605ed0-b4dc-498f-9b45-375ef5011659)](https://codebeat.co/projects/github-com-eneko-system-master)\n![Linux Compatible](https://img.shields.io/badge/linux-compatible%20🐧-brightgreen.svg)\n\nEasily execute system commands from a Swift script or command line tool.\n\n**Features**\n- ✅ Easily execute child processes with arguments \n- ✅ Easily execute shell commands with arguments\n- ✅ Capture output or stream to stdout/stderr in real time\n- ✅ Swift Package Manager compatible\n- ✅ Linux compatible 🐧\n\n\n## 🚀 Executing child Processes from Swift scripts and CLI tools \nRunning child processes in Swift is not hard with `Process`, but it can be a\nbit tedious and repetitive.\n\n`System` makes this task extremely easy. If you are familiar with Ruby\nscripting (Rakefile, Fastlane, Danger, etc), you will feel like home.\n\n### 💻 Automatically redirect output to stdout \n\n```swift\nimport ProcessRunner\n\ntry system(command: \"echo hello world\") // prints \"hello world\" to stdout\n```\n\n### ✇ Capture process output \n\n```swift\nimport ProcessRunner\n\nlet output = try system(command: \"echo hello world\", captureOutput: true).standardOutput\nprint(output) // prints \"hello world\"\n```\n\n### ✔️ Check if process terminated gracefully \n\n```swift\nimport ProcessRunner\n\nprint(try system(command: \"echo hello world\").success) // prints \"true\"\n```\n\n### |\u003e Easily execute Shell commands with pipes and redirects\n\n```swift\nimport ProcessRunner\n\ntry system(shell: \"echo hello cat \u003e cat \u0026\u0026 cat cat | awk '{print $2}'\") // prints \"cat\" to stdout\n```\n\n## Installation\n\nAdd `ProcessRunner` to your `Package.swift`:\n\n```swift\nimport PackageDescription\n\nlet package = Package(\n    name: \"YourPackage\",\n    dependencies: [\n        .package(url: \"git@github.com:eneko/ProcessRunner.git\", from: \"1.0.0\"),\n    ],\n    targets: [\n        .target(\n            name: \"YourTarget\",\n            dependencies: [\"ProcessRunner\"]),\n    ]\n)\n```\n\n\n## 💌 Contact \nFollow and/or contact me on Twitter at [@eneko](https://www.twitter.com/eneko).\n\n## 👏 Contributions\nIf you find an issue, just [open a ticket](https://github.com/eneko/System/issues/new)\non it. Pull requests are warmly welcome as well.\n\n## 👮‍♂️ License\nSystem is licensed under the MIT license. See [LICENSE](/LICENSE) for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneko%2Fprocessrunner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feneko%2Fprocessrunner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneko%2Fprocessrunner/lists"}