{"id":27444381,"url":"https://github.com/rebase-agency/generate-react-cli","last_synced_at":"2025-04-15T03:16:00.214Z","repository":{"id":206435095,"uuid":"716569625","full_name":"rebase-agency/generate-react-cli","owner":"rebase-agency","description":"CLI for generating React component files.","archived":false,"fork":false,"pushed_at":"2023-11-26T10:27:31.000Z","size":63,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T03:15:55.833Z","etag":null,"topics":["cli","generate-react-cli","react","react-components"],"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/rebase-agency.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}},"created_at":"2023-11-09T12:15:13.000Z","updated_at":"2023-12-18T08:24:08.000Z","dependencies_parsed_at":"2023-11-09T16:00:28.337Z","dependency_job_id":"6de9e757-eb4e-40e6-9db3-acc4333d9984","html_url":"https://github.com/rebase-agency/generate-react-cli","commit_stats":null,"previous_names":["rebase-agency/generate-react-cli"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebase-agency%2Fgenerate-react-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebase-agency%2Fgenerate-react-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebase-agency%2Fgenerate-react-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rebase-agency%2Fgenerate-react-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rebase-agency","download_url":"https://codeload.github.com/rebase-agency/generate-react-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997084,"owners_count":21195799,"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":["cli","generate-react-cli","react","react-components"],"created_at":"2025-04-15T03:15:59.544Z","updated_at":"2025-04-15T03:16:00.198Z","avatar_url":"https://github.com/rebase-agency.png","language":"TypeScript","readme":"# @rebase-agency/generate-react-cli\n\n![version](https://img.shields.io/npm/v/@rebase-agency/generate-react-cli) [![License](https://img.shields.io/npm/l/express.svg)](https://github.com/rebase-agency/generate-react-cli/blob/master/LICENSE)\n\nCLI for generating React component files. To help speed up productivity in React projects and stop copying, pasting, and renaming files each time you want to create a new component.\nThis tool create components with `ts`\n\n## Installation\n\n```shell\nnpm install -g @rebase-agency/generate-react-cli\n```\n\n## Usage\n```shell\nnpx generate-react [options] \u003ccomponent\u003e [path]\n```\n\n## Generate Components\n\n```shell\nnpx generate-react Box ./src/components\n```\n\nThis command will create a folder with your component name in the specified path (e.g. **src/components**) directory, and its corresponding files.\n\n#### Example of the component files structure:\n\n```\n|-- /src\n    |-- /components\n        |-- /Box\n            |-- Box.tsx\n            |-- Box.module.css\n            |-- index.ts\n```\n\n#### Example of the Storybook with option `-s` component files structure:\n\n```\n|-- /Box\n    |-- Box.tsx\n    |-- Box.module.css\n    |-- Docs.mdx\n    |-- Box.stories.tsx\n    |-- README.md\n    |-- index.ts\n```\n\n## Options\n\n\u003ctable\u003e\n  \u003ctr align=\"left\"\u003e\n    \u003cth\u003eOptions\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"20%\"\u003e\u003cb\u003e-s\u003c/b\u003e\u003c/td\u003e\n    \u003ctd width=\"80%\"\u003e\n      Generate the component files for storybook project.  \n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"20%\"\u003e\u003cb\u003e-c\u003c/b\u003e\u003c/td\u003e\n    \u003ctd width=\"80%\"\u003e\n      Generate the context files for project.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"20%\"\u003e\u003cb\u003e-hk\u003c/b\u003e\u003c/td\u003e\n    \u003ctd width=\"80%\"\u003e\n      Generate the hook file with default code.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"20%\"\u003e\u003cb\u003e-nf\u003c/b\u003e\u003c/td\u003e\n    \u003ctd width=\"80%\"\u003e\n      Generate only one React component (without export and css module files).\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"20%\"\u003e\u003cb\u003e-nc\u003c/b\u003e\u003c/td\u003e\n    \u003ctd width=\"80%\"\u003e\n      Generate the React components without css module file.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"20%\"\u003e\u003cb\u003e-i\u003c/b\u003e\u003c/td\u003e\n    \u003ctd width=\"80%\"\u003e\n      Generate files for svg icon component.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd width=\"20%\"\u003e\u003cb\u003e-p\u003c/b\u003e\u003c/td\u003e\n    \u003ctd width=\"80%\"\u003e\n      Generate the React components with props types template.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Generate public export file\n\nThis command will create a `index.ts` file with export yours components in the specified path (e.g. **src/components**) directory. The command overwrites the `index.ts` file.\n\n```shell\nnpx generate-react export ./src/components\n```\n\n#### Example\n\nFor example, you have `./src/components` with the following component folders:\n\n```\n|-- /src\n    |-- /components\n        |-- /Box\n        |-- /Button\n        |-- /Card\n        |-- /Modal\n```\n\nThen the `export` command will generate a file `index.ts` with the following content:\n\n```tsx\nexport { Box } from \"./Box\";\nexport { Button } from \"./Button\";\nexport { Card } from \"./Card\";\nexport { Modal } from \"./Modal\";\n```\n\n## License\n\n@rebase-agency/generate-react-cli is an open source software licensed as [MIT](https://github.com/rebase-agency/generate-react-cli/blob/main/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebase-agency%2Fgenerate-react-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frebase-agency%2Fgenerate-react-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frebase-agency%2Fgenerate-react-cli/lists"}