{"id":13547235,"url":"https://github.com/commander-cli/cmd","last_synced_at":"2026-01-12T00:39:19.818Z","repository":{"id":41504250,"uuid":"211324301","full_name":"commander-cli/cmd","owner":"commander-cli","description":"A simple package to execute shell commands on linux, windows and osx","archived":false,"fork":false,"pushed_at":"2025-02-14T03:45:47.000Z","size":255,"stargazers_count":160,"open_issues_count":1,"forks_count":22,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-12-15T18:47:04.805Z","etag":null,"topics":["cmd","golang","linux","osx","shell","terminal","unix","windows"],"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/commander-cli.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":"2019-09-27T13:22:06.000Z","updated_at":"2025-11-14T23:51:09.000Z","dependencies_parsed_at":"2024-06-18T15:29:12.061Z","dependency_job_id":null,"html_url":"https://github.com/commander-cli/cmd","commit_stats":null,"previous_names":["simonbaeumer/cmd"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/commander-cli/cmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commander-cli%2Fcmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commander-cli%2Fcmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commander-cli%2Fcmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commander-cli%2Fcmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commander-cli","download_url":"https://codeload.github.com/commander-cli/cmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commander-cli%2Fcmd/sbom","scorecard":{"id":300781,"data":{"date":"2025-08-11","repo":{"name":"github.com/commander-cli/cmd","commit":"04f01f616eca1b93c1b56fe97cfc97a5f348ce04"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Code-Review","score":1,"reason":"Found 2/19 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/lint.yaml:1","Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/validation.yaml:6","Info: topLevel 'pull-requests' permission set to 'read': .github/workflows/validation.yaml:7","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/commander-cli/cmd/lint.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/commander-cli/cmd/lint.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/commander-cli/cmd/test.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/commander-cli/cmd/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/commander-cli/cmd/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/commander-cli/cmd/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/validation.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/commander-cli/cmd/validation.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/validation.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/commander-cli/cmd/validation.yaml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/lint.yaml:16","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T20:34:37.774Z","repository_id":41504250,"created_at":"2025-08-17T20:34:37.774Z","updated_at":"2025-08-17T20:34:37.774Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27772609,"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","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","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":["cmd","golang","linux","osx","shell","terminal","unix","windows"],"created_at":"2024-08-01T12:00:52.783Z","updated_at":"2026-01-12T00:39:14.809Z","avatar_url":"https://github.com/commander-cli.png","language":"Go","readme":"[![CI](https://github.com/commander-cli/cmd/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/commander-cli/cmd/actions/workflows/ci.yml)\n[![GoDoc](https://godoc.org/github.com/commander-cli/cmd?status.svg)](https://godoc.org/github.com/commander-cli/cmd)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/31911138f62cea099c31/test_coverage)](https://codeclimate.com/github/commander-cli/cmd/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/af3487439a313d580619/maintainability)](https://codeclimate.com/github/commander-cli/cmd/maintainability)\n[![Go Report Card](https://goreportcard.com/badge/github.com/commander-cli/cmd)](https://goreportcard.com/report/github.com/commander-cli/cmd)\n\n# cmd package\n\nA simple package to execute shell commands on linux, darwin and windows.\n\n## Installation\n\nInstall the latest version with:\n\n```bash\n$ go get -u github.com/commander-cli/cmd\n```\n\nor an exact version:\n\n```bash\n$ go get -u github.com/commander-cli/cmd@v1.0.0\n```\n\n## Usage\n\n```go\nc := cmd.NewCommand(\"echo hello\")\n\nerr := c.Execute()\nif err != nil {\n    panic(err.Error())    \n}\n\nfmt.Println(c.Stdout())\nfmt.Println(c.Stderr())\n```\n\n### Configure the command\n\nTo configure the command an option function can be passed which receives the\ncommand object as an argument passed by reference.\n\nDefault option functions:\n\n```\ncmd.WithCustomBaseCommand(*exec.Cmd)\ncmd.WithStandardStreams\ncmd.WithCustomStdout(...io.Writers)\ncmd.WithCustomStderr(...io.Writers)\ncmd.WithTimeout(time.Duration)\ncmd.WithoutTimeout\ncmd.WithWorkingDir(string)\ncmd.WithEnvironmentVariables(cmd.EnvVars)\ncmd.WithInheritedEnvironment(cmd.EnvVars)\n```\n\nSee [godocs for details][].\n\n#### Example\n\n```go\nc := cmd.NewCommand(\"echo hello\", cmd.WithStandardStreams)\nc.Execute()\n```\n\n#### Set custom options\n\n```go\nsetWorkingDir := func (c *Command) {\n    c.WorkingDir = \"/tmp/test\"\n}\n\nc := cmd.NewCommand(\"pwd\", setWorkingDir)\nc.Execute()\n```\n\n## Contributing\n\nIf you would like to contribute please submit a pull request.\nFor bug fixes/minor changes a simple pull request will\nsuffice. If the change is large or you would like to have a feature\ndiscussion before implementation feel free to open an issue.\n\nIf you have a feature request or bug report please open an issue.\n\n### Development\n\nPlease fork the project and do your development there. Please use a\nmeaningful branch name as well as adhere to [commitlint rules][].\n\nIf you would like the precommit hooks run:\n\n```\nmake init\n```\n\nTo run the test suite:\n\n```\nmake test\n```\n\n*Reminder:* The goal of this project is to ensure we abstract the OS specific\ncommand execution as mush as possible. Ensure your change is compatible\nwith linux, windows and osx. If unable to test on every operating system\n(help needed for windows (:) the CI will take care of that for you.\n\n[commitlint rules]: https://www.conventionalcommits.org/en/v1.0.0/\n[godocs for details]: https://godoc.org/github.com/commander-cli/cmd\n\n","funding_links":[],"categories":["Go","Utilities","Utility"],"sub_categories":["Utility/Miscellaneous","Fail injection"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommander-cli%2Fcmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommander-cli%2Fcmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommander-cli%2Fcmd/lists"}