npm package: @meebon/meebon-cli
Description: ## Description
Author: kajalanS
Latest version: 1.11.1

# Meebon CLI

## Description

Meebon CLI is a command-line tool designed to streamline the creation of new projects and the generation of code using templates. It supports creating projects from predefined templates or by cloning existing Git repositories. Additionally, it provides a "Shadow Command" for API template projects, enabling the generation of modules and entities based on predefined configurations.

## Install

```bash
npm i -g @meebon/meebon-cli
```

## Usage

### Create a new project from a template:

This command initializes a new project using a predefined template.

```bash
npx meebon project
```

**Available Templates:**

*   `api-type-orm-v2`: A template for creating a REST API using TypeORM and Express.
*   `meebon-package-template`: A basic Node.js TypeScript library template.

### Create a new project from a repository:

This command clones an existing Git repository to create a new project. Replace `<github-username>/<repository-name>` with the actual repository URL.

```bash
npx meebon project --repo <github-username>/<repository-name>
```

## Shadow Command (API Project Template)

The Shadow Command is specifically designed for API project templates. It provides tools to generate modules and entities, offering helpers to create models and associated code for your API projects based on predefined configurations.

### Initialize the project for Shadow:

This command initializes the shadow configuration for an API template project.

```bash
npx meebon shadow --init
```

### Generate modules or entities using Shadow:

This command generates modules or entities based on the specified category.

```bash
npx meebon shadow --category <category-name>
```

  *  Available categories: `modules`, `entity`

## Features

*   **Project Creation**:
    *   Create new projects from predefined templates.
    *   Create new projects by cloning from existing Git repositories.
*   **Shadow Command**:
    *   Initialize shadow configuration.
    *   Generate code for modules and entities based on templates for API projects.

## Template Directory (API Template)

This is a typical directory structure for an API template project:

```
📁 project-name
 ├── 📁 src
 │   ├── 📁 entity
 │   │   └── 📄 User.ts
 │   ├── 📁 modules
 │   │   └── 📁 user
 │   │       ├── 📁 controllers
 │   │       │   └── 📄 UserController.ts
 │   │       ├── 📁 interfaces
 │   │       │   └── 📄 IUserService.ts
 │   │       └── 📁 services
 │   │           └── 📄 UserService.ts
 │   ├── 📄 app.ts
 │   ├── 📄 server.ts
 ├── 📁 template
 │   └── 📁 shadow
 │       ├── 📁 entity
 │       │   └── 📄 entity.template
 │       └── 📁 module-template
 │           ├── 📁 controllers
 │           │   └── 📄 moduleController.template
 │           ├── 📁 interfaces
 │           │   └── 📄 ImoduleService.template
 │           └── 📁 services
 │               └── 📄 moduleService.template
 ├── 📄 shadow.config.json
 ├── 📄 package.json
 ├── 📄 ...
```

## Future Updates

-   [ ] Add more templates
-   [ ] Support private repositories
-   [ ] Enhance Shadow command with more options and customization

## Contributing

Contributions are welcome! Please follow these steps:

1.  Fork the repository.
2.  Create a new branch for your feature or bug fix.
3.  Commit your changes with descriptive commit messages.
4.  Submit a pull request.

## License

MIT