1.11.1 • Published 6 months ago

@meebon/meebon-cli v1.11.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

npm i -g @meebon/meebon-cli

Usage

Create a new project from a template:

This command initializes a new project using a predefined template.

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.

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.

npx meebon shadow --init

Generate modules or entities using Shadow:

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

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

1.11.1

6 months ago

1.11.0

6 months ago

1.10.0

6 months ago

1.9.2

6 months ago

1.9.1

6 months ago

1.9.0

6 months ago

1.8.1

8 months ago

1.8.0

8 months ago

1.7.10

8 months ago

1.7.9

8 months ago

1.7.8

8 months ago

1.7.7

8 months ago

1.7.6

8 months ago

1.7.5

8 months ago

1.7.4

8 months ago

1.7.3

8 months ago

1.7.2

8 months ago

1.7.1

8 months ago

1.7.0

8 months ago

1.6.0

8 months ago

1.5.0

8 months ago

1.4.0

8 months ago

1.3.12

8 months ago

1.3.11

8 months ago

1.3.10

8 months ago

1.3.9

8 months ago

1.3.8

9 months ago

1.3.7

9 months ago

1.3.6

9 months ago

1.3.5

9 months ago

1.3.4

9 months ago

1.3.3

9 months ago

1.3.2

9 months ago

1.3.1

9 months ago

1.3.0

9 months ago

1.2.5

9 months ago

1.2.4

9 months ago

1.2.3

9 months ago

1.2.2

9 months ago

1.2.1

9 months ago

1.2.0

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.14

9 months ago

1.0.13

9 months ago

1.0.12

9 months ago

1.0.9

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

0.1.0

9 months ago