Skip to content

bombyx

npm package

NPM versionNPM Downloads

🧰 A CLI tool for automatically completing basic project configurations, supporting initialization of development tools like ESLint and Husky.

Introduction

[bombyx](file:///Users/jesse/github/cli-collection/packages/bombyx/src/index.ts#L12-L34) is a lightweight command-line tool designed to help developers quickly add basic configurations of commonly used development tools to their projects. It currently supports:

  • ESLint: JavaScript/TypeScript code linting tool
  • Husky: Git hooks tool for pre-commit validation

You can use the CLI to enable these configurations quickly, and optionally specify the project root directory for customization.

Installation

You can run it directly using npx without installation:

bash
npx bombyx

Usage

Basic Usage

Run inside your project root directory:

bash
npx bombyx

This command will automatically perform the following actions:

  1. Detect and read [package.json](file:///Users/jesse/github/cli-collection/package.json)
  2. Initialize ESLint configuration (if not already present)
  3. Initialize Husky configuration (if not already present)
  4. Update scripts and related fields in [package.json](file:///Users/jesse/github/cli-collection/package.json)

Specify Working Directory

You can also specify a target project directory:

bash
npx bombyx my-project

CLI Arguments

ArgumentDescription
-h, --helpShow help message
-v, --versionShow version number

API

You can also use [bombyx](file:///Users/jesse/github/cli-collection/packages/bombyx/src/index.ts#L12-L34) programmatically in your Node.js project:

ts
import { bombyx } from 'bombyx';

await bombyx({
  dir: './your/project/dir' // Optional
});

This function will apply the default set of configurations to your project.

Last updated: