{"id":14155643,"url":"https://github.com/jesusgraterol/argv-utils","last_synced_at":"2026-01-31T20:03:43.597Z","repository":{"id":238132909,"uuid":"795951029","full_name":"jesusgraterol/argv-utils","owner":"jesusgraterol","description":"The argv-utils package is a lightweight library for Node.js that simplifies working with command-line arguments passed to your scripts. It streamlines the process of accessing and managing arguments from process.argv property.","archived":false,"fork":false,"pushed_at":"2025-07-17T19:11:02.000Z","size":349,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-08T15:54:08.214Z","etag":null,"topics":["args","arguments","argv","argvs","node","parser","sh","shell","shell-script","utilities","utils"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/argv-utils","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/jesusgraterol.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-04T13:42:56.000Z","updated_at":"2025-07-17T19:10:49.000Z","dependencies_parsed_at":"2024-05-04T14:44:31.586Z","dependency_job_id":"f489e1ea-0eda-48b9-b2f4-20c139d1219e","html_url":"https://github.com/jesusgraterol/argv-utils","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"26352351e6aec386bf76a4ee63d5d077d12647a1"},"previous_names":["jesusgraterol/argv-utils"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jesusgraterol/argv-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesusgraterol%2Fargv-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesusgraterol%2Fargv-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesusgraterol%2Fargv-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesusgraterol%2Fargv-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jesusgraterol","download_url":"https://codeload.github.com/jesusgraterol/argv-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jesusgraterol%2Fargv-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28952581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["args","arguments","argv","argvs","node","parser","sh","shell","shell-script","utilities","utils"],"created_at":"2024-08-17T08:04:40.083Z","updated_at":"2026-01-31T20:03:43.576Z","avatar_url":"https://github.com/jesusgraterol.png","language":"TypeScript","funding_links":[],"categories":["shell"],"sub_categories":[],"readme":"# argv Utils\n\nThe `argv-utils` package is a lightweight library for Node.js that simplifies working with command-line arguments passed to your scripts. It streamlines the process of accessing and managing arguments from `process.argv` property.\n\n## Getting Started\n\nInstall the package:\n```bash\nnpm i -D argv-utils\n```\n\n### Examples\n\nExtract the arguments passed to the `my-file.js` script:\n```bash\nnode my-file.js --one --two=\"Hello World!\" --someValue=\"false\"\n```\n```typescript\n// my-file.js\nimport { argv } from 'node:process';\nimport { parseArgs } from 'argv-utils';\n\nparseArgs(argv);\n// {\n//    execPath: '/usr/local/bin/node',\n//    scriptPath: '/path/to/my-script.js',\n//    one: 'true',\n//    two: 'Hello World!',\n//    someValue: 'false',\n// }\n```\n\n\n\n\n\u003cbr/\u003e\n\n## Types\n```typescript\n/**\n * Base Parsed Args\n * The args that will always be present when a Node.js process is launched; taking the indexes 0 and 1 in the vector.\n */\ninterface IBaseParsedArgs {\n  // the absolute pathname of the executable that started the Node.js process\n  execPath: string,\n\n  // the path to the JavaScript file being executed\n  scriptPath: string,\n}\n\n/**\n * Parsed Args\n * The arguments provided by the process.argv property when running a script from the shell.\n */\ninterface IParsedArgs extends IBaseParsedArgs {\n  // the rest of the extracted arguments\n  [argKey: string]: string\n}\n```\n\nIf you wish to enforce strong typing in your script, extend the base type as follows:\n```typescript\ninterface IMyScriptArgs extends IBaseParsedArgs {\n  src?: string,\n  init?: 'true',\n  development?: 'true',\n  staging?: 'true',\n  production?: 'true',\n}\n```\n\n\n\u003cbr/\u003e\n\n## Built With\n\n- TypeScript\n\n\n\n\n\u003cbr/\u003e\n\n## Running the Tests\n\n```bash\nnpm run test:unit\n```\n\n\n\n\n\n\u003cbr/\u003e\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesusgraterol%2Fargv-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjesusgraterol%2Fargv-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjesusgraterol%2Fargv-utils/lists"}