New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cli-rtg-generator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-rtg-generator

CLI tool to generate React components and TypeScript types.

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

📦 rtg-cli-generator

A lightweight CLI to generate React components, TypeScript types, and constants in your src/ directory — with nested path support and short Angular-style commands.

🚀 Features

  • ✅ Generate functional React components (.tsx) in src/
  • ✅ Generate types in src/types/ and constants in src/constants/
  • ✅ Auto-creates missing folders
  • ✅ Supports nested paths like ui/Button
  • ✅ Supports short aliases: g c, g t, g const
  • ✅ Automatically opens the created file in VS Code

📦 Installation

npm install -g cli-rtg-generator

✨ Usage

🧱 Full Commands

rtg create-component components/MyCard
rtg create-type models/User
rtg create-constants config/theme

⚡ Short Commands (Angular Style)

rtg g c components/MyCard     # Create component
rtg g t models/User           # Create type
rtg g const config/theme      # Create constant

📁 Output Example

CommandOutput Path
rtg g c Buttonsrc/Button.tsx
rtg g c ui/Cardsrc/ui/Card.tsx
rtg g t Usersrc/types/User.ts
rtg g t models/Usersrc/types/models/User.ts
rtg g const appsrc/constants/app.ts
rtg g const config/themesrc/constants/config/theme.ts

🛠 Notes

  • code CLI must be available in your system PATH for file auto-open to work.
  • All files are created relative to src/ to keep your project clean and organized.

👨‍💻 Author

Created with ❤️ by Jaymin

MIT © jaymin shiroya

Keywords

react

FAQs

Package last updated on 11 Jul 2025

Did you know?

Socket

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.

Install

Related posts