{"id":34982697,"url":"https://github.com/the-codegen-project/cli","last_synced_at":"2026-04-26T18:00:46.546Z","repository":{"id":243229660,"uuid":"787032408","full_name":"the-codegen-project/cli","owner":"the-codegen-project","description":"Your one stop boilerplate killer for any standard!","archived":false,"fork":false,"pushed_at":"2026-04-24T21:18:59.000Z","size":85084,"stargazers_count":33,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-24T21:31:28.391Z","etag":null,"topics":["amqp","asyncapi","event-source","generator","kafka","mqtt","nats","openapi","openapi-generator","openapi3","the-codegen-project","typescript"],"latest_commit_sha":null,"homepage":"https://the-codegen-project.org/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-codegen-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-15T19:01:11.000Z","updated_at":"2026-04-13T19:58:34.000Z","dependencies_parsed_at":"2025-12-27T01:07:32.452Z","dependency_job_id":null,"html_url":"https://github.com/the-codegen-project/cli","commit_stats":null,"previous_names":["the-codegen-project/cli"],"tags_count":104,"template":false,"template_full_name":null,"purl":"pkg:github/the-codegen-project/cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-codegen-project%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-codegen-project%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-codegen-project%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-codegen-project%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-codegen-project","download_url":"https://codeload.github.com/the-codegen-project/cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-codegen-project%2Fcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32307015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T17:23:19.671Z","status":"ssl_error","status_checked_at":"2026-04-26T17:23:19.195Z","response_time":129,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["amqp","asyncapi","event-source","generator","kafka","mqtt","nats","openapi","openapi-generator","openapi3","the-codegen-project","typescript"],"created_at":"2025-12-27T01:04:18.656Z","updated_at":"2026-04-26T18:00:46.540Z","avatar_url":"https://github.com/the-codegen-project.png","language":"TypeScript","readme":"![The Codegen Project banner](https://github.com/user-attachments/assets/5a839f64-8ed3-49fe-84e2-899cbd7d5027)\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ch1\u003e⚡️The Codegen Project⚡️\u003c/h1\u003e\n\n[![License](https://img.shields.io/github/license/the-codegen-project/cli)](https://github.com/the-codegen-project/cli/blob/master/LICENSE)\n[![Npm latest version](https://img.shields.io/npm/v/@the-codegen-project/cli)](https://www.npmjs.com/package/@the-codegen-project/cli)\n![NPM Downloads](https://img.shields.io/npm/dw/%40the-codegen-project%2Fcli)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/the-codegen-project/cli/.github%2Fworkflows%2Fruntime-testing.yml?label=runtime%20testing)\n![GitHub last commit](https://img.shields.io/github/last-commit/the-codegen-project/cli)\n![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/the-codegen-project/cli/codegen.x64.pkg?label=MacOS)\n![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/the-codegen-project/cli/codegen.arm64.pkg?label=MacOS)\n![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/the-codegen-project/cli/codegen.x86.exe?label=Win)\n![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/the-codegen-project/cli/codegen.x64.exe?label=Win)\n![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/the-codegen-project/cli/codegen.tar.gz?label=Linux)\n![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/the-codegen-project/cli/codegen.deb?label=Linux)\n![homebrew downloads](https://img.shields.io/homebrew/installs/dm/codegen?label=Brew%20(SOON))\n![Chocolatey Downloads](https://img.shields.io/chocolatey/dt/codegen?label=Chocolatey%20(SOON))\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n\u003ch4\u003eGenerate payload models, parameters, headers, messages, communication support functions, and much more...\u003c/h4\u003e\n\n[Read the Docs](https://the-codegen-project.org/docs/) | [View Demos](./examples/README.md)\n\n\u003c/div\u003e\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth width=\"600px\"\u003e\u003c/th\u003e\n      \u003cth width=\"600px\"\u003e\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n  \u003ctr width=\"600px\"\u003e\n    \u003ctd\u003e\n      \u003ca href=\"./assets/videos/generate-nextjs.gif\"\u003e\u003cimg src=\"./assets/videos/generate-nextjs.gif\" width=\"100%\"/\u003e\u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"./assets/videos/generate-typescript.gif\"\u003e\u003cimg src=\"./assets/videos/generate-typescript.gif\" width=\"100%\"/\u003e\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n# Core Features\n- 📃 From your [AsyncAPI v2 and v3](https://the-codegen-project.org/docs/inputs/asyncapi) documents, generate [payloads](https://the-codegen-project.org/docs/generators/payloads), [headers](https://the-codegen-project.org/docs/generators/headers), [parameters](https://the-codegen-project.org/docs/generators/parameters), [protocol helpers](https://the-codegen-project.org/docs/generators/channels), [full clients](https://the-codegen-project.org/docs/generators/client), [models](https://the-codegen-project.org/docs/generators/models), [simple types](https://the-codegen-project.org/docs/generators/types), or all of the above. \n- 📃 From your [Swagger 2.0, or OpenAPI 3.0, and 3.1](https://the-codegen-project.org/docs/inputs/openapi) documents, generate [payloads](https://the-codegen-project.org/docs/generators/payloads), [headers](https://the-codegen-project.org/docs/generators/headers), [parameters](https://the-codegen-project.org/docs/generators/parameters), [models](https://the-codegen-project.org/docs/generators/models), [simple types](https://the-codegen-project.org/docs/generators/types), or all of the above.\n- 📃 From your [JSON Schema Draft-4, Draft-6 and Draft-7](https://the-codegen-project.org/docs/inputs/jsonschema) schemas, generate [models](https://the-codegen-project.org/docs/generators/models) or [completely customize it](https://the-codegen-project.org/docs/generators/custom).\n- 📊 Every generator fully customizable to fit your hearts desire\n- 👀 Integrate it into any project (Demos in [Next.JS](./examples/typescript-nextjs), [TypeScript Libraries](./examples/typescript-library))\n- 💅 [Create custom generators to your use-case](https://the-codegen-project.org/docs/generators/custom)\n- 🗄️ Protocol agnostic generator ([NATS](https://the-codegen-project.org/docs/protocols/nats), [Kafka](https://the-codegen-project.org/docs/protocols/kafka), [MQTT](https://the-codegen-project.org/docs/protocols/mqtt), [AMQP](https://the-codegen-project.org/docs/protocols/amqp), [event-source](https://the-codegen-project.org/docs/protocols/eventsource), [HTTP Client](https://the-codegen-project.org/docs/protocols/http_client), [WebSocket](https://the-codegen-project.org/docs/protocols/websocket), read the [docs](https://the-codegen-project.org/docs#protocols) for the full list and information)\n- ⭐ And much more...\n\n# How it works\nThe Codegen Project is a generator that is built to live alongside your projects to help you save time in the development phase, ensuring you spend as much time on the business logic as possible. It works by using your configuration file to know what it needs to generate. \n\nEach input has different generators and [all of them can be customized](https://the-codegen-project.org/docs/generators), or you can build your own generator [right in the configuration file](https://the-codegen-project.org/docs/generators/custom).\n```ts\nexport default {\n  inputType: 'asyncapi',\n  inputPath: './asyncapi.json',\n  language: 'typescript',\n  generators: [\n    {\n      preset: 'payloads',\n      outputPath: './src/payloads',\n      serializationType: 'json', \n    },\n    ...\n  ]\n};\n```\n\nIn this example, the generator will read the AsyncAPI document located in same directory as the configuration file, and generate TypeScript models for all the payload including code to serialize the models to JSON.\n\n# 💎 Sponsors\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"33%\"\u003e\n      \u003ca href=\"https://code-forge.net/\" target=\"_blank\"\u003e\n        \u003cimg width=\"200\" alt=\"CodeForge ./assets/images/sponsors/CodeForge.png\" src=\"https://github.com/user-attachments/assets/97afc2db-f556-4b3d-9e96-979c1fc74959\" /\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      \u003cstrong\u003e\u003ca href=\"https://code-forge.net/\" target=\"_blank\"\u003eCodeForge\u003c/a\u003e\u003c/strong\u003e\n      \u003cbr /\u003e\n      \u003cem\u003eAutomated SDK generation platform built on The Codegen Project\u003c/em\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c/div\u003e\n\n---\n\n# Getting started\nIts simple, [install the CLI](#install) into your project or machine, [setup the Codegen configuration file](#initialize) to include all the code your heart desire, customize it, and generate it at build time or whenever you feel like it.\n\n## Install\nInstalling the CLI can be done inside a project or within your system.\n\n\u003ctable style=\"table-layout: fixed;\"\u003e\n  \u003ctr style=\"height: 50px;\"\u003e\n    \u003cth\u003ePackage manager\u003c/th\u003e\n    \u003cth\u003eMacOS x64\u003c/th\u003e\n    \u003cth\u003eMacOS arm64\u003c/th\u003e\n    \u003cth\u003eWindows x64\u003c/th\u003e\n    \u003cth\u003eWindows x32\u003c/th\u003e\n    \u003cth\u003eLinux (Debian)\u003c/th\u003e\n    \u003cth\u003eLinux (Others)\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd style=\"vertical-align: top; min-width: 300px;\"\u003e\n      \u003cdiv\u003e\n\n#### NPM\n\n```sh\nnpm install --save-dev @the-codegen-project/cli\n\nnpm install -g @the-codegen-project/cli\n```\n\n#### Yarn\n\n```sh\nyarn add @the-codegen-project/cli\n```\n\n#### Pnpm\n\n```sh\npnpm add @the-codegen-project/cli\n```\n\n#### Bun\n\n```sh\nbun add @the-codegen-project/cli\n```\n\n\u003c/div\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"vertical-align: top;\"\u003e\n      \u003cdiv\u003e\n\n#### Download\n```sh\ncurl -OL https://github.com/the-codegen-project/cli/releases/latest/download/codegen.x64.pkg\n```\n\n#### Install\n```sh\nsudo installer -pkg codegen.x64.pkg -target /\n```\n\n\u003c/div\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"vertical-align: top;\"\u003e\n      \u003cdiv\u003e\n\n#### Download\n```sh\ncurl -OL https://github.com/the-codegen-project/cli/releases/latest/download/codegen.arm64.pkg\n```\n#### Install\n\n```sh\nsudo installer -pkg codegen.arm64.pkg -target /\n```\n\u003c/div\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"vertical-align: top;\"\u003e\n      \u003cdiv\u003e\n\u003ca href=\"https://github.com/the-codegen-project/cli/releases/latest/download/codegen.x64.exe\"\u003eDownload and run codegen.x64.exe\u003c/a\u003e\n\u003c/div\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"vertical-align: top;\"\u003e\n      \u003cdiv\u003e\n\u003ca href=\"https://github.com/the-codegen-project/cli/releases/latest/download/codegen.x86.exe\"\u003eDownload and run codegen.x86.exe\u003c/a\u003e\n\u003c/div\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"vertical-align: top;\"\u003e\n      \u003cdiv\u003e\n\n#### Download\n```sh\ncurl -OL https://github.com/the-codegen-project/cli/releases/latest/download/codegen.deb\n```\n\n#### Install\n```sh\nsudo apt install ./codegen.deb\n```\n\u003c/div\u003e\n    \u003c/td\u003e\n    \u003ctd style=\"vertical-align: top;\"\u003e\n      \u003cdiv\u003e\n\n#### Download\n```sh\ncurl -OL https://github.com/the-codegen-project/cli/releases/latest/download/codegen.tar.gz\n```\n\n#### Install\n\n```sh\ntar -xzf codegen.tar.gz\n```\n\n#### Symlink\n```sh\nln -s \u003cabsolute-path\u003e/bin/codegen /usr/local/bin/codegen\n```\n\n\u003c/div\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nYou can find all the possible commands in [the usage documentation](https://the-codegen-project.org/docs/usage).\n\n## Initialize\nAdd a configuration file, either manually or through the CLI;\n```sh\ncodegen init\n```\n\n\u003cdiv align=\"center\"\u003e\n\n\n[![Initialize The Codegen Project](./assets/videos/initialize.gif)](./assets/videos/initialize.gif)\n\n[Customize it to your heart's desire!](https://the-codegen-project.org/docs/generators)\n\n\u003c/div\u003e\n\n## Generate\nWith your configuration file in hand, time to generate the code and use it! This can be done manually or integrate into your build process. Checkout [all the examples](./examples/) for inspiration on how to do it.\n\n### Basic Generation\n```sh\n# Generate code once\ncodegen generate\n\n# Generate with specific config file\ncodegen generate ./my-config.js\n```\n\n### Watch Mode (Development)\nFor development workflows, use watch mode to automatically regenerate code when your input files change:\n\n```sh\n# Watch for changes in the input file specified in your config\ncodegen generate --watch\n\n# Watch for changes in a specific file or directory\ncodegen generate --watch --watchPath ./asyncapi\n\n# Short form\ncodegen generate -w -p ./schemas/\n```\n\nWatch mode is perfect for development environments where you want your generated code to stay in sync with your API specifications as you make changes.\n\n# 👀 Goals\nBesides the [milestones](https://github.com/the-codegen-project/cli/milestones), we have certain goals that we want to reach for various reasons;\n- [ ] ⭐ Reach 50 stars - So we can publish the CLI on Brew and Chocolatey\n- [X] 📃 3 Published resources (blog post, video, etc)\n\n# 📃 Resources\nPeople who have been so kind to write or talk about The Codegen Project;\n- [AsyncAPI - Simplifying Channels Into One](https://the-codegen-project.org/blog/asyncapi-client-generator/)\n- [AsyncAPI - Protocol-Specific Messaging Functions](https://the-codegen-project.org/blog/asyncapi-channel-generator/)\n- [AsyncAPI - Dynamic Channel Routing Made Type-Safe](https://the-codegen-project.org/blog/asyncapi-parameters-generator/)\n- [AsyncAPI - Type safety Never Publish to Wrong Channels Again](https://the-codegen-project.org/blog/asyncapi-types-generator/)\n- [AsyncAPI - Type-Safe Headers](https://the-codegen-project.org/blog/asyncapi-headers-generator/)\n- [AsyncAPI - Stop wasting time on payloads](https://the-codegen-project.org/blog/asyncapi-payload-generator)\n- [The Codegen Project - 1 Months of Progress](https://the-codegen-project.org/blog/update-2)\n- [The Codegen Project - AsyncAPI Extensions](https://the-codegen-project.org/blog/asyncapi-customizing-outputs)\n- [The Codegen Project - 5 Months of Progress](https://the-codegen-project.org/blog/update-1)\n\n\n# Telemetry\n\nThe Codegen Project CLI collects **anonymous** usage data to help us understand how the tool is being used and make data-driven improvements. We take your privacy seriously:\n\n- ✅ **What we collect**: Command usage, generator types, input source types (not actual paths), error categories\n- ❌ **What we DON'T collect**: File paths, file contents, personal information, project names\n\n**To disable telemetry**:\n```bash\ncodegen telemetry disable\n```\n\nOr set an environment variable:\n```bash\nexport CODEGEN_TELEMETRY_DISABLED=1\n# or\nexport DO_NOT_TRACK=1\n```\n\n[Learn more about telemetry →](https://the-codegen-project.org/docs/telemetry)\n\n# Contribution Guidelines\n\nWe have made quite a [comprehensive contribution guide](https://the-codegen-project.org/docs/contributing) to give you a lending hand in how the project is structured and how to contribute to it.\n\n## Contributors \n\nThanks go out to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/jonaslagoni\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/13396189?v=4?s=100\" width=\"100px;\" alt=\"Jonas Lagoni\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJonas Lagoni\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/the-codegen-project/cli/issues?q=author%3Ajonaslagoni\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/the-codegen-project/cli/commits?author=jonaslagoni\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/the-codegen-project/cli/commits?author=jonaslagoni\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#ideas-jonaslagoni\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#maintenance-jonaslagoni\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#question-jonaslagoni\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/the-codegen-project/cli/commits?author=jonaslagoni\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/the-codegen-project/cli/pulls?q=is%3Apr+reviewed-by%3Ajonaslagoni\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/ALagoni97\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/68890168?v=4?s=100\" width=\"100px;\" alt=\"Lagoni\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eLagoni\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/the-codegen-project/cli/issues?q=author%3AALagoni97\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"#maintenance-ALagoni97\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#projectManagement-ALagoni97\" title=\"Project Management\"\u003e📆\u003c/a\u003e \u003ca href=\"https://github.com/the-codegen-project/cli/pulls?q=is%3Apr+reviewed-by%3AALagoni97\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-codegen-project%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-codegen-project%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-codegen-project%2Fcli/lists"}