Skip to content

dev-opus/honostrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Honostrapper CLI

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.

Reference

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.

Installation

To install Honostrapper, clone the repository and install the dependencies:

git clone https://github.com/dev-opus/honostrapper
cd honostrapper
npm install

To use the Honostrapper CLI, run the following command:

npm link

This will create a global symlink, allowing you to use the honostrapper command from any directory.

Usage

To use the Honostrapper CLI, run the following command:

honostrapper <command> [options]

Commands

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.

Validators

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.

Example

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]

License

This project is licensed under the MIT License.

About

CLI for bootstrapping Hono based projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published