corep-cli
v1.0.3
Published
A versatile command-line tool designed to streamline the creation of web development projects by generating structured templates for backend and frontend. Supports dynamic CRUD generation, page structures, and theme customization.
Readme

CORE CLI
A versatile command-line tool designed to streamline the creation of web development projects with Core Framework
Overview
CORE CLI is an extension of the Core Framework ecosystem, designed to accelerate development workflows by providing a unified command-line interface for initializing and scaffolding backend and frontend projects. It comes pre-configured with standardized templates that follow the Core Framework's architectural patterns and best practices.
Why CORE CLI?
- Accelerated Development: Generate complete CRUD operations in seconds
- Consistent Architecture: Maintain structural consistency across projects
- Dual Platform Support: Works seamlessly with both backend (REST) and frontend applications
- Theme Support: Built-in light and dark theme implementations
- Standardized Templates: Pre-configured project structures optimized for the Core Framework
Technology Stack
CORE CLI is built with:
CORE CLI is designed to work seamlessly across platforms:
- Windows, macOS, and Linux compatible
- Cross-platform path handling for filesystem operations
- Enhanced terminal output with color-coded status messages
Installation
To install CORE CLI globally on your system, run:
npm install -g corep-cliThis makes the CLI available system-wide through the following aliases:
corecore-clicr
Project Configuration
Initializing a Config File
CORE CLI uses a .core-config file to manage project settings. Generate it with:
core-cli --init
# OR
core-cli -iConfiguration Examples
Backend Project
{
"nameProject": "my-backend-project",
"version": "1.0.0",
"platform": "backend",
"connectionConfig": "unit-connection"
}Frontend Project
{
"nameProject": "my-frontend-project",
"version": "1.0.0",
"platform": "frontend"
}Configuration Options
| Field | Description | Values |
|-------|-------------|--------|
| nameProject | Project name used in various operations | Any string |
| version | Current project version | Semantic versioning |
| platform | Target platform | backend or frontend |
| connectionConfig | (Backend only) Database connection type | global-connection or unit-connection |
Usage Guide
Command Structure
core-cli [command] [options]Creating New Projects
CORE CLI allows you to quickly scaffold new projects based on the Core Framework templates:
Creating a new frontend project
core-cli new -n my-appCreating a new backend project
core-cli new -p backend -n my-apiThis will:
- Clone the official Core template repository
- Remove Git history to start fresh
- Configure the project with your custom name
- Create a
.core-configfile
After project creation, follow the suggested steps:
cd my-app
npm install
npm run devCreating Components in Existing Projects
For existing projects, you can generate new components with standardized structures:
Backend Components
# Create a CRUD component
core-cli -c crud -d src/core -n productFrontend Components
# Create a basic page
core-cli -c page -d src/pages -n dashboard
# Create a form page
core-cli -c single-forms -d src/forms -n userProfile
# Create a page with theme support
core-cli -c page-tool -d src/pages -n productsAvailable Commands
| Command | Description |
|---------|-------------|
| new | Create a new project by cloning a Core template repository |
| create or -c | Create component from template in existing project |
| --init or -i | Initialize .core-config file in current directory |
Command Options
Options for new command
| Option | Alias | Description | Required |
|--------|-------|-------------|----------|
| --platform | -p | Target platform (backend or frontend) | No (defaults to frontend) |
| --name | -n | Project name | Yes |
Options for create command
| Option | Alias | Description | Required |
|--------|-------|-------------|----------|
| --platform | -p | Target platform (backend or frontend) | No* |
| --create | -c | Template type to create | Yes |
| --directory | -d | Target directory for template | Yes |
| --name | -n | Name for the template | Yes |
* Not required if the .core-config file was previously created with cr -i command
Available Templates
Backend Templates
| Template | Description |
|----------|-------------|
| crud | Complete CRUD model with advanced features |
Frontend Templates
| Template | Description |
|----------|-------------|
| page | Basic page structure following project conventions |
| single-forms | Pages for managing single forms |
| page-tool | Enhanced implementation with modern layout, CRUD support, and theme selector |
License
This project is licensed under the "Commons Clause". For more details, refer to the LICENSE.md file in the project repository.
