{"id":16409912,"url":"https://github.com/juliandavidmr/menu-args","last_synced_at":"2025-02-24T02:23:42.970Z","repository":{"id":57294632,"uuid":"130443042","full_name":"juliandavidmr/menu-args","owner":"juliandavidmr","description":"Toolkit for creating command line interfaces without writing so much code.","archived":false,"fork":false,"pushed_at":"2018-04-25T16:46:20.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-06T12:48:44.826Z","etag":null,"topics":["args","argument-parser","cli","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/menu-args","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/juliandavidmr.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":"2018-04-21T05:30:59.000Z","updated_at":"2018-04-25T16:46:21.000Z","dependencies_parsed_at":"2022-08-29T07:52:15.473Z","dependency_job_id":null,"html_url":"https://github.com/juliandavidmr/menu-args","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliandavidmr%2Fmenu-args","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliandavidmr%2Fmenu-args/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliandavidmr%2Fmenu-args/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliandavidmr%2Fmenu-args/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliandavidmr","download_url":"https://codeload.github.com/juliandavidmr/menu-args/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240405135,"owners_count":19796136,"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-parser","cli","nodejs"],"created_at":"2024-10-11T06:22:08.317Z","updated_at":"2025-02-24T02:23:42.921Z","avatar_url":"https://github.com/juliandavidmr.png","language":"JavaScript","readme":"# menu-args\n\nToolkit for creating command line interfaces without writing so much code.\n\n\u003e `menu-args` uses the [args](https://github.com/leo/args) package.\n\n```js\nconst menu = require('menu-args')\n\nvar args = menu(`\nCommands\n    serve \"Run server\"\n    build\n    reload\n\nOptions\n    user \"Username\"\n    pass \"Password system\"\n    state\n    port (8080) \"Port, default value\"\n`)\n\nconsole.log(args.parse(process.argv))\n```\n\nIf the command is executed:\n\n```bash\nnode test.js -u the.user -p 1a2b3c\n```\n\nit is obtained:\n\n```js\n/* { P: '8080',\n  port: '8080',\n  u: 'the.user',\n  user: 'the.user',\n  p: '1a2b3c',\n  pass: '1a2b3c' } */\n```\n\n\u003e Note that the variable [`args`](https://github.com/leo/args) is exactly the args package\n\n## Install\n\n```bash\nnpm install menu-args --save\n```\n\n### Example\n\nIf you run function `args.showHelp()`, we'll see:\n\n```txt\nUsage: test.js [options] [command]\n\n  Commands:\n\n    build, b\n    help      Display help\n    reload    undefined\n    serve     \"Run server\"\n    version   Display version\n\n  Options:\n\n    -h, --help          Output usage information\n    -p, --pass          Password system\n    -P, --port [value]  Port, default value (defaults to \"8080\")\n    -s, --state\n    -u, --user          \"Username\"\n    -v, --version       Output the version number\n```\n\nLicense MIT","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliandavidmr%2Fmenu-args","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliandavidmr%2Fmenu-args","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliandavidmr%2Fmenu-args/lists"}