{"id":22134257,"url":"https://github.com/ivoputzer/cli-args-parser-kata","last_synced_at":"2025-04-10T11:07:04.986Z","repository":{"id":151992940,"uuid":"125184576","full_name":"ivoputzer/cli-args-parser-kata","owner":"ivoputzer","description":"the goal of this kata is to learn to work incrementally by implementing a cli arguments parser.","archived":false,"fork":false,"pushed_at":"2020-07-18T08:26:54.000Z","size":8,"stargazers_count":5,"open_issues_count":1,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T09:47:41.990Z","etag":null,"topics":["bdd","incremental","kata","learning","study","tdd","testing"],"latest_commit_sha":null,"homepage":"","language":null,"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/ivoputzer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2018-03-14T09:04:01.000Z","updated_at":"2023-09-07T07:51:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d1d32ee-a514-4320-8284-cf4ec5d20222","html_url":"https://github.com/ivoputzer/cli-args-parser-kata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcli-args-parser-kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcli-args-parser-kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcli-args-parser-kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoputzer%2Fcli-args-parser-kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivoputzer","download_url":"https://codeload.github.com/ivoputzer/cli-args-parser-kata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208017,"owners_count":21065198,"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":["bdd","incremental","kata","learning","study","tdd","testing"],"created_at":"2024-12-01T19:10:16.588Z","updated_at":"2025-04-10T11:07:04.951Z","avatar_url":"https://github.com/ivoputzer.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"cli-args-parser-kata\n===\nThe following is a TDD Kata: an exercise in coding, refactoring and test-first.\n\nThe goal of this program is to model a cli arguments parser. Given a series of input the program should produce a valid output according to the following specification.\n\n## Before you start\n- Try not to read ahead, do one task at a time (the trick is to learn to work incrementally)!\n- Make sure you only test for correct inputs;\n- You may use whatever programming language you prefer;\n- You should commit your code on GitHub or any other SCM repository you prefer;\n- You should release your work under an OSI-approved open-source license of your choice;\n- Remember to send a PR once you're done with the kata 😉\n\n## Specification\nChoose one of the following input formats:\n- string like arguments `\"--foo bar\"`\n- array like arguments `[\"--foo\", \"bar\"]`\n\n### 1. parse a `simple` flags\n  given the following input:\n  ```sh\n  --foo\n  ```\n  the program should produce either a dictionary or a JSON object as follows:\n  ```JSON\n  {\"foo\": true}\n  ```\n\n### 2. parse a `composite` flags\n  given the following input:\n  ```sh\n  --foo bar\n  ```\n  the program should produce either a dictionary or a JSON object as follows:\n  ```JSON\n  {\"foo\": \"bar\"}\n  ```\n\n### 3. parse a `composite` flags with integer values\n  given the following input:\n  ```sh\n  --number 1\n  ```\n  the program should produce either a dictionary or a JSON object as follows:\n  ```JSON\n  {\"number\": 1}\n  ```\n\n### 4. parse multiple flags at once\n  given the following input:\n  ```sh\n  --foo --bar baz --number 1\n  ```\n  the program should produce either a dictionary or a JSON object as follows:\n  ```JSON\n  {\"bar\": \"baz\", \"foo\": true, \"number\": 1}\n  ```\n\n### 5. try to support both `string` and `array` input formats\nwithin the same function or a new function one of your choice.\n\n\n### Submitted solutions\n- [simcogno/cli-args-parser-kata](https://github.com/simcogno/cli-args-parser-kata)\n- [christian-fei/cli-args-parser-kata v1](https://github.com/christian-fei/cli-args-parser-kata/tree/v1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivoputzer%2Fcli-args-parser-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivoputzer%2Fcli-args-parser-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivoputzer%2Fcli-args-parser-kata/lists"}