{"id":13532468,"url":"https://github.com/clercjs/clerc","last_synced_at":"2026-01-08T01:16:01.712Z","repository":{"id":59002139,"uuid":"532471828","full_name":"clercjs/clerc","owner":"clercjs","description":"🖖🏻 Clerc: The full-featured cli library.","archived":false,"fork":false,"pushed_at":"2025-05-08T23:53:47.000Z","size":4102,"stargazers_count":135,"open_issues_count":14,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T05:15:07.738Z","etag":null,"topics":["argparse","args","argument-parser","argument-parsing","arguments","argv","cac","clerc","cli","cli-application","cli-framework","command-line","command-line-tool","commandline","commandline-apps","minimist","node","nodejs","parse","yargs"],"latest_commit_sha":null,"homepage":"https://clerc.js.org","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/clercjs.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}},"created_at":"2022-09-04T07:43:32.000Z","updated_at":"2025-05-08T23:53:49.000Z","dependencies_parsed_at":"2023-12-22T02:55:18.736Z","dependency_job_id":"30f18047-fa7a-4126-b5c0-3b64af373d8c","html_url":"https://github.com/clercjs/clerc","commit_stats":null,"previous_names":["so1ve/clerc"],"tags_count":92,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clercjs%2Fclerc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clercjs%2Fclerc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clercjs%2Fclerc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clercjs%2Fclerc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clercjs","download_url":"https://codeload.github.com/clercjs/clerc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471061,"owners_count":22076585,"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":["argparse","args","argument-parser","argument-parsing","arguments","argv","cac","clerc","cli","cli-application","cli-framework","command-line","command-line-tool","commandline","commandline-apps","minimist","node","nodejs","parse","yargs"],"created_at":"2024-08-01T07:01:11.174Z","updated_at":"2026-01-08T01:16:01.705Z","avatar_url":"https://github.com/clercjs.png","language":"TypeScript","readme":"![Clerc Card](.github/assets/ClercCard.png)\n\n\u003cp align=\"center\"\u003e\n\t\u003ca target=\"_blank\" href=\"https://clerc.so1ve.dev\" noreferrer noopener\u003eClerc\u003c/a\u003e is a full-featured library (tool set) for building CLI Apps in Node.js, Deno or Bun.\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Version](https://img.shields.io/npm/v/clerc.svg)](https://npmjs.org/package/clerc)\n[![CI](https://github.com/clercjs/clerc/actions/workflows/conventional-ci.yml/badge.svg)](https://github.com/clercjs/clerc/actions/workflows/conventional-ci.yml)\n[![Downloads/week](https://img.shields.io/npm/dw/clerc.svg)](https://npmjs.org/package/clerc)\n[![License](https://img.shields.io/npm/l/clerc.svg)](https://github.com/clercjs/clerc/blob/main/package.json)\n\n\u003c/div\u003e\n\n\u003chr/\u003e\n\n\u003c!-- toc --\u003e\n\n- [✨ Features](#-features)\n- [😊 The simplest CLI example](#-the-simplest-cli-example)\n- [📖 Documentation](#-documentation)\n- [🦄 Examples](#-examples)\n- [🤔 More...](#-more)\n\n\u003c!-- tocstop --\u003e\n\n\u003e [!NOTE]  \n\u003e This package is ESM-only.\n\n# ✨ Features\n\n- **Lightweight** - Dependencies are bundled.\n- **Plugin system** - Add rich features on demand.\n- **Chainable APIs** - Composable.\n- **Developer friendly** - Strongly typed, converts flags and parameters to camelCase.\n- **Parses parameters** - No need to read them by yourself.\n\n# 😊 The simplest CLI example\n\nInstall clerc, and create a file named `cli.mjs`:\n\n```ts\nimport { Cli } from \"clerc\";\n\nCli.create() // Create a new Clerc instance with help and version plugins installed\n  .scriptName(\"foo\") // CLI Script Name\n  .description(\"A foo CLI\") // CLI Description\n  .version(\"0.0.0\") // CLI Version\n  .command(\n    \"bar\", // Command name\n    \"A bar command\", // Command description\n  )\n  .on(\n    \"bar\",\n    (\n      _ctx, // The command context, but we haven't used it yet\n    ) =\u003e {\n      console.log(\"Hello, world from Clerc!\");\n    },\n  )\n  .parse(); // Parse the arguments and run!\n```\n\nThen run: `node cli.mjs bar`. It should log in your shell: `Hello, world from Clerc!`\n\n# 📖 Documentation\n\nPlease see https://clerc.so1ve.dev.\n\n# 🦄 Examples\n\nCheck the examples made with `Clerc`:\n\n- [Greeting](./examples/greeting) - The example from above\n- [Bumpp](./examples/bumpp) - Reimplementation of [`Bumpp`](https://github.com/antfu/bumpp)'s CLI\n\n# 🤔 More...\n\n## Why using Clerc?\n\nClerc uses [`@clerc/parser`](https://github.com/clercjs/clerc/blob/main/packages/parser) to parse arguments. It is strongly-typed, which brings you better DX. It is powerful(supports custom type) and quite small and performant!\n\nClerc has a plugin system, which means you can add features on demand (e.g. auto completions, help text generation...). It also provides chainable APIs for better composability.\n\nClerc's flexible architecture and plugin system offer vast potential for further exploration and customization in diverse CLI application scenarios. There are more and more opportunities to leverage Clerc's capabilities to create unique and powerful command-line tools!\n\n## 📝 License\n\n[MIT](./LICENSE). Made with ❤️ by [Ray](https://github.com/so1ve)\n","funding_links":[],"categories":["TypeScript","Packages","cli","[JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)"],"sub_categories":["Useful awesome list for Go cli"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclercjs%2Fclerc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclercjs%2Fclerc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclercjs%2Fclerc/lists"}