{"id":34640172,"url":"https://github.com/henvic/clino","last_synced_at":"2025-12-24T17:16:13.372Z","repository":{"id":49282799,"uuid":"250038975","full_name":"henvic/clino","owner":"henvic","description":"Package clino provides a simple way to create CLI (command-line interface) tools with multiple commands. 🐶🐕🐾🐾","archived":false,"fork":false,"pushed_at":"2021-06-20T22:17:45.000Z","size":34,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-15T14:21:15.802Z","etag":null,"topics":["cli","go","golang"],"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/henvic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"henvic"}},"created_at":"2020-03-25T16:59:17.000Z","updated_at":"2022-11-08T18:13:46.000Z","dependencies_parsed_at":"2022-09-05T09:41:33.286Z","dependency_job_id":null,"html_url":"https://github.com/henvic/clino","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/henvic/clino","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henvic%2Fclino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henvic%2Fclino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henvic%2Fclino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henvic%2Fclino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henvic","download_url":"https://codeload.github.com/henvic/clino/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henvic%2Fclino/sbom","scorecard":{"id":461698,"data":{"date":"2025-08-11","repo":{"name":"github.com/henvic/clino","commit":"2eeb24328949df43938669140d8dd776d8db2985"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 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":"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":"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":"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.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/henvic/clino/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/henvic/clino/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/henvic/clino/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/henvic/clino/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/henvic/clino/go.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/henvic/clino/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/henvic/clino/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/henvic/clino/lint.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction 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":["Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/go.yml:1","Warn: no topLevel permission defined: .github/workflows/lint.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.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md: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":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 4 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"}},{"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"}}]},"last_synced_at":"2025-08-19T11:17:41.714Z","repository_id":49282799,"created_at":"2025-08-19T11:17:41.714Z","updated_at":"2025-08-19T11:17:41.714Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28005414,"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-24T02:00:07.193Z","response_time":83,"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","go","golang"],"created_at":"2025-12-24T17:16:12.414Z","updated_at":"2025-12-24T17:16:13.366Z","avatar_url":"https://github.com/henvic.png","language":"Go","funding_links":["https://github.com/sponsors/henvic"],"categories":[],"sub_categories":[],"readme":"# clino\n[![Go Reference](https://pkg.go.dev/badge/github.com/henvic/clino.svg)](https://pkg.go.dev/github.com/henvic/clino) [![Build Status](https://github.com/henvic/clino/workflows/Tests/badge.svg)](https://github.com/henvic/clino/actions?query=workflow%3ATests) [![Coverage Status](https://coveralls.io/repos/henvic/clino/badge.svg)](https://coveralls.io/r/henvic/clino) [![Go Report Card](https://goreportcard.com/badge/github.com/henvic/clino)](https://goreportcard.com/report/github.com/henvic/clino)\n\nPackage clino provides a simple way to create CLI (command-line interface) tools.\n\nYou can create commands to use with this package by implementing its interfaces. It supports the Unix -flag style.\n\n[![asciicast](https://asciinema.org/a/313448.svg)](https://asciinema.org/a/313448)\n\n## Implementing commands\nWith clino, you implement a command by fulfilling interfaces instead of initializing command structs. The main advantage of this approach is that it is easier to test and to avoid globals.\n\nTip: Go interfaces are fulfilled implicit, so if you don't see a command being exposed or failing (for example), one of the first things you want to do is to check if your methods signatures fulfill clino's interfaces.\n\n### Command interface\nName (or usage line) for the command.\n\n```go\ntype Command interface {\n\tName() string\n}\n```\n\n### Shorter interface\nShorter description of a command to show in the \"help\" output on a list of commands.\n\n```go\ntype Shorter interface {\n\tShort() string\n}\n```\n\n### Runnable interface\nYou should implement this interface for any command that you want to run directly on the CLI.\n\n* It should receive a context and the command arguments, after parsing any flags.\n* A context is required as we want cancelation to be a first-class citizen.\n* You can rely on the context for canceling long tasks during tests.\n\n```go\ntype Runnable interface {\n\tRun(ctx context.Context, args ...string) error\n}\n```\n\n### FlagSet interface\nYou want to implement this interface to accept flags on your command.\n\n```go\ntype FlagSet interface {\n\tFlags(flags *flag.FlagSet)\n}\n```\n\n### PersistentFlagSet interface\nUse the following PersistentFlagSet to define flags for a command and its children.\n\n```go\ntype PersistentFlagSet interface {\n\tPersistentFlags(flags *flag.FlagSet)\n}\n```\n\n### Longer interface\nDescription or help message for your command.\nThe help command prints the returned value of the Long function as the \"help\" output of a command.\n\n```go\ntype Longer interface {\n\tLong() string\n}\n```\n\n### Footer interface\nFooter of a command shown in the \"help \u003ccommand\u003e\" output. It is useful for things like printing examples.\n\n```go\ntype Footer interface {\n\tFoot() string\n}\n```\n\n### Parent interface\nParent contains all subcommands of a given command. Your root command needs to implement it.\n```go\ntype Parent interface {\n\tCommands() []Command\n}\n```\n\n### Example code\nYou can see more examples in the example directory.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/henvic/clino\"\n)\n\nfunc main() {\n\tp := clino.Program{\n\t\tRoot: \u0026RootCommand{},\n\t}\n\tif err := p.Run(context.Background(), os.Args[1:]...); err != nil {\n\t\tfmt.Fprintf(os.Stderr, \"%+v\\n\", err)\n\t\tos.Exit(clino.ExitCode(err))\n\t}\n}\n\n// RootCommand is the entrypoint of the application.\ntype RootCommand struct {\n\tname string\n}\n\n// Name of the application.\nfunc (rc *RootCommand) Name() string {\n\treturn \"app\"\n}\n\n// Long description of the application.\nfunc (rc *RootCommand) Long() string {\n\treturn \"Example application.\"\n}\n\n// Flags of the command.\nfunc (rc *RootCommand) Flags(flags *flag.FlagSet) {\n\tflags.StringVar(\u0026rc.name, \"name\", \"World\", \"your name\")\n}\n\n// Run command.\nfunc (rc *RootCommand) Run(ctx context.Context, args ...string) error {\n\tfmt.Printf(\"Hello, %s!\\n\", rc.name)\n\treturn nil\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenvic%2Fclino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenvic%2Fclino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenvic%2Fclino/lists"}