{"id":33898703,"url":"https://github.com/crqrdotcom/cmdr","last_synced_at":"2026-06-22T02:31:39.522Z","repository":{"id":140031307,"uuid":"353368939","full_name":"crqrdotcom/cmdr","owner":"crqrdotcom","description":"A simple module to parse CLI arguments, flags and options for Deno.","archived":false,"fork":false,"pushed_at":"2021-03-31T14:06:30.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T14:37:41.151Z","etag":null,"topics":["cli","cli-parser","command-line","command-line-parser","deno"],"latest_commit_sha":null,"homepage":"https://deno.land/x/cmdr","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/crqrdotcom.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":"CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2021-03-31T13:36:08.000Z","updated_at":"2021-04-27T00:42:50.000Z","dependencies_parsed_at":"2023-09-07T14:02:49.717Z","dependency_job_id":null,"html_url":"https://github.com/crqrdotcom/cmdr","commit_stats":null,"previous_names":["crqra/cmdr","jcrqr/cmdr","crqrdotcom/cmdr"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/crqrdotcom/cmdr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crqrdotcom%2Fcmdr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crqrdotcom%2Fcmdr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crqrdotcom%2Fcmdr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crqrdotcom%2Fcmdr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crqrdotcom","download_url":"https://codeload.github.com/crqrdotcom/cmdr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crqrdotcom%2Fcmdr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34632530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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","cli-parser","command-line","command-line-parser","deno"],"created_at":"2025-12-11T21:09:13.465Z","updated_at":"2026-06-22T02:31:39.499Z","avatar_url":"https://github.com/crqrdotcom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmdr\n\n\u003e A simple module to parse CLI arguments, flags and options for [Deno](https://deno.land).\n\n### Goals\n\n- Simple to use\n- Easy configuration\n- Arguments validation (*todo*)\n- Auto-generated manual (*todo*)\n\n***NOTE:** expect it to break before `1.0.0` release.*\n\n## Getting Started\n\n```typescript\nimport { cmdr } from \"https://deno.land/x/cmdr/mod.ts\";\n\ntype Options = { name: string; help: boolean };\n\nconst { usage, match } cmdr\u003cOptions\u003e(\"hello-world \u003cNAME\u003e -h, --help\");\n\nif (match.help) {\n  console.info(usage.string);\n  Deno.exit(0);\n}\n\nconsole.info(`Hello, ${match.name ? match.name : 'you there'}!`);\n```\n\n## Example\n\nCheck more exaples [here](/examples).\n\n```typescript\n// main.ts\n\nimport { cmdr } from \"https://deno.land/x/cmdr/mod.ts\";\n\nconst { usage, match } = cmdr\u003cOptions\u003e(\n  \"hello-world \u003cNAME\u003e... -q, --question=\u003cQUESTION\u003e -v, --version -h, --help\",\n)(Deno.args);\n\nif (match.help) {\n  console.info(usage.string);\n  Deno.exit(0)\n}\n\nif (match.version) {\n  console.log(\"Version: 0.0.0\");\n  Deno.exit(0);\n}\n\nif (match.name.length === 0) {\n  console.error(\"Please, specify at least one \u003cNAME\u003e\")\n  Deno.exit(1);\n}\n\nconst namesCombined = match.name.join(\", \").replace(\n  `, ${match.name[match.name.length - 1]}`,\n  ` and ${match.name[match.name.length - 1]}`,\n);\n\nconsole.log(`Hello, ${namesCombined}!`);\n\nif (match.question) {\n  console.log(`Here's a question: ${match.question}`)\n}\n```\n\n### Running the example\n\n```bash\n$ deno run ./main.ts -q \"what do you want for dinner?\" John Alice Joe\n# Hello, John, Alice and Joe!\n# Here's a question: what do you want for dinner?\n```\n\n### Compiling the example\n\n```bash\n$ deno compile --unstable --lite -o hello_world ./main.ts\n# ...\n$ ./hello_world -q \"what do you want for dinner?\" John Alice Joe\n# Hello, John, Alice and Joe!\n# Here's a question: what do you want for dinner?\n```\n\n## Contributing\n\nAll contributions are very welcome!\n\nIf you find any bug or have a feature request, please [open a new issue](https://github.com/crqra/cmdr/issues).\n\nFor code or documentation contributions, [fork this repository](https://github.com/crqra/cmdr/fork), do your thing, and submit a [Pull Request](https://github.com/crqra/cmdr/pulls).\n\n## License\n\nThis project is released under the [MIT License](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrqrdotcom%2Fcmdr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrqrdotcom%2Fcmdr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrqrdotcom%2Fcmdr/lists"}