{"id":51549332,"url":"https://github.com/suolapeikko/taskutils","last_synced_at":"2026-07-09T22:05:55.157Z","repository":{"id":370298471,"uuid":"105803034","full_name":"suolapeikko/taskutils","owner":"suolapeikko","description":"Command line app example for class that runs piped commands using Process","archived":false,"fork":false,"pushed_at":"2018-06-28T10:18:50.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-08T21:06:27.725Z","etag":null,"topics":["cli","macos","swift"],"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/suolapeikko.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-10-04T18:25:22.000Z","updated_at":"2020-11-11T22:32:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/suolapeikko/taskutils","commit_stats":null,"previous_names":["suolapeikko/taskutils"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/suolapeikko/taskutils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suolapeikko%2Ftaskutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suolapeikko%2Ftaskutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suolapeikko%2Ftaskutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suolapeikko%2Ftaskutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suolapeikko","download_url":"https://codeload.github.com/suolapeikko/taskutils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suolapeikko%2Ftaskutils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35313822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-09T02:00:07.329Z","response_time":57,"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":["cli","macos","swift"],"created_at":"2026-07-09T22:05:54.442Z","updated_at":"2026-07-09T22:05:55.147Z","avatar_url":"https://github.com/suolapeikko.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# taskutils\n\nCommand line app example for class that runs piped commands using Process.\n\n## Usage\n\nSee main.swift for example:\n\n```\n// Create example command line interface commands that needs to be run chained / piped\nlet psefCommand = CliCommand(launchPath: \"/bin/ps\", arguments: [\"-e\", \"-f\"])\nlet grepMdworkerCommand = CliCommand(launchPath: \"/usr/bin/grep\", arguments: [\"mdworker\"])\n\n// Prepare cli command runner\nlet chainedCommand = CliCommandRunner(commands: [psefCommand, grepMdworkerCommand])\n\n// Prepare result tuple\nvar chainedCommandResult: String?\n\n// Execute cli commands and prepare for exceptions\ndo {\n    chainedCommandResult = try chainedCommand.execute()\n}\ncatch CliError.no_TASKS{\n    print(\"Empty task array\")\n    exit(0)\n}\ncatch CliError.execute_FAILED(let statusCode, let resultText){\n    print(\"Execute failed: status code=\\(statusCode), result text=\\(resultText)\")\n    exit(0)\n}\n\nprint(\"Command output: \\(chainedCommandResult!)\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuolapeikko%2Ftaskutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuolapeikko%2Ftaskutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuolapeikko%2Ftaskutils/lists"}