nelumbo-rkx-cli
v1.3.0
Published
rkx - React toolKit eXtend: CLI para scaffolding de proyectos React, Vite, Next y más.
Readme
nelumbo-rkx-cli React toolKit eXtend
rkx (React toolKit eXtend) is a lightweight and extensible CLI for bootstrapping and scaling projects in React, Vite, and Next.js.
It includes generators for modules, components, hooks, enums, and types.
🚀 Installation
Global installation (recommended):
npm install -g nelumbo-rkx-cli
# or with yarn
yarn global add nelumbo-rkx-cliVerify installation:
rkx --help📦 Available Commands
Create React projects
rkx create-react-project my-appScaffolds a new project based on React + Vite from a base repository, updates dependencies, and renames the package.
Available templates (selected via branch):
main: React vanilla projectvite-mui: React project with Material-UInext: React - Nextjs project
Main options:
--repo <slugOrUrl>: Base repository--pm <pm>: Package manager (npm,yarn,pnpm)-b, --branch <branch>: Branch to use / template (default:main)--force: Overwrite target folder if it exists--install/--no-install: Automatically install dependencies--debug: Verbose mode
Create React libraries
rkx create-react-library my-libScaffolds a React library template based on React + tsup from a base repository, updates dependencies with fixed versions, and configures the package for library distribution.
Main options:
--repo <slugOrUrl>: Base repository (default:nelumboconsultores/react-templates)--pm <pm>: Package manager (npm,yarn,pnpm)-b, --branch <branch>: Branch to use (default:library)--force: Overwrite target folder if it exists--install/--no-install: Automatically install dependencies--debug: Verbose mode
Create modules
rkx create-module billingGenerates a module in src/modules/billing from a template.
⚙️ avaliable templates
module (default)→ Defaut react vanila module.next-module→ strutucture for next projects.
Create components
rkx create-component Button
rkx create-component Card -m dashboardCreate hooks
rkx create-hook useAuth
rkx create-hook useGoogleMaps -m mapsGenerates a hook in src/core/hooks or inside the specified module, along with its type file.
Create enums and types
rkx create-enum Status
rkx create-type UserGenerates enum and type files under src/core/types.
⚙️ Common Options
--force→ Overwrite if the file already exists.--path <path>→ Provide a custom path.--template <name>→ Use a different template than the default.--debug→ Print debug information.
📝 Quick Examples
# New React+Vite project (vanilla)
rkx create-react-project my-dashboard
# New React+Vite project with Material-UI
rkx create-react-project my-dashboard -b vite-mui
# New React library
rkx create-react-library my-ui-lib
# New users module
rkx create-module users
# New component inside users module
rkx create-component UserCard -m users
# New global hook
rkx create-hook useTheme
# New enum
rkx create-enum Status
# New type
rkx create-type User📚 Roadmap
- [x] React+Vite project scaffolding
- [x] React library scaffolding
- [x] Module, component, and hook generators
- [x] Enum and type generators
- [x] Next.js project scaffolding
- [ ] Customizable templates
- [ ] Third-party plugins/extensions
🛠 Contributing
- Fork the repo
- Create a branch
feature/new-feature - Submit a PR 🎉
📄 License
This project is licensed under the MIT license.
