{"id":13903108,"url":"https://github.com/hofstadter-io/hofmod-cli","last_synced_at":"2025-08-23T13:25:57.884Z","repository":{"id":59455722,"uuid":"247153314","full_name":"hofstadter-io/hofmod-cli","owner":"hofstadter-io","description":"Hofstadter generator for Golang CLIs","archived":false,"fork":false,"pushed_at":"2025-05-11T22:42:46.000Z","size":137,"stargazers_count":26,"open_issues_count":10,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-18T03:45:41.080Z","etag":null,"topics":["cli","code-generator","cue","cuelang","dsl","golang","hof","hof-lang"],"latest_commit_sha":null,"homepage":"https://github.com/hofstadter-io/hof","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hofstadter-io.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,"zenodo":null}},"created_at":"2020-03-13T20:08:38.000Z","updated_at":"2025-05-11T22:42:50.000Z","dependencies_parsed_at":"2024-01-14T04:40:13.288Z","dependency_job_id":"dd436f3c-e573-4e4c-b1c2-3e0b94f4ca83","html_url":"https://github.com/hofstadter-io/hofmod-cli","commit_stats":{"total_commits":116,"total_committers":3,"mean_commits":"38.666666666666664","dds":"0.12068965517241381","last_synced_commit":"1e6fe23d1cdd11c2c8ed4016a4bc49c73a965bfc"},"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/hofstadter-io/hofmod-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hofstadter-io%2Fhofmod-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hofstadter-io%2Fhofmod-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hofstadter-io%2Fhofmod-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hofstadter-io%2Fhofmod-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hofstadter-io","download_url":"https://codeload.github.com/hofstadter-io/hofmod-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hofstadter-io%2Fhofmod-cli/sbom","scorecard":{"id":467424,"data":{"date":"2025-08-11","repo":{"name":"github.com/hofstadter-io/hofmod-cli","commit":"827b869d05908725d450fb4a97affcf10312a10a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"internal error: internal error: invalid Dockerfile","details":null,"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":-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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" 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":"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"}}]},"last_synced_at":"2025-08-19T12:53:36.167Z","repository_id":59455722,"created_at":"2025-08-19T12:53:36.167Z","updated_at":"2025-08-19T12:53:36.167Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271749048,"owners_count":24814115,"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-08-23T02:00:09.327Z","response_time":69,"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","code-generator","cue","cuelang","dsl","golang","hof","hof-lang"],"created_at":"2024-08-06T22:01:37.422Z","updated_at":"2025-08-23T13:25:57.838Z","avatar_url":"https://github.com/hofstadter-io.png","language":"Go","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# hofmod-cli\n\nA [hof](https://github.com/hofstadter-io/hof) generator for creating advanced Golang CLIs.\n\nDesign your CLI structure, arguments, flags, and a whole host of addons\nand then generate the implementation. Changed your mind about what your\nCLI should look like? Redesign, regenerate, and keep adding you custom code.\n\n### Features:\n\n- Quickly architect your CLI commands, arguments, flags, configuration\n- Built on the fantastic [spf13/cobra](https://github.com/ andspf13/cobra)library for Golang CLIs\n- Cross-platform builds and releases using GoReleaser, GitHub, and Docker\n- Supports config files in local project falling back to OS specific application dir\n- Your CLI will self check for updates and can self install with a user command\n- Shell auto completion for bash, fish, zsh, and power shell\n- Advanced help system with support for custom overviews, extra topics, and examples\n- Telemetry systems which can hook up to Google Analytics\n- Golang pprof and many other ENV VARs to control inner behavior\n\n### Sites to see:\n\n- [Schema](./schema) - the design spec your write a CLI in\n- [Generator](./gen) - [hof](https://github.com/hofstadter-io/hof) generator definition you invoke\n- [Templates](./templates) and [partials](./partials) - files which implement the code\n- [Example](https://github.com/hofstadter-io/hof) - the [hof](https://github.com/hofstadter-io/hof) tool leverages and powers this, see the `hof.cue` and `design` directory for relevant files\n\n### Usage\n\nYou'll need the [hof](https://github.com/hofstadter-io/hof) tool installed.\nYou can download `hof` from [the releases page](https://github.com/hofstadter-io/hof/releases).\n\nLet's start a new project:\n\n```\n# Start a project\nhof init github.com/verdverm/my-cli\ncd my-cli\n```\n\nAdd the following to the `cue.mods` file (same format as `go.mod`)\n\n```\nmodule github.com/verdverm/my-cli\n\ncue master\n\nrequire (\n    github.com/hofstadter-io/hofmod-cli v0.7.0\n)\n```\n\nTo fetch the module, run:\n\n```\nhof mod vendor cue\n\n# and after the next file, run\nhof gen\n```\n\nCreate a file named `cli.cue` and add the following content:\n\n```\npackage cli\n\nimport (\n\t\"github.com/hofstadter-io/hofmod-cli/schema\"\n\n\t\"github.com/hofstadter-io/hof/design/cli/cmds\"\n)\n\n# Typically we put the cli under a nested directory\n#Outdir: \"./cmd/hof\"\n\n#CLI: schema.#Cli \u0026 {\n    # Name and package path (matches outdir)\n\tName:    \"hof\"\n\tPackage: \"github.com/hofstadter-io/hof/cmd/hof\"\n\n    # Usage and help\n\tUsage:      \"hof\"\n\tShort:      \"Polyglot Development Tool and Framework\"\n\tLong:       Short\n\tCustomHelp: #RootCustomHelp\n\n    # Print the help when no subcommands are supplied\n\tOmitRun: true\n\n    # Command stage hooks\n\tPersistentPrerun:     true\n    # You can write code here or...\n\tPersistentPrerunBody: \"runtime.Init()\"\n \n\tPersistentPostrun: true\n    # ...or add custom code right in the output\n\n    # Persistent flags work for all subcommands too\n    Pflags: [{\n\t\tName:    \"labels\"\n\t\tLong:    \"label\"\n\t\tShort:   \"l\"\n\t\tType:    \"[]string\"\n\t\tDefault: \"nil\"\n\t\tHelp:    \"Labels for use across all commands\"\n\t}, {\n\t\tName:    \"config\"\n\t\tLong:    \"config\"\n\t\tShort:   \"\"\n\t\tType:    \"string\"\n\t\tDefault: \"\"\n\t\tHelp:    \"Path to a hof configuration file\"\n\t}, ...]\n\n    # Subcommands and nested down as far as you need\n\tCommands: [\n\n\t]\n\n\t//\n\t// Addons\n\t//\n\tReleases: #CliReleases\n\tUpdates:  true\n\n    ...\n}\n```\n\n(this was adapted from the [hof](https://github.com/hofstadter-io/hof t) tool)\n\nNow run `hof gen` to generate your code.\nTry adding implementation, and then build:\n\n```\ngo build -o my-cli cmd/my-cli/main.go\n\n./my-cli\n```\n\nUpdate your designs, rerun `hof gen`, rebuild\nand keep iterating away!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhofstadter-io%2Fhofmod-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhofstadter-io%2Fhofmod-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhofstadter-io%2Fhofmod-cli/lists"}