{"id":22474703,"url":"https://github.com/herbsjs/herbs-cli","last_synced_at":"2025-08-02T11:32:14.717Z","repository":{"id":37002547,"uuid":"359007176","full_name":"herbsjs/herbs-cli","owner":"herbsjs","description":"Herbs CLI","archived":false,"fork":false,"pushed_at":"2024-10-30T12:33:43.000Z","size":4044,"stargazers_count":29,"open_issues_count":20,"forks_count":30,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-11T07:32:23.537Z","etag":null,"topics":["cli","hacktoberfest","herbs-cli","herbsjs"],"latest_commit_sha":null,"homepage":"https://herbsjs.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/herbsjs.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-17T23:59:50.000Z","updated_at":"2024-12-16T00:07:52.000Z","dependencies_parsed_at":"2024-10-30T13:36:59.637Z","dependency_job_id":null,"html_url":"https://github.com/herbsjs/herbs-cli","commit_stats":{"total_commits":428,"total_committers":30,"mean_commits":"14.266666666666667","dds":0.7313084112149533,"last_synced_commit":"62b0f30fffe36c13538a197375243435bb3214fe"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/herbsjs/herbs-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbs-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbs-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbs-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbs-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herbsjs","download_url":"https://codeload.github.com/herbsjs/herbs-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbsjs%2Fherbs-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378965,"owners_count":24240907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","hacktoberfest","herbs-cli","herbsjs"],"created_at":"2024-12-06T13:10:04.252Z","updated_at":"2025-08-02T11:32:14.170Z","avatar_url":"https://github.com/herbsjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CD Build](https://github.com/herbsjs/herbs-cli/actions/workflows/cd.yml/badge.svg)](https://github.com/herbsjs/herbs-cli/actions/workflows/cd.yml) [![codecov](https://codecov.io/gh/herbsjs/herbs-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/herbsjs/herbs-cli)\n\n\n# herbs CLI\n\nCLI helps speed up your development cycle with HerbsJS by generating use cases and infrastructure layers (REST, GraphQL, Repositories, etc) based on your entities.\n\n## Installing and generating a CRUD project\n\nTo install herbs-cli:\n\n```bash\nnpm i -g @herbsjs/herbs-cli\n```\n\nThen run:\n\n```bash\nherbs new\n```\n\n![project-setup](./docs/ex3.png)\n\n![project-structure](./docs/gif.gif)\n\n## Default generated project structure\n\n```bash\n.\n├── package-lock.json\n├── package.json\n└── src\n    ├── domain\n    │   ├── entities\n    │   └── usecases\n    └── infra\n        ├── api\n        │   ├── graphql\n        │   ├── rest\n        ├── config\n        └── data\n            ├── database\n            │   └── migrations\n            └── repositories\n```\n\n## commands\n\n### herbs new\n\nGenerate a new project based on your entities(or not)\n\n\u003e herbs new\n\n\n#### Options\n\n| Question                                      | Description                                                                                                                    | Default value                  | e.g                           |\n| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ | ----------------------------- |\n| Project name?                                 | This is the Project Name that will be used int the project folder name and package.json.                                       | herbs-project                  | my-project                    |\n| Project description?                          | This is the Project description that will be used int the package.json                                                         | project generated by herbs-cli | my beautiful project          |\n| Project author's name?                        | This is the author's name that will be used int the package.json.                                                              | herbs CLI                      | Charlie                       |\n| What license do you want to use?              | Use arrow keys to choose your License.                                                                                         | --                             | --                            |\n| Generate graphql layer?                       | This will generate a graphql layer for your domain.                                                                            | Y                              | n                             |\n| Generate rest layer?                          | This will generate a rest layer for your domain.                                                                                                                    | Y                              | n                             |\n| What database do you want to use?             | Use arrow keys to choose your Database.                                                                                        | --                             | --                            |\n| Do you want to initialize a Git repository?             | This will initialize a git repository for your project.                                                                                                                    | N                              | y                             |\n| Do you want to install dependencies?             | This will run npm install and npm start for you                                                                                                                   | no                              | yes                             |\n\nYou also can run the project passing the options though CLI \n\n\u003e herbs new --name MyAwesomeProjectName --description \"my description\"  --author \"name of the author\" --license MIT --graphql --rest --database postgres --npmInstall yes\n\n\n### herbs update\n\nGenerate all necessary layers(graphql, rest, repository, etc) based on your new entity added into entities folder\n\nAfter had created a new entity into entities folder, type in your terminal:\n\n\u003e herbs update\n\n### Debugging\n\nIf you want to debug and/or run the CLI locally, you can do it by following the steps below:\n\n\u003e npm link   # On the CLI project folder\n\n\u003e herbs      # On the folder where you want to use the CLI\n\n### Contribute\n\nCome with us to make an awesome _herbs-cli_.\n\nNow, if you do not have the technical knowledge and also have intended to help us, do not feel shy, [click here](https://github.com/herbsjs/herbs-cli/issues) to open an issue and collaborate their ideas, the contribution may be a criticism or a compliment (why not?)\n\nIf you would like to help contribute to this repository, please see [CONTRIBUTING](https://github.com/herbsjs/herbs-cli/blob/master/.github/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbsjs%2Fherbs-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherbsjs%2Fherbs-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbsjs%2Fherbs-cli/lists"}