
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
react-factory-cli
Advanced tools
Imagine you're about to start a new React project, and instead of spending time configuring everything from scratch, you run a single command, and your project is set up, fully equipped with Tailwind CSS for utility-first styling and SCSS for custom CSS. That’s exactly what React Factory CLI offers.
React Factory CLI is a versatile command-line tool that simplifies the process of scaffolding and managing React projects. It allows developers to quickly generate functional, class-based, pages, services, context APIs, and hooks with minimal effort. A standout feature of React Factory CLI is the rfc-config.json file, which lets you customize your project’s folder structure and default component types.
React Factory CLI offers a complete React boilerplate setup via a simple setup command, including:
React Factory CLI is evolving, and with every release, it's becoming more than just a helper; it’s a tool that shapes the way developers build modern React applications.
To use React Factory CLI, install it globally or locally.
npm install -g react-factory-cli
To use it locally in your project:
npm install react-factory-cli --save-dev
Then, you can run it with npx:
npx react-factory-cli <operation> <name> [options...]
Run the CLI using the following syntax:
react-factory-cli <operation> <name> [options...]
{
"component": {
"path": "src/components",
"type": "functional"
},
"page": {
"path": "src/components",
"type": "functional"
},
"service": {
"path": "src/services"
},
"context": {
"path": "src/context"
},
"hook": {
"path": "src/hooks"
}
}
| Command | Alias | Description |
|---|---|---|
setup | N/A | Setup a new React project with tailwind css and scss |
generate:component | gc | Generates a new React component |
generate:page | gp | Generates a new React page component |
generate:service | gs | Generates a new React service |
generate:context | gctx | Generates a new React Context API |
generate:hook | gh | Generates a new React hook |
| Command | Option | Description |
|---|---|---|
setup | --path <name> | Specify the folder to create the project in (default: current folder) |
generate:component, gc | -f, --functional | Generate a functional component |
generate:component, gc | -c, --class | Generate a class-based component |
generate:component, gc | -p, --path <location> | Generate a component in a different location |
Setup a new React project:
rfc setup --path my-react-app
Generate a functional component:
rfc gc myComponent --functional
Generate a service:
rfc gs api
Generate a Context API:
rfc gctx auth
Generate a custom hook:
rfc gh custom
Contributions are welcome! To contribute to React Factory CLI, feel free to fork the repository and submit a pull request.
FAQs
CLI for creating and managing React projects and components
We found that react-factory-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.