{"id":36687691,"url":"https://github.com/goark/gocli","last_synced_at":"2026-01-12T11:16:16.217Z","repository":{"id":46982009,"uuid":"48487232","full_name":"goark/gocli","owner":"goark","description":"Minimal Packages for Command-Line Interface","archived":false,"fork":false,"pushed_at":"2023-03-27T11:42:01.000Z","size":87,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T09:57:20.571Z","etag":null,"topics":["cc0","go","golang","golang-package"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goark.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":"2015-12-23T11:31:18.000Z","updated_at":"2024-07-20T13:00:30.000Z","dependencies_parsed_at":"2024-06-19T04:01:12.362Z","dependency_job_id":"781cea81-96c0-4d52-91b9-ce48817951c1","html_url":"https://github.com/goark/gocli","commit_stats":null,"previous_names":["spiegel-im-spiegel/gocli"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/goark/gocli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Fgocli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Fgocli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Fgocli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Fgocli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goark","download_url":"https://codeload.github.com/goark/gocli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goark%2Fgocli/sbom","scorecard":{"id":432794,"data":{"date":"2025-08-11","repo":{"name":"github.com/goark/gocli","commit":"ed03c2e3f52d77308b866dfa454c4541848a84d3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","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":"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":"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/codeql-analysis.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/vulns.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/vulns.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/vulns.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/vulns.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/vulns.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/goark/gocli/vulns.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/lint.yml:49","Warn: goCommand not pinned by hash: .github/workflows/vulns.yml:18","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   2 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:27","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/lint.yml:9","Warn: no topLevel permission defined: .github/workflows/vulns.yml:1","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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Creative Commons Zero v1.0 Universal: 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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"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":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","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-19T03:46:03.873Z","repository_id":46982009,"created_at":"2025-08-19T03:46:03.874Z","updated_at":"2025-08-19T03:46:03.874Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cc0","go","golang","golang-package"],"created_at":"2026-01-12T11:16:16.152Z","updated_at":"2026-01-12T11:16:16.211Z","avatar_url":"https://github.com/goark.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [gocli] - Minimal Packages for Command-Line Interface\n\n[![check vulns](https://github.com/goark/gocli/workflows/vulns/badge.svg)](https://github.com/goark/gocli/actions)\n[![lint status](https://github.com/goark/gocli/workflows/lint/badge.svg)](https://github.com/goark/gocli/actions)\n[![GitHub license](https://img.shields.io/badge/license-CC0-blue.svg)](https://raw.githubusercontent.com/goark/gocli/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/goark/gocli.svg)](https://github.com/goark/gocli/releases/latest)\n\nThis package is required Go 1.16 or later.\n\n**Migrated repository to [github.com/goark/gocli][gocli]**\n\n## Declare [gocli] module\n\nSee [go.mod](https://github.com/goark/gocli/blob/master/go.mod) file. \n\n## Usage of [gocli] package\n\n```go\npackage main\n\nimport (\n    \"os\"\n\n    \"github.com/goark/gocli/exitcode\"\n    \"github.com/goark/gocli/rwi\"\n)\n\nfunc run(ui *rwi.RWI) exitcode.ExitCode {\n    ui.Outputln(\"Hello world\")\n    return exitcode.Normal\n}\n\nfunc main() {\n    run(rwi.New(\n        rwi.WithReader(os.Stdin),\n        rwi.WithWriter(os.Stdout),\n        rwi.WithErrorWriter(os.Stderr),\n    )).Exit()\n}\n```\n\n### Handling SIGNAL with [Context] Package\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"os\"\n    \"time\"\n\n    \"github.com/goark/gocli/signal\"\n)\n\nfunc ticker(ctx context.Context) error {\n    t := time.NewTicker(1 * time.Second) // 1 second cycle\n    defer t.Stop()\n\n    for {\n        select {\n        case now := \u003c-t.C: // ticker event\n            fmt.Println(now.Format(time.RFC3339))\n        case \u003c-ctx.Done(): // cancel event from context\n            fmt.Println(\"Stop ticker\")\n            return ctx.Err()\n        }\n    }\n}\n\nfunc Run() error {\n    errCh := make(chan error, 1)\n    defer close(errCh)\n\n    go func() {\n        child, cancelChild := context.WithTimeout(\n            signal.Context(context.Background(), os.Interrupt), // cancel event by SIGNAL\n            10*time.Second, // timeout after 10 seconds\n        )\n        defer cancelChild()\n        errCh \u003c- ticker(child)\n    }()\n\n    err := \u003c-errCh\n    fmt.Println(\"Done\")\n    return err\n}\n\nfunc main() {\n    if err := Run(); err != nil {\n        fmt.Fprintln(os.Stderr, err)\n        return\n    }\n}\n```\n\n### Search Files and Directories (w/ Wildcard)\n\n```go\nimport (\n    \"fmt\"\n\n    \"github.com/goark/gocli/file\"\n)\n\nresult := file.Glob(\"**/*.[ch]\", file.NewGlobOption())\nfmt.Println(result)\n// Output:\n// [testdata/include/source.h testdata/source.c]\n```\n\n### Configuration file and directory\n\nSupport `$XDG_CONFIG_HOME` environment value (XDG Base Directory)\n\n```go\nimport (\n    \"fmt\"\n\n    \"github.com/goark/gocli/config\"\n)\n\npath := config.Path(\"app\", \"config.json\")\nfmt.Println(path)\n// Output:\n// /home/username/.config/app/config.json\n```\n\n### User cache file and directory\n\nSupport `$XDG_CACHE_HOME` environment value (XDG Base Directory)\n\n```go\nimport (\n    \"fmt\"\n\n    \"github.com/goark/gocli/cache\"\n)\n\npath := cache.Path(\"app\", \"access.log\")\nfmt.Println(path)\n// Output:\n// /home/username/.cache/app/access.log\n```\n\n[gocli]: https://github.com/goark/gocli \"goark/gocli: Make Link with Markdown Format\"\n[dep]: https://github.com/golang/dep \"golang/dep: Go dependency management tool\"\n[Context]: https://golang.org/pkg/context/ \"context - The Go Programming Language\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoark%2Fgocli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoark%2Fgocli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoark%2Fgocli/lists"}