{"id":17043411,"url":"https://github.com/leavez/shell","last_synced_at":"2026-04-11T08:04:34.737Z","repository":{"id":42624500,"uuid":"345669989","full_name":"leavez/Shell","owner":"leavez","description":"Run shell commands fastly","archived":false,"fork":false,"pushed_at":"2022-12-21T09:00:34.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T05:27:03.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leavez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-08T13:43:08.000Z","updated_at":"2023-04-07T02:17:02.000Z","dependencies_parsed_at":"2023-01-30T03:00:30.054Z","dependency_job_id":null,"html_url":"https://github.com/leavez/Shell","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leavez%2FShell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leavez%2FShell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leavez%2FShell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leavez%2FShell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leavez","download_url":"https://codeload.github.com/leavez/Shell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245045589,"owners_count":20552061,"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":[],"created_at":"2024-10-14T09:29:29.245Z","updated_at":"2026-04-11T08:04:34.709Z","avatar_url":"https://github.com/leavez.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shell\n\nSimple framework to run shell commands, fast.\n\n```swift\n// -- run and get result --\nlet output = Shell.run(\"ls\")\nif let err = output.error() {\n    // including launch error or return non-zero code (with stderr as error message)\n    throw err \n}\n// output.exitCode\n// output.stdout\n// output.stderror\n\n// -- run and print to stdout/stderr --\ntry Shell.runAndPrint(\"ls\", \"./\")\n\n// -- run bash script --\nlet output = Shell.run(bash: \"ls\")\ntry Shell.runAndPrint(bash: \"ls ./\")\n```\n\n## Why another shell framework?\n\n`Shell` is highly inspired by [SwiftShell](https://github.com/kareman/SwiftShell) and copied a lot of code from it. So why another lib? The main reason is SwiftShell use `Process.waitUntilExit` and it [cause slow execution](https://github.com/kareman/SwiftShell/issues/101) for simple commands. SwiftShell is full featured and has a clear API. But when I fixing this problem, I feel its implementation a little bit complex for basic shell calls.  So `Shell` comes, with simple implementations and is easy to modify. It also provides a new error checking API, convenient for programs with a lot of shell interactions.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleavez%2Fshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleavez%2Fshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleavez%2Fshell/lists"}