{"id":13903038,"url":"https://github.com/eegli/tinyparse","last_synced_at":"2025-04-15T17:37:32.956Z","repository":{"id":42051534,"uuid":"444722140","full_name":"eegli/tinyparse","owner":"eegli","description":"A tiny, type-safe and flexible framework to build powerful CLI apps","archived":false,"fork":false,"pushed_at":"2024-10-23T17:59:30.000Z","size":3222,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T10:39:49.280Z","etag":null,"topics":["argv","cli","command-line","commander","javascript","minimist","nodejs","parser","typescript","validation","yargs"],"latest_commit_sha":null,"homepage":"https://tinyparse.dev","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/eegli.png","metadata":{"files":{"readme":"docs/README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","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":"2022-01-05T08:23:50.000Z","updated_at":"2024-10-23T17:59:20.000Z","dependencies_parsed_at":"2024-04-08T18:58:17.418Z","dependency_job_id":"7966a95d-8d6a-4fc2-91f4-7562e51c80e9","html_url":"https://github.com/eegli/tinyparse","commit_stats":{"total_commits":156,"total_committers":4,"mean_commits":39.0,"dds":0.05769230769230771,"last_synced_commit":"364544e2566e3f0ced33e03160464a7adea6e0f0"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eegli%2Ftinyparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eegli%2Ftinyparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eegli%2Ftinyparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eegli%2Ftinyparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eegli","download_url":"https://codeload.github.com/eegli/tinyparse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249119820,"owners_count":21215822,"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","command-line","commander","javascript","minimist","nodejs","parser","typescript","validation","yargs"],"created_at":"2024-08-06T22:01:34.793Z","updated_at":"2025-04-15T17:37:32.935Z","avatar_url":"https://github.com/eegli.png","language":"TypeScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"## Tinyparse\n\n![npm](https://img.shields.io/npm/v/@eegli/tinyparse) ![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/eegli/tinyparse/ci.yml?branch=main) [![codecov](https://codecov.io/gh/eegli/tinyparse/branch/main/graph/badge.svg?token=8MFDR4SWYM)](https://codecov.io/gh/eegli/tinyparse) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@eegli/tinyparse)\n\n\u003e A tiny, type-safe and flexible utility for creating command line tools in Node.js\n\n## What it is\n\n_Like [oclif](https://oclif.io/) and [Yargs](https://yargs.js.org/) had a baby._\n\n```ts\nimport { Parser } from '@eegli/tinyparse';\n\nnew Parser()\n  .option('occasion', {\n    longFlag: '--occasion',\n    shortFlag: '-o',\n    defaultValue: '',\n    required: true,\n  })\n  .subcommand('congratulate', {\n    args: ['name'] as const,\n    handler: ({ args, options }) =\u003e {\n      const [name] = args;\n      const { occasion } = options;\n      console.log(`Happy ${occasion}, ${name}!`);\n    },\n  })\n  .defaultHandler(() =\u003e {\n    console.log('Please enter your name');\n  })\n  .parse(['congratulate', 'John', '--occasion', 'birthday'])\n  .call();\n\n// Happy birthday, John!\n```\n\nI use this mostly for other pet projects of mine so it comes with some opinions 🤪.\n\n## Features\n\n- TypeScript first - 100% type-safety\n- Supports subcommands and flag options\n- Async API\n- Lightweight - Zero dependencies\n- Mega customizable\n\n## Examples\n\n- Check out the extensive [test suites](https://github.com/eegli/tinyparse/tree/main/test) or\n- Play in the dedicated [Code Sandbox](https://codesandbox.io/s/tinyparse-sandbox-pknk4?file=/src/index.ts)\n\n## Resources\n\nThis project has been guided by the amazing [Command Line Interface Guidelines](https://clig.dev/) by Aanand Prasad, Ben Firshman, Carl Tashian and Eva Parish.\n\nFurther inspiration has been taken from the [Apache Commons CLI](https://commons.apache.org/proper/commons-cli/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feegli%2Ftinyparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feegli%2Ftinyparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feegli%2Ftinyparse/lists"}