A useful CLI tool for scaffolding features and generating code blueprints.
# Global installation (recommended)
npm install -g run-create-cli
# Or use directly with npx (no installation needed)
npx run-create-cli feat my-featureNote: This is a CLI tool meant to be installed globally. Global installation allows you to use
rcccommand anywhere in your terminal.
This package provides two CLI commands:
run-create-cli- Full command namercc- Short alias for convenience
Both commands work identically:
# Using full command name
run-create-cli feat user-profile
run-create-cli gen ./blueprints/user.js UserModel
# Using short alias (recommended)
rcc feat user-profile
rcc gen ./blueprints/user.js UserModelGenerate a complete feature with all necessary files:
# Create feature with tests (default in src/ folder)
rcc feat user-profile
# Create feature without tests
rcc feat user-profile --no-test
# Create in specific directory
rcc feat user-profile --dir features
rcc feat user-profile -d components
# Force overwrite existing files
rcc feat user-profile --force -d src/modulesGenerate code from custom blueprint files:
# Generate from blueprint file
rcc gen ./blueprints/user.js UserModel
# Generate with force overwrite
rcc gen ./blueprints/api.js AuthService --forceScaffolds a complete feature with:
- Main implementation file
- Type definitions
- Index file for exports
- Test file (unless
--no-testis specified)
Options:
-d, --dir <directory>- Target directory (default: from config orsrc)--no-test- Skip generating test files--test- Generate test files (overrides config)-f, --force- Overwrite existing files
Generates code from a blueprint file (JS/JSON module).
Arguments:
<blueprint>- Path to blueprint file (e.g.,./blueprints/user.js)<name>- Entity name for generation
Options:
-f, --force- Overwrite existing files
- 🚀 Fast scaffolding - Generate complete features in seconds
- 📁 Smart file organization - Follows best practices for file structure
- 🧪 Test-ready - Includes test files by default
- 🎯 Type-safe - Full TypeScript support
- 🚀 Fast scaffolding - Generate complete features in seconds
- 📁 Smart file organization - Follows best practices for file structure
- 🧪 Test-ready - Includes test files by default
- 🎯 Type-safe - Full TypeScript support
- ⚙️ Configurable - Project-level configuration support
- ⚡ Lightweight - Minimal dependencies
Create a rcc.config.js in your project root to customize defaults:
// rcc.config.js
export default {
// Base directory for generated files (default: 'src')
baseDir: 'src',
// Skip test files by default (default: false)
skipTests: false,
};Configuration priority:
- CLI flags (highest priority)
rcc.config.jsin project root- Built-in defaults (lowest priority)
Example:
# Uses baseDir from config (e.g., 'app')
rcc feat user-profile
# Overrides config with CLI flag
rcc feat user-profile -d lib
# Config has skipTests: true, but --test flag overrides it
rcc feat user-profile --test# Clone the repository
git clone https://github.com/pajarrahmansyah/run-create-cli.git
cd run-create-cli
# Install dependencies
npm install
# Run tests
npm test
# Build the project
npm run build
# Run in development mode
npm run devContributions are welcome! Feel free to open issues and pull requests.
See CHANGELOG.md for a list of changes in each version.
MIT License - see LICENSE file for details.