@meebon/meebon-cli v1.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
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:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes with descriptive commit messages.
- Submit a pull request.
License
MIT
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago