{"id":15690458,"url":"https://github.com/barbarbar338/bargs","last_synced_at":"2025-08-27T09:42:54.769Z","repository":{"id":74716816,"uuid":"313696991","full_name":"barbarbar338/bargs","owner":"barbarbar338","description":"✨ A simple argument parsing system","archived":false,"fork":false,"pushed_at":"2022-01-18T16:53:55.000Z","size":58,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T02:23:51.606Z","etag":null,"topics":["arg","args","argument","argument-parser","argument-parsing","arguments","argv","argv-parser","bargs","parse","parser","parsing","ts","typescript"],"latest_commit_sha":null,"homepage":"https://npmjs.com/bargs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barbarbar338.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},"funding":{"github":"barbarbar338"}},"created_at":"2020-11-17T17:42:51.000Z","updated_at":"2024-05-31T17:01:01.000Z","dependencies_parsed_at":"2023-12-13T17:15:15.443Z","dependency_job_id":null,"html_url":"https://github.com/barbarbar338/bargs","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"521d0858a4b61b1549281b5894d3a7887a3519f3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/barbarbar338/bargs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbarbar338%2Fbargs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbarbar338%2Fbargs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbarbar338%2Fbargs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbarbar338%2Fbargs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barbarbar338","download_url":"https://codeload.github.com/barbarbar338/bargs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barbarbar338%2Fbargs/sbom","scorecard":{"id":225641,"data":{"date":"2025-08-11","repo":{"name":"github.com/barbarbar338/bargs","commit":"521d0858a4b61b1549281b5894d3a7887a3519f3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.1,"checks":[{"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":"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":"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/6 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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: 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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":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":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55"],"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-17T03:45:12.144Z","repository_id":74716816,"created_at":"2025-08-17T03:45:12.144Z","updated_at":"2025-08-17T03:45:12.144Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272315617,"owners_count":24912611,"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-27T02:00:09.397Z","response_time":76,"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":["arg","args","argument","argument-parser","argument-parsing","arguments","argv","argv-parser","bargs","parse","parser","parsing","ts","typescript"],"created_at":"2024-10-03T18:09:52.741Z","updated_at":"2025-08-27T09:42:52.390Z","avatar_url":"https://github.com/barbarbar338.png","language":"TypeScript","funding_links":["https://github.com/sponsors/barbarbar338"],"categories":[],"sub_categories":[],"readme":"# 🦄 Bargs\r\n\r\n-   A simple argument parsing system with 0 dependencies ✨\r\n\r\n# 📥 Installation\r\n\r\nUsing yarn:\r\n\r\n```\r\n$ yarn add bargs\r\n```\r\n\r\nUsing npm:\r\n\r\n```\r\n$ npm install bargs\r\n```\r\n\r\n# 🔧 Usage\r\n\r\n```js\r\nbargs(OptionDefinitions, argv?);\r\n```\r\n\r\n-   `OptionDefinitions`: Where options are defined to be used when separating arguments. Structure:\r\n\r\n```js\r\n[\r\n    {\r\n        name: \"OptionName\",\r\n        type: String, //OptionType (function)\r\n        aliases?: [ \"option\", \"aliases\", \"t\" ],\r\n        default?: false\r\n    }\r\n]\r\n```\r\n\r\n-   `argv?`: Arguments to parse. Default is `process.argv.slice(2)`.\r\n\r\n# 🛠️ Example\r\n\r\n```js\r\n/* es6 */\r\nimport { bargs } from \"bargs\";\r\n\r\n/* commonJS */\r\nconst { bargs } = require(\"bargs\");\r\n\r\nconst definitions = [\r\n\t{ name: \"help\", type: Boolean, aliases: [\"h\", \"halp\", \"yardim\", \"y\"] },\r\n\t{ name: \"message\", type: String, default: true },\r\n\t{ name: \"page\", type: Number },\r\n];\r\n\r\nconst argv = [\"This\", \"is\", \"message\", \"-h\", \"--page\", \"2\", \"--foo\", \"bar\"];\r\n\r\nbargs(definitions, argv);\r\n/*\r\n * {\r\n *     _unknown: {\r\n *         foo: \"bar\"\r\n *     },\r\n *     help: true,\r\n *     message: \"This is message\",\r\n *     page: 2\r\n * }\r\n */\r\n```\r\n\r\n# 🔗 Contributing / Issues / Ideas\r\n\r\nFeel free to use GitHub's features ✨\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarbarbar338%2Fbargs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarbarbar338%2Fbargs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarbarbar338%2Fbargs/lists"}