{"id":19167508,"url":"https://github.com/tkdeng/gobash","last_synced_at":"2026-04-11T22:02:16.012Z","repository":{"id":253483748,"uuid":"843651748","full_name":"tkdeng/gobash","owner":"tkdeng","description":"Run linux bash commands in Go.","archived":false,"fork":false,"pushed_at":"2024-08-29T20:56:51.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-03T22:51:42.931Z","etag":null,"topics":["bash","go","golang","linux"],"latest_commit_sha":null,"homepage":"","language":"Go","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/tkdeng.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-17T02:40:07.000Z","updated_at":"2024-08-29T20:56:54.000Z","dependencies_parsed_at":"2025-01-03T23:03:53.288Z","dependency_job_id":null,"html_url":"https://github.com/tkdeng/gobash","commit_stats":null,"previous_names":["tkdeng/gobash"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdeng%2Fgobash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdeng%2Fgobash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdeng%2Fgobash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkdeng%2Fgobash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkdeng","download_url":"https://codeload.github.com/tkdeng/gobash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240247491,"owners_count":19771314,"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","go","golang","linux"],"created_at":"2024-11-09T09:37:56.778Z","updated_at":"2026-04-11T22:02:10.989Z","avatar_url":"https://github.com/tkdeng.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Bash\n\n[\u003cimg src=\"./assets/icon.png\" alt=\"icon\" height=\"100\"/\u003e](./assets/icon.png)\n\nRun linux bash commands in Go.\n\n## Installation\n\n```shell script\ngo get github.com/tkdeng/gobash\n```\n\n## Usage\n\n```go\nimport (\n  \"github.com/tkdeng/gobash\"\n)\n\nfunc main(){\n  // run bash command\n  out, err := bash.Run([]string{`echo`, `test`}, \"/pwd\", []string{\"ENV=var\"})\n\n  // run from default directory and no environment vars\n  out, err := bash.Run([]string{`echo`, `test`}, \"\", nil)\n\n  // run raw `bash -c` command\n  bash.RunRaw(`echo \"test\"`, \"\", nil)\n\n  // run command as specified user\n  bash.RunUser(`echo \"root test\"`, \"sudo\", \"\", nil)\n  bash.RunUser(`echo \"user test\"`, \"user\", \"\", nil)\n\n  // pipe multiple commands `echo \"test\" | tee -a \"./test.txt\"`\n  bash.Pipe(\".\", []string{\"echo\", \"test\"}, []string{\"tee\", \"-a\", \"./test.txt\"})\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkdeng%2Fgobash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkdeng%2Fgobash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkdeng%2Fgobash/lists"}