2.18.2 • Published 1 month ago

@herbsjs/herbs-cli v2.18.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

CD Build codecov

herbs CLI

CLI helps speed up your development cycle with HerbsJS by generating use cases and infrastructure layers (REST, GraphQL, Repositories, etc) based on your entities.

Installing and generating a CRUD project

To install herbs-cli:

npm i -g @herbsjs/herbs-cli

Then run:

herbs new

project-setup

project-structure

Default generated project structure

.
├── package-lock.json
├── package.json
└── src
    ├── domain
    │   ├── entities
    │   └── usecases
    └── infra
        ├── api
        │   ├── graphql
        │   ├── rest
        ├── config
        └── data
            ├── database
            │   └── migrations
            └── repositories

commands

herbs new

Generate a new project based on your entities(or not)

herbs new

Options

QuestionDescriptionDefault valuee.g
Project name?This is the Project Name that will be used int the project folder name and package.json.herbs-projectmy-project
Project description?This is the Project description that will be used int the package.jsonproject generated by herbs-climy beautiful project
Project author's name?This is the author's name that will be used int the package.json.herbs CLICharlie
What license do you want to use?Use arrow keys to choose your License.----
Generate graphql layer?This will generate a graphql layer for your domain.Yn
Generate rest layer?This will generate a rest layer for your domain.Yn
What database do you want to use?Use arrow keys to choose your Database.----
Do you want to initialize a Git repository?This will initialize a git repository for your project.Ny
Do you want to install dependencies?This will run npm install and npm start for younoyes

You also can run the project passing the options though CLI

herbs new --name MyAwesomeProjectName --description "my description" --author "name of the author" --license MIT --graphql --rest --database postgres --npmInstall yes

herbs update

Generate all necessary layers(graphql, rest, repository, etc) based on your new entity added into entities folder

After had created a new entity into entities folder, type in your terminal:

herbs update

Debugging

If you want to debug and/or run the CLI locally, you can do it by following the steps below:

npm link # On the CLI project folder

herbs # On the folder where you want to use the CLI

Contribute

Come with us to make an awesome herbs-cli.

Now, if you do not have the technical knowledge and also have intended to help us, do not feel shy, click here to open an issue and collaborate their ideas, the contribution may be a criticism or a compliment (why not?)

If you would like to help contribute to this repository, please see CONTRIBUTING

2.19.0-beta.10

1 month ago

2.19.0-beta.9

9 months ago

2.19.0-beta.8

9 months ago

2.19.0-beta.7

9 months ago

2.19.0-beta.6

10 months ago

2.19.0-beta.5

11 months ago

2.19.0-beta.4

12 months ago

2.19.0-beta.3

12 months ago

2.19.0-beta.2

1 year ago

2.19.0-beta.1

1 year ago

2.18.2

1 year ago

2.18.1

1 year ago

2.18.0

1 year ago

2.17.0

1 year ago

2.15.0

2 years ago

2.16.0

2 years ago

2.11.0

2 years ago

2.11.1

2 years ago

2.6.1

2 years ago

2.6.0

2 years ago

2.8.0

2 years ago

2.7.4

2 years ago

2.9.1

2 years ago

2.7.3

2 years ago

2.7.5

2 years ago

2.13.0

2 years ago

2.12.0

2 years ago

2.10.0

2 years ago

2.7.0

2 years ago

2.9.0

2 years ago

2.7.2

2 years ago

2.7.1

2 years ago

2.14.1

2 years ago

2.14.0

2 years ago

2.4.1

2 years ago

2.4.2

2 years ago

2.5.0

2 years ago

2.4.0

2 years ago

2.3.2

2 years ago

2.3.1

2 years ago

2.3.0

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

1.10.4

2 years ago

1.10.3

2 years ago

1.10.2

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.9.1

2 years ago

1.9.0

2 years ago

1.9.3

2 years ago

1.9.2

2 years ago

1.7.2

2 years ago

1.8.0

2 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.6.1

3 years ago

1.5.2

3 years ago

1.6.0

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.2.0

3 years ago

1.1.3

3 years ago

1.3.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.2

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago