{"id":19390763,"url":"https://github.com/einstore/shellkit","last_synced_at":"2025-04-24T00:31:33.029Z","repository":{"id":63909227,"uuid":"196253142","full_name":"Einstore/ShellKit","owner":"Einstore","description":"Access local shell as well as remote over SSH","archived":true,"fork":false,"pushed_at":"2019-08-23T20:52:10.000Z","size":57,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-17T03:11:39.706Z","etag":null,"topics":["command-line","macos","nio","nio2","spm","ssh","swift","terminal","ubuntu"],"latest_commit_sha":null,"homepage":null,"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/Einstore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-10T18:05:14.000Z","updated_at":"2025-04-14T12:07:30.000Z","dependencies_parsed_at":"2022-11-29T07:07:14.793Z","dependency_job_id":null,"html_url":"https://github.com/Einstore/ShellKit","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einstore%2FShellKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einstore%2FShellKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einstore%2FShellKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einstore%2FShellKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Einstore","download_url":"https://codeload.github.com/Einstore/ShellKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250539431,"owners_count":21447307,"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":["command-line","macos","nio","nio2","spm","ssh","swift","terminal","ubuntu"],"created_at":"2024-11-10T10:23:10.410Z","updated_at":"2025-04-24T00:31:31.164Z","avatar_url":"https://github.com/Einstore.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShellKit\n\nAccess local shell as well as remote over SSH for Swift NIO applications\n\n### Install using SPM\n\n```swift\n.package(url: \"https://github.com/Einstore/ShellKit.git\", from: \"1.0.0\")\n```\n\n### Usage\n\n#### Connect to a local terminal\n\n```swift\nlet shell = try Shell(.local, on: eventLoop)\nlet futureResponse = shell.run(bash: \"ls -a\").map { output in\n   print(output)\n   return output\n}\n```\n\n#### Connect to a remote service\n\n```swift\nlet shell = try Shell(\n    .ssh(\n        host: \"1292.168.1.2\",\n        username: \"root\",\n        password: \"sup3rS3cr3t\"\n    ),\n    on: eventLoop\n)\nlet futureResponse = shell.run(bash: \"ls -a\")\n```\n\n\u003e Other means of SSH authentication are available!\n\n#### Example\n\n```swift\nlet eventLoop = EmbeddedEventLoop()\nlet shell = try Shell(.local, on: eventLoop)\nlet futureResponse = shell.run(bash: \"cd /tmp/ ; pwd\").map { output in\n   print(output)\n   return output\n}.flatMapError { error in\n   print(error)\n   return error.localizedDescription\n}\nlet out: String = try futureResponse.wait()\nprint(out)\n```\n\n### Using `CommandKit`\n\nAccess commands through\n\n**Example:**\n```swift\nshell.cmd.pwd().map { currentPath in\n   print(currentPath)\n}\n```\n\n\u003e Discover more commands under `shell.cmd` and `shell.cmd.install`\n\n### Author\n\nOndrej Rafaj @rafiki270\n\n### License\n\nMIT; Copyright 2019 - Einstore\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinstore%2Fshellkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feinstore%2Fshellkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinstore%2Fshellkit/lists"}