{"id":16625519,"url":"https://github.com/aleclarson/slurm","last_synced_at":"2025-10-28T02:13:39.614Z","repository":{"id":57363438,"uuid":"126416780","full_name":"aleclarson/slurm","owner":"aleclarson","description":"CLI argument parser","archived":false,"fork":false,"pushed_at":"2020-11-27T21:38:43.000Z","size":32,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T09:13:42.743Z","etag":null,"topics":["argv","cli","nodejs"],"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/aleclarson.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-03-23T01:40:07.000Z","updated_at":"2023-02-15T21:59:12.000Z","dependencies_parsed_at":"2022-09-26T16:32:20.705Z","dependency_job_id":null,"html_url":"https://github.com/aleclarson/slurm","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslurm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslurm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslurm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fslurm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleclarson","download_url":"https://codeload.github.com/aleclarson/slurm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271492,"owners_count":20911586,"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":["argv","cli","nodejs"],"created_at":"2024-10-12T04:05:59.644Z","updated_at":"2025-10-28T02:13:39.555Z","avatar_url":"https://github.com/aleclarson.png","language":"JavaScript","readme":"# slurm v0.5.9\n\nCLI argument parser\n\n```js\nconst slurm = require('slurm')\n\nconst argv = '-f -b=0 --list 1 2 3 -n=100 --func [1,2,3] -xyz'\nprocess.argv.push(...argv.split(' '))\n\nconst args = slurm({\n  '*': true,            // (no throw for unknown flags)\n  f: 'foo',             // -f (alias of --foo)\n  foo: true,            // --foo\n  list: {               // --list 1 2 3\n    list: true\n  },\n  b: {                  // -b=0\n    type: 'boolean'\n  },\n  n: {                  // -n=100\n    type: 'number',\n    default: 0,\n  },\n  func(value) {         // --func [1,2,3]\n    return JSON.parse(value)\n  }\n})\n\nargs.foo   // =\u003e true\nargs.list  // =\u003e ['1', '2', '3']\nargs.b     // =\u003e false\nargs.n     // =\u003e 100\nargs.func  // =\u003e [1, 2, 3]\nargs.x     // =\u003e true\nargs.y     // =\u003e true\nargs.z     // =\u003e true\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Fslurm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleclarson%2Fslurm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Fslurm/lists"}