{"id":13902916,"url":"https://github.com/stefanoruth/valon-args","last_synced_at":"2025-07-18T00:32:32.454Z","repository":{"id":42666143,"uuid":"314537888","full_name":"stefanoruth/valon-args","owner":"stefanoruth","description":"A Typescript arguement parser with strong types","archived":false,"fork":false,"pushed_at":"2024-09-18T00:00:22.000Z","size":372,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-20T09:54:56.193Z","etag":null,"topics":["args","argument-parser","cli","typescript"],"latest_commit_sha":null,"homepage":"","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/stefanoruth.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}},"created_at":"2020-11-20T11:44:52.000Z","updated_at":"2024-07-11T00:12:04.000Z","dependencies_parsed_at":"2024-04-04T07:39:15.141Z","dependency_job_id":"656cc56c-19df-43f6-a247-e42b13db0f2d","html_url":"https://github.com/stefanoruth/valon-args","commit_stats":{"total_commits":102,"total_committers":3,"mean_commits":34.0,"dds":0.6274509803921569,"last_synced_commit":"67ebb96c6f435334ba21beb24e8b774d59aa6ca9"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoruth%2Fvalon-args","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoruth%2Fvalon-args/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoruth%2Fvalon-args/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoruth%2Fvalon-args/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanoruth","download_url":"https://codeload.github.com/stefanoruth/valon-args/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226113215,"owners_count":17575436,"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","typescript"],"created_at":"2024-08-06T22:01:29.706Z","updated_at":"2024-11-25T11:30:52.269Z","avatar_url":"https://github.com/stefanoruth.png","language":"TypeScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# Valon Args\n\nTypescript node argument parser with strong types.\n\n![npm](https://img.shields.io/npm/v/valon-args) ![npm](https://img.shields.io/npm/dt/valon-args)\n![Build \u0026 Tests](https://github.com/stefanoruth/valon-args/workflows/Build%20\u0026%20Tests/badge.svg?branch=master)\n\n## Installation\n\n```sh\n# npm\nnpm install valon-args\n\n# Yarn\nyarn add valon-args\n\n# Pnpm\npnpm add valon-args\n```\n\n## Example\n\n```ts\nimport { cliArgs } from 'valon-args'\n\nconst options = cliArgs({\n    name: { type: 'string', required: true },\n    retries: { type: 'number' },\n    force: { type: 'boolean' },\n})\n\n// All args are now typed and validated.\noptions.name // string\noptions.retires // number | undefined\noptions.force // boolean | undefined\n```\n\n## Documentation\n\n```ts\nimport { cliArgs } from 'valon-args'\n\n// Console args are automaticly parsed fron the terminal.\nconst args = cliArgs({ name: { type: 'string' } })\n```\n\n### Usage\n\n#### String\n\n```ts\nnode ./example.js --string=foo // 'foo'\nnode ./example.js --string=\"foo bar\" // 'foo bar'\n```\n\n#### String[]\n\n```ts\nnode ./example.js --string=foo --string=bar // ['foo', 'bar']\nnode ./example.js --string=\"foo bar\" --string=\"bar baz\" // ['foo bar', 'bar baz']\nnode ./example.js --string \"foo bar\" foobar \"bar baz\" // ['foo bar', 'foobar', 'bar baz']\n```\n\n#### Number\n\n```ts\nnode ./example.js --number=1 // 1\n```\n\n#### Number[]\n\n```ts\nnode ./example.js --number=1 --number=2 // [1, 2]\n```\n\n#### Boolean\n\n```ts\nnode ./example.js --force // true\nnode ./example.js --force=true // true\nnode ./example.js --force=false // false\nnode ./example.js --force=1 // true\nnode ./example.js --force=0 // false\nnode ./example.js // undefined\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanoruth%2Fvalon-args","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanoruth%2Fvalon-args","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanoruth%2Fvalon-args/lists"}