{"id":25647102,"url":"https://github.com/bombshell-dev/args","last_synced_at":"2025-04-13T00:44:23.913Z","repository":{"id":65692257,"uuid":"597500300","full_name":"bombshell-dev/args","owner":"bombshell-dev","description":"\u003c1kB CLI flag parser","archived":false,"fork":false,"pushed_at":"2025-03-31T22:50:31.000Z","size":99,"stargazers_count":121,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-13T00:44:16.369Z","etag":null,"topics":["args","args-parser","cli","command-line","command-line-parser","node"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/bombshell-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-02-04T18:36:07.000Z","updated_at":"2025-04-05T09:34:00.000Z","dependencies_parsed_at":"2025-03-19T13:38:43.304Z","dependency_job_id":null,"html_url":"https://github.com/bombshell-dev/args","commit_stats":null,"previous_names":["bombshell-dev/args","bombshell-dev/ultraflag"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombshell-dev%2Fargs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombshell-dev%2Fargs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombshell-dev%2Fargs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bombshell-dev%2Fargs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bombshell-dev","download_url":"https://codeload.github.com/bombshell-dev/args/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650419,"owners_count":21139672,"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","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":["args","args-parser","cli","command-line","command-line-parser","node"],"created_at":"2025-02-23T11:03:13.535Z","updated_at":"2025-04-13T00:44:23.893Z","avatar_url":"https://github.com/bombshell-dev.png","language":"TypeScript","readme":"# `@bomb.sh/args`\n\nA \u003c1kB library for parsing CLI flags. Inspired by Deno's `std/cli` [`parseArgs`](https://github.com/denoland/std/blob/main/cli/parse_args.ts) module.\n\n### Features\n\n🤏 very small\n\n🍃 very simple\n\n🏃 very fast (beats [`node:util`](https://nodejs.org/api/util.html#utilparseargsconfig))\n\n🔏 strongly typed\n\n### Usage\n\nBasic usage does not require any configuration.\n\n```js\nimport { parse } from \"@bomb.sh/args\";\n\n// my-cli build --bundle -rf --a value --b=value --c 1\nconst argv = process.argv.slice(2);\nconst args = parse(argv);\n\nconsole.log(args);\n// { _: ['build'], bundle: true, r: true, f: true, a: \"value\", b: \"value\", c: 1 }\n```\n\nParsing can be configured to ensure arguments are coerced to specific types, which enhances type safety.\n\n```js\nconst args = parse(argv, {\n  default: { a: 1, b: 2, c: \"value\" },\n  alias: { h: \"help\" },\n  boolean: [\"foo\", \"bar\"],\n  string: [\"baz\", \"qux\"],\n  array: [\"input\"],\n});\n```\n\n## Benchmarks\n\n```\nmri               x 1,650,986 ops/sec ±0.32% (97 runs sampled)\n@bomb.sh/args     x 1,407,191 ops/sec ±0.38% (99 runs sampled)\nminimist          x 383,506 ops/sec ±0.28% (99 runs sampled)\nnode:util         x 320,953 ops/sec ±0.35% (98 runs sampled)\nyargs-parser      x 31,874 ops/sec ±1.32% (92 runs sampled)\n```\n\n## Acknowledgements\n\nThis package was previously published as `ultraflag` up until `v0.3.0`, when it was renamed to `@bomb.sh/args`.\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbombshell-dev%2Fargs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbombshell-dev%2Fargs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbombshell-dev%2Fargs/lists"}