{"id":18532622,"url":"https://github.com/ethan7g/gar","last_synced_at":"2025-07-05T04:34:42.787Z","repository":{"id":57244403,"uuid":"115830752","full_name":"ethan7g/gar","owner":"ethan7g","description":"Node arguments parser","archived":false,"fork":false,"pushed_at":"2019-01-04T07:23:58.000Z","size":7,"stargazers_count":33,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T07:56:59.256Z","etag":null,"topics":["args","argument","argument-parser","argument-parsing","arguments","argv","argv-parser","javascript","node","node-js","nodejs","npm","npm-package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ethan7g.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}},"created_at":"2017-12-30T23:22:22.000Z","updated_at":"2024-02-20T02:22:08.000Z","dependencies_parsed_at":"2022-09-01T06:11:53.539Z","dependency_job_id":null,"html_url":"https://github.com/ethan7g/gar","commit_stats":null,"previous_names":["ethan7g/gar","ethanent/gar"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethan7g%2Fgar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethan7g%2Fgar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethan7g%2Fgar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethan7g%2Fgar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethan7g","download_url":"https://codeload.github.com/ethan7g/gar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055141,"owners_count":21040126,"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","argument","argument-parser","argument-parsing","arguments","argv","argv-parser","javascript","node","node-js","nodejs","npm","npm-package"],"created_at":"2024-11-06T19:07:13.589Z","updated_at":"2025-04-09T14:31:36.796Z","avatar_url":"https://github.com/ethan7g.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gar\n\u003e The lightweight Node arguments parser\n\n[GitHub](https://github.com/ethanent/gar) | [NPM](https://www.npmjs.com/package/gar)\n\n## Install\n\n```bash\nnpm i gar\n```\n\n## Use\n\n![gar usage demo](https://i.imgur.com/Ln6A8Nn.png)\n\n```javascript\nconst args = require('gar')(process.argv.slice(2))\n\nconsole.log(args)\n```\n\nSo for: `-h hey --toggle -ac --hey=hi -spaced \"hey there\" -num 1 lone`\n\n```json\n{\n\t\"h\": \"hey\",\n\t\"toggle\": true,\n\t\"a\": true,\n\t\"c\": true,\n\t\"hey\": \"hi\",\n\t\"spaced\": \"hey there\",\n\t\"num\": 1,\n\t\"_\": [\"lone\"]\n}\n```\n\n## Why use gar?\n\ngar is way more lightweight than other argument parsing packages.\n\nHere's a size comparison table:\n\nPackage | Size\n--- | ---\noptimist | [![optimist package size](https://packagephobia.now.sh/badge?p=optimist)](https://packagephobia.now.sh/result?p=optimist)\nminimist | [![minimist package size](https://packagephobia.now.sh/badge?p=minimist)](https://packagephobia.now.sh/result?p=minimist)\nargs-parser | [![args-parser package size](https://packagephobia.now.sh/badge?p=args-parser)](https://packagephobia.now.sh/result?p=args-parser)\ngar | [![gar package size](https://packagephobia.now.sh/badge?p=gar)](https://packagephobia.now.sh/result?p=gar)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethan7g%2Fgar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethan7g%2Fgar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethan7g%2Fgar/lists"}