{"id":25951453,"url":"https://github.com/gqgs/argsgen","last_synced_at":"2026-02-15T18:32:56.329Z","repository":{"id":135671083,"uuid":"369390800","full_name":"gqgs/argsgen","owner":"gqgs","description":"CLI argument parser code generator","archived":false,"fork":false,"pushed_at":"2025-02-23T16:33:34.000Z","size":55,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T06:37:48.118Z","etag":null,"topics":["argparse","cli","flag","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gqgs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-21T02:22:51.000Z","updated_at":"2025-02-23T16:33:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f1e0e88-9e1b-48a6-80d8-1e4dd3c3489c","html_url":"https://github.com/gqgs/argsgen","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/gqgs/argsgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gqgs%2Fargsgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gqgs%2Fargsgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gqgs%2Fargsgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gqgs%2Fargsgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gqgs","download_url":"https://codeload.github.com/gqgs/argsgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gqgs%2Fargsgen/sbom","scorecard":{"id":442819,"data":{"date":"2025-08-11","repo":{"name":"github.com/gqgs/argsgen","commit":"b7954eeb2cee1ac08190af29c8c09d0bb1848349"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","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":"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":"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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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"}}]},"last_synced_at":"2025-08-19T05:56:29.559Z","repository_id":135671083,"created_at":"2025-08-19T05:56:29.570Z","updated_at":"2025-08-19T05:56:29.570Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29486527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T15:33:17.885Z","status":"ssl_error","status_checked_at":"2026-02-15T15:32:53.698Z","response_time":118,"last_error":"SSL_read: 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":["argparse","cli","flag","golang"],"created_at":"2025-03-04T13:48:09.685Z","updated_at":"2026-02-15T18:32:56.313Z","avatar_url":"https://github.com/gqgs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# argsgen\nCLI argument parser code generator\n\n\n#### Usage:\n\n```bash\ngo get -tool github.com/gqgs/argsgen/v2@latest\n```\n\n\n```go\npackage options\n\n//go:generate go tool argsgen\n\ntype options struct {\n\ti, input     string  `arg:\"input filename,positional\"`\n\to, output    string  `arg:\"output filename,positional\"`\n\tdb, database string  `arg:\"database name\"`\n\tfolder       string  `arg:\"target folder,required\"`\n\tparallel     uint    `arg:\"number of process in parallel\"`\n\tlimit        int     `arg:\"limit of something,required\"`\n\treal         float64 `arg:\"float of something\"`\n\tprofile      bool    `arg:\"should it profile?\"`\n}\n\n```\n\n:point_down:\n\n```go\n// Code generated by argsgen.\n// DO NOT EDIT!\npackage options\n\nimport (\n\t\"errors\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc (o *options) flagSet() *flag.FlagSet {\n\tflagSet := flag.NewFlagSet(os.Args[0], flag.ExitOnError)\n\tflagSet.StringVar(\u0026o.i, \"i\", o.i, \"input filename\")\n\tflagSet.StringVar(\u0026o.i, \"input\", o.i, \"input filename\")\n\tflagSet.StringVar(\u0026o.o, \"o\", o.o, \"output filename\")\n\tflagSet.StringVar(\u0026o.o, \"output\", o.o, \"output filename\")\n\tflagSet.StringVar(\u0026o.db, \"db\", o.db, \"database name\")\n\tflagSet.StringVar(\u0026o.db, \"database\", o.db, \"database name\")\n\tflagSet.StringVar(\u0026o.folder, \"folder\", o.folder, \"target folder\")\n\tflagSet.UintVar(\u0026o.parallel, \"parallel\", o.parallel, \"number of process in parallel\")\n\tflagSet.IntVar(\u0026o.limit, \"limit\", o.limit, \"limit of something\")\n\tflagSet.Float64Var(\u0026o.real, \"real\", o.real, \"float of something\")\n\tflagSet.BoolVar(\u0026o.profile, \"profile\", o.profile, \"should it profile?\")\n\treturn flagSet\n}\n\n// Parse parses the arguments in os.Args\nfunc (o *options) Parse() error {\n\tflagSet := o.flagSet()\n\tvar positional []string\n\targs := os.Args[1:]\n\tfor len(args) \u003e 0 {\n\t\tif err := flagSet.Parse(args); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif remaining := flagSet.NArg(); remaining \u003e 0 {\n\t\t\tposIndex := len(args) - remaining\n\t\t\tpositional = append(positional, args[posIndex])\n\t\t\targs = args[posIndex+1:]\n\t\t\tcontinue\n\t\t}\n\t\tbreak\n\t}\n\n\to.database = o.db\n\to.input = o.i\n\to.output = o.o\n\tif len(positional) == 0 {\n\t\tif o.folder == \"\" {\n\t\t\treturn errors.New(\"argument 'folder' is required\")\n\t\t}\n\t\tif o.limit == 0 {\n\t\t\treturn errors.New(\"argument 'limit' is required\")\n\t\t}\n\t\treturn nil\n\t}\n\tif len(positional) \u003e 0 {\n\t\to.i = positional[0]\n\t}\n\tif len(positional) \u003e 0 {\n\t\to.input = positional[0]\n\t}\n\tif len(positional) \u003e 1 {\n\t\to.o = positional[1]\n\t}\n\tif len(positional) \u003e 1 {\n\t\to.output = positional[1]\n\t}\n\tif o.folder == \"\" {\n\t\treturn errors.New(\"argument 'folder' is required\")\n\t}\n\tif o.limit == 0 {\n\t\treturn errors.New(\"argument 'limit' is required\")\n\t}\n\treturn nil\n}\n\n// MustParse parses the arguments in os.Args or exists on error\nfunc (o *options) MustParse() {\n\tif err := o.Parse(); err != nil {\n\t\to.flagSet().PrintDefaults()\n\t\tfmt.Fprintln(os.Stderr)\n\t\tfmt.Fprintln(os.Stderr, err)\n\t\tos.Exit(1)\n\t}\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgqgs%2Fargsgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgqgs%2Fargsgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgqgs%2Fargsgen/lists"}