{"id":28844141,"url":"https://github.com/yord/shargs-example-sync-sql","last_synced_at":"2025-10-15T10:32:02.006Z","repository":{"id":42755099,"uuid":"279288741","full_name":"Yord/shargs-example-sync-sql","owner":"Yord","description":"shargs-example-sync-sql is a sample application of shargs 🦈.","archived":false,"fork":false,"pushed_at":"2023-01-06T11:22:46.000Z","size":564,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-19T17:08:17.587Z","etag":null,"topics":["command-line","parser","shargs"],"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/Yord.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-13T11:52:30.000Z","updated_at":"2021-01-09T15:49:11.000Z","dependencies_parsed_at":"2023-02-05T23:31:36.533Z","dependency_job_id":null,"html_url":"https://github.com/Yord/shargs-example-sync-sql","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Yord/shargs-example-sync-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fshargs-example-sync-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fshargs-example-sync-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fshargs-example-sync-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fshargs-example-sync-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yord","download_url":"https://codeload.github.com/Yord/shargs-example-sync-sql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yord%2Fshargs-example-sync-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279073361,"owners_count":26097387,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["command-line","parser","shargs"],"created_at":"2025-06-19T17:07:55.570Z","updated_at":"2025-10-15T10:32:02.001Z","avatar_url":"https://github.com/Yord.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"shargs-example-sync-sql is a sample application of [shargs][shargs] 🦈.\n\nSee the [`shargs` github repository][shargs] for more details!\n\n[![node version][shield-node]][node]\n[![license][shield-license]][license]\n[![PRs Welcome][shield-prs]][contribute]\n\n## Setup\n\n```bash\n$ git clone https://github.com/Yord/shargs-example-sync-sql.git\n$ cd shargs-example-sync-sql\n$ npm i\n$ chmod +x ./sql\n```\n\n## Example\n\nThis repository is a simple example of a command-line parser build with [shargs][shargs].\nThe program can be found in the [`sql`][sql] script.\n\n## Run the Example\n\nThe `sql` script parses a very simple version of the SQL query language:\n\n```bash\n./sql \\\nSELECT 'alias, power' \\\nFROM superheroes,powers \\\nWHERE 'id = superhero_id AND universe = \"Marvel\"' \\\nGROUP BY alias \\\nHAVING 'COUNT(power) \u003e 5' \\\nORDER BY alias \\\nLIMIT 10\n```\n\nThis prints the following:\n\n```js\n{\n  _: [],\n  select: [ 'alias', 'power' ],\n  from: [ 'superheroes', 'powers' ],\n  where: 'id = superhero_id AND universe = \"Marvel\"',\n  groupBy: 'alias',\n  having: 'COUNT(power) \u003e 5',\n  orderBy: 'alias',\n  limit: 10\n}\n```\n\nNote that the order of the object fields may be different depending on the node version.\n\n## Reporting Issues\n\nPlease report issues [in the `shargs` tracker][issues]!\n\n## License\n\n`shargs-example-sync-sql` is [MIT licensed][license].\n\n\n\n[contribute]: https://github.com/Yord/shargs#contributing\n[issues]: https://github.com/Yord/shargs/issues\n[license]: https://github.com/Yord/shargs-example-sync-sql/blob/master/LICENSE\n[node]: https://nodejs.org/\n[shargs]: https://github.com/Yord/shargs\n[shield-license]: https://img.shields.io/badge/license-MIT-yellow.svg?labelColor=313A42\n[shield-node]: https://img.shields.io/node/v/shargs?color=red\u0026labelColor=313A42\n[shield-prs]: https://img.shields.io/badge/PRs-welcome-green.svg?labelColor=313A42\n[sql]: https://github.com/Yord/shargs-example-sync-sql/blob/master/sql","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyord%2Fshargs-example-sync-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyord%2Fshargs-example-sync-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyord%2Fshargs-example-sync-sql/lists"}