{"id":31796416,"url":"https://github.com/sidwebworks/zors","last_synced_at":"2025-10-10T20:48:32.674Z","repository":{"id":41220796,"uuid":"503702507","full_name":"sidwebworks/zors","owner":"sidwebworks","description":"A next-gen framework for type-safe command-line applications","archived":false,"fork":false,"pushed_at":"2022-08-16T11:55:33.000Z","size":371,"stargazers_count":14,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-11T05:56:55.229Z","etag":null,"topics":["cli","deno","node","typscript","zors"],"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/sidwebworks.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":"2022-06-15T09:38:47.000Z","updated_at":"2023-03-10T21:53:53.000Z","dependencies_parsed_at":"2022-07-08T01:45:10.319Z","dependency_job_id":null,"html_url":"https://github.com/sidwebworks/zors","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/sidwebworks/zors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidwebworks%2Fzors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidwebworks%2Fzors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidwebworks%2Fzors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidwebworks%2Fzors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidwebworks","download_url":"https://codeload.github.com/sidwebworks/zors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidwebworks%2Fzors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005268,"owners_count":26083864,"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-10T02:00:06.843Z","response_time":62,"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":["cli","deno","node","typscript","zors"],"created_at":"2025-10-10T20:48:19.949Z","updated_at":"2025-10-10T20:48:32.666Z","avatar_url":"https://github.com/sidwebworks.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \n  \u003cimg src=\".github/logo.png\" width=\"220px\" alt=\"zors logo\"\u003e\n\n  \u003cbr\u003e \n  \u003cbr\u003e \n  \n  ![zors version](https://img.shields.io/npm/v/zors)\n  [![install size](https://packagephobia.com/badge?p=zors)](https://packagephobia.com/result?p=zors)\n  ![zors license](https://img.shields.io/github/license/sidwebworks/zors)\n\u003c/div\u003e\n\n# Zors 🥇\n\n\u003e Next-gen framework for building modern, type-safe command-line applications.\n\n- 📦 Tiny (zero dependencies)\n- 💡 Runtime agonistic (supports both Deno and Node JS)\n- 🛠️ Rich Features\n- 🔩 Simple and extensible plugin api\n- 🔑 Excellent Typescript support with fully Typed APIs\n\n# Notice\n\nWe're actively working on bug fixes, improvements and documentation to get this stable and released ASAP.\n\n# Table of Contents\n\n- [Installation](#installation)\n- [Quick Start Guide](#quick-start-guide)\n- [Usage](#usage)\n  - [Display Help Message and Version](#display-help-message-and-version)\n- [API Reference](#api-reference)\n- [Packages](#packages)\n\u003c!-- - [Contributing](#contributing) --\u003e\n\n## Installation\n\n```shell\n# with npm\nnpm install zors\n\n# with yarn\nyarn add zors\n\n# with pnpm\npnpm add zors\n```\n\n\n## Quick Start Guide\n\nTo create a new program you can import the `zors` function, which takes in your a `name` and `version`\nwhich will be later used for automatic help generation.\n\n\u003e Its recommended to keep your program name same as the `bin` name in your `package.json`\n\n```ts\n// in main.[js | ts] ...\n\nimport { zors } from 'zors';\n\nconst name = 'my-git';\nconst version = '1.0.0';\n\nconst program = zors(name, version);\n\n// let's build a simple git cli\nprogram\n  .command('init', 'Initialize an empty git repository')\n  .option(\n    '-q, --quiet',\n    'Only print error and warning messages; all other output will be suppressed.'\n  )\n  .action((args, options, tools) =\u003e {\n    if (!options.quiet) {\n      console.log('Initialized an empty git repository');\n    }\n\n    process.exit(0);\n  });\n\n// run it\nawait program.run(process.argv.slice(2));\n```\n\n### So what do some of these terms mean?\n\nYou can use the `.command()` method to create a new [`Command`]() which takes in a some `raw` input and `description` parameters along with an optional [`config`](###command-config) object.\n\n```ts\n  .command('init', 'Initialize an empty git repository')\n```\n\nEvery command can define some options, you can add one using `.option()` method on any command object. Which also takes in a `raw` input and `description`.\n\n\u003c!-- \u003e options and arguments with angled `\u003c\u003e` brackets are treated as required and will be validated, where as square `[]` brackets are treated as optional.  --\u003e\n\nIf neither of these are used, an option is treated as a `boolean` by default.\n\n```ts\n.option('-q, --quiet', 'Only print error and warning messages; all other output will be suppressed.')\n```\n\nEvery command needs to have an `action` defined, action is just a function which is executed with some arguments when the command is called.\n\nYou can define an action using the `.action()` method on any command, whose parameters are `args`, `options` and `tools` respectively.\n\n```ts\n.action((args, options, tools) =\u003e {\n  // define the actions needed to be done on command execution\n});\n```\n\n**That's all you need to create a basic CLI app**,\n\nLet's try **running** it. In Node to get the standard input `argv` we can use `process.argv` and use `.slice(2)` ignore the first 2 items in the array as they're of no use to us.\n\n```ts\nawait program.run(process.argv.slice(2));\n```\n\n\u003cdiv align=\"right\"\u003e \n  \n  🔝 [scroll to top](#table-of-contents)\n  \n\u003c/div\u003e \n\n## Usage\n\n### Display Help Message and Version\n\n```ts\nimport { zors } from 'zors';\nimport { commitCommand, statusCommand } from './commands.js';\n\nconst program = zors('git', '1.0.0');\n\nprogram\n  .help()           // Displays help message when '-h' or '--help' is specified\n  .version(\"1.0.0\") // Displays version number when '-v' or '--version' is specified\n  .command(...)\n  ...\n\nprogram.run(process.argv.slice(2));\n```\n\n\u003cdiv align=\"right\"\u003e \n  \n  🔝 [scroll to top](#table-of-contents)\n  \n\u003c/div\u003e \n\n## API Reference\n\nWe rely on Typescript types to auto-generate API documentation [find it here](https://paka.dev/npm/zors)\n\n## Packages\n\n| Package | Version (click for changelogs) |\n|---|----|\n| [zors](packages/core) | [![zors version](https://img.shields.io/npm/v/zors.svg?label=%20)](packages/core/CHANGELOG.md) |\n\u003c!--                  | [@zors/plugin-ui](packages/plugin-ui)                                                          | [![plugin-ui version](https://img.shields.io/npm/v/@zors/plugin-react.svg?label=%20)](packages/plugin-react/CHANGELOG.md) | --\u003e \n\u003c!--                  | [create-zors](packages/create-zors)                                                            | [![create-zors version](https://img.shields.io/npm/v/create-vite.svg?label=%20)](packages/create-vite/CHANGELOG.md)       | --\u003e \n\n\u003cdiv align=\"right\"\u003e \n  \n  🔝 [scroll to top](#table-of-contents)\n  \n\u003c/div\u003e \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidwebworks%2Fzors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidwebworks%2Fzors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidwebworks%2Fzors/lists"}