Honostrapper is a CLI tool designed to bootstrap and manage various services, commons, and configurations for your hono based project that integrates the hono-openapi package.
This README provides an overview of the available commands and their usage.
This CLI is designed to enhance the experience of following the tutorial in this article. It aims to streamline the setup process, reduce manual steps, and eliminate potential pitfalls. By automating configurations and providing helpful boilerplates, it ensures a smoother integration of Hono with OpenAPI/Swagger. The goal is to make the tutorial more accessible and efficient for developers.
To install Honostrapper, clone the repository and install the dependencies:
git clone https://github.com/dev-opus/honostrapper
cd honostrapper
npm installTo use the Honostrapper CLI, run the following command:
npm linkThis will create a global symlink, allowing you to use the honostrapper command from any directory.
To use the Honostrapper CLI, run the following command:
honostrapper <command> [options]bootstrap
Bootstraps an entire project.
honostrapper bootstrap [--install-deps]--install-deps: Optional flag to install dependencies after bootstrapping.
service
Manages services in the project. Requires the --names option to specify the service names.
honostrapper service --names=<service1,service2,...> [--truncate]--names=: Comma-separated list of service names.--truncate: Optional flag to truncate existing services.
commons
Manages common components in the project.
honostrapper commons [--truncate]--truncate: Optional flag to truncate existing common source files.
config
Manages configuration files in the project.
honostrapper config [--truncate]--truncate: Optional flag to truncate existing configuration files.
The CLI includes several validators to ensure the correctness of the provided arguments and options.
validateArgs(args)
Validates the number of arguments.
validateCommand(command)
Validates the provided command.
validateServiceArgs(args)
Validates the service arguments.
validateOption(option)
Validates the provided option.
To bootstrap a project:
honostrapper bootstrap [--install-deps]To manage services:
honostrapper service --names=<service1,service2,...> [--truncate]To manage commons:
honostrapper commons [--truncate]To manage configurations:
honostrapper config [--truncate]This project is licensed under the MIT License.