{"id":37138898,"url":"https://github.com/coder/cli","last_synced_at":"2026-01-14T16:00:57.252Z","repository":{"id":53711127,"uuid":"183693529","full_name":"coder/cli","owner":"coder","description":"A minimal Go CLI package.","archived":true,"fork":false,"pushed_at":"2021-03-18T20:26:57.000Z","size":44,"stargazers_count":50,"open_issues_count":2,"forks_count":9,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-12-26T12:55:10.535Z","etag":null,"topics":[],"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/coder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-26T21:00:03.000Z","updated_at":"2025-03-03T05:37:28.000Z","dependencies_parsed_at":"2022-09-13T08:31:33.014Z","dependency_job_id":null,"html_url":"https://github.com/coder/cli","commit_stats":null,"previous_names":["cdr/cli"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/coder/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coder","download_url":"https://codeload.github.com/coder/cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coder%2Fcli/sbom","scorecard":{"id":269917,"data":{"date":"2025-08-11","repo":{"name":"github.com/coder/cli","commit":"2508939ceebffc08b7a190006942632ef28f3d70"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":5,"reason":"Found 8/15 approved changesets -- score normalized to 5","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"project is archived","details":["Warn: Repository is archived."],"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: .sail/Dockerfile:1: pin your Docker image by updating codercom/ubuntu-dev-go to codercom/ubuntu-dev-go@sha256:36afe0c005fcb1099db3f8e3d7c9ff4e25aff0b36526203866f915fb52603e9d","Info:   0 out of   1 containerImage 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":"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/coder/.github/SECURITY.md:1","Info: Found linked content: github.com/coder/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/coder/.github/SECURITY.md:1","Info: Found text in security policy: github.com/coder/.github/SECURITY.md:1"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 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-17T13:05:59.174Z","repository_id":53711127,"created_at":"2025-08-17T13:05:59.174Z","updated_at":"2025-08-17T13:05:59.174Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2026-01-14T16:00:56.281Z","updated_at":"2026-01-14T16:00:57.102Z","avatar_url":"https://github.com/coder.png","language":"Go","readme":"# cli\n\nA minimal, command-oriented CLI package.\n\n[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/go.coder.com/cli)\n\n## Features\n\n- Very small, simple API.\n- Support for POSIX flags.\n- Only external dependency is [spf13/pflag](https://github.com/spf13/pflag).\n- Subcommands and subcommand aliases.\n- Auto-generated help.\n\n## Install\n\n```bash\ngo get -u go.coder.com/cli\n```\n\n## Examples\n\nSee `examples/` for more.\n\n### Simple CLI\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/spf13/pflag\"\n    \"go.coder.com/cli\"\n)\n\ntype cmd struct {\n    verbose bool\n}\n\nfunc (c *cmd) Run(fl *pflag.FlagSet) {\n    if c.verbose {\n        fmt.Println(\"verbose enabled\")\n    }\n    fmt.Println(\"we run\")\n}\n\nfunc (c *cmd) Spec() cli.CommandSpec {\n    return cli.CommandSpec{\n        Name:  \"simple-example\",\n        Usage: \"[flags]\",\n        Desc:  `This is a simple example of the cli package.`,\n    }\n}\n\nfunc (c *cmd) RegisterFlags(fl *pflag.FlagSet) {\n    fl.BoolVar(\u0026c.verbose, \"v\", false, \"sets verbose mode\")\n}\n\nfunc main() {\n    cli.RunRoot(\u0026cmd{})\n}\n\n```\nrenders a help like\n\n```\nUsage: simple-example [flags]\n\nThis is a simple example of the cli package.\n\nsimple-example flags:\n\t-v\tsets verbose mode\t(false)\n```\n\n### Subcommands\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/spf13/pflag\"\n    \"go.coder.com/cli\"\n)\n\ntype subcmd struct {\n}\n\nfunc (c *subcmd) Run(fl *pflag.FlagSet) {\n    fmt.Println(\"subcommand invoked\")\n}\n\nfunc (c *subcmd) Spec() cli.CommandSpec {\n    return cli.CommandSpec{\n        Name:  \"sub\",\n        Usage: \"\",\n        Aliases: []string{\"s\"},\n        Desc:  `This is a simple subcommand.`,\n    }\n}\n\ntype cmd struct {\n}\n\nfunc (c *cmd) Run(fl *pflag.FlagSet) {\n    // This root command has no default action, so print the help.\n    fl.Usage()\n}\n\nfunc (c *cmd) Spec() cli.CommandSpec {\n    return cli.CommandSpec{\n        Name:  \"subcommand\",\n        Usage: \"[flags]\",\n        Desc:  `This is a simple example of subcommands.`,\n    }\n}\n\nfunc (c *cmd) Subcommands() []cli.Command {\n    return []cli.Command{\n        \u0026subcmd{},\n    }\n}\n\nfunc main() {\n    cli.RunRoot(\u0026cmd{})\n}\n```\n\nrenders a help like\n\n```\nUsage: subcommand [flags]\n\nThis is a simple example of subcommands.\n\nCommands:\n\ts, sub  - This is a simple subcommand.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoder%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoder%2Fcli/lists"}