{"id":13683681,"url":"https://github.com/open-rpc/generator","last_synced_at":"2025-10-08T05:20:21.493Z","repository":{"id":40750978,"uuid":"167082716","full_name":"open-rpc/generator","owner":"open-rpc","description":"Multi-Component \u0026 Multi-Language Generators for OpenRPC","archived":false,"fork":false,"pushed_at":"2024-03-20T12:17:03.000Z","size":6571,"stargazers_count":62,"open_issues_count":19,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-14T06:50:02.917Z","etag":null,"topics":["open-rpc","openrpc","openrpc-document","openrpc-generator","rpc"],"latest_commit_sha":null,"homepage":"","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/open-rpc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2019-01-22T23:20:51.000Z","updated_at":"2024-03-27T13:30:55.000Z","dependencies_parsed_at":"2024-04-13T19:22:59.495Z","dependency_job_id":"e1064f50-6045-4747-b6f2-161f78058fbd","html_url":"https://github.com/open-rpc/generator","commit_stats":{"total_commits":614,"total_committers":14,"mean_commits":"43.857142857142854","dds":0.5912052117263844,"last_synced_commit":"80eafb2fb96f4e708a77d0f29206a7a8dd1bc981"},"previous_names":["open-rpc/generator-client"],"tags_count":73,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-rpc%2Fgenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-rpc%2Fgenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-rpc%2Fgenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-rpc%2Fgenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-rpc","download_url":"https://codeload.github.com/open-rpc/generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247996273,"owners_count":21030429,"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":["open-rpc","openrpc","openrpc-document","openrpc-generator","rpc"],"created_at":"2024-08-02T13:02:22.724Z","updated_at":"2025-10-08T05:20:21.393Z","avatar_url":"https://github.com/open-rpc.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","others"],"sub_categories":[],"readme":"# OpenRPC Generator\n\n\u003ccenter\u003e\n  \u003cspan\u003e\n    \u003cimg alt=\"CircleCI branch\" src=\"https://img.shields.io/circleci/project/github/open-rpc/generator/master.svg\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/open-rpc/generator/branch/master/graph/badge.svg\" /\u003e\n    \u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/dt/@open-rpc/generator.svg\" /\u003e\n    \u003cimg alt=\"GitHub release\" src=\"https://img.shields.io/github/release/open-rpc/generator.svg\" /\u003e\n    \u003cimg alt=\"GitHub commits since latest release\" src=\"https://img.shields.io/github/commits-since/open-rpc/generator/latest.svg\" /\u003e\n  \u003c/span\u003e\n\u003c/center\u003e\n\nA Generator tool for [open-rpc](https://github.com/open-rpc/spec) APIs.\n\nNeed help or have a question? Join us on [Discord](https://discord.gg/gREUKuF)!\n\n## Features:\n\n- Built in components for:\n  - Clients\n  - Server\n  - Documentation\n- Easy to create new components\n\n\n## Usage\n\nThe generator CLI has a generate command which takes a config to run. The config specifies what components you want to make, as well as the configuration for each component.\n\nUsing the CLI's `init` command, you can walk though an interactive config builder.\n\n### Quick start\n\n```sh\nnpm install -g @open-rpc/generator\n\nopen-rpc-generator init\nopen-rpc-generator generate -c open-rpc-generator-config.json\n```\n\n### Generating an individual component\n\n```shell\nopen-rpc-generator generate \\\n  -t client \\\n  -l typescript \\\n  -n petstoreClientTs \\\n  -d https://raw.githubusercontent.com/open-rpc/examples/master/service-descriptions/petstore-openrpc.json \\\n  -o ./generated\n```\n### Custom Component Generation Configuration\nHere for customComponent we specify the module that exports as\ndefault the type IComponentModule see custom-test-component.js as an example. It is easy to also refer to an npm package as well as a plain js file. customType is can be anything , it is not restricted to client | server | doc naming.\n```\n{\n  \"openrpcDocument\": \"./src/awesome-custom-client_openrpc.json\",\n  \"outDir\": \"generated-client\",\n  \"components\": [\n      {\n          \"type\": \"custom\",\n          \"name\": \"awesome-custom-client\",\n          \"language\": \"typescript\",\n          \"customComponent\": \"./src/custom-test-component.js\",\n          \"customType\": \"client\"\n      }\n  ]\n}\n```\n## Resources\n\n- [@open-rpc/generator package](https://www.npmjs.com/package/@open-rpc/generator)\n- [example open-rpc documents](https://github.com/open-rpc/examples/tree/master/service-descriptions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-rpc%2Fgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-rpc%2Fgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-rpc%2Fgenerator/lists"}