schema-fuse

0.0.12 • Public • Published

Schama Fuse CLI

The schema-fuse CLI is a command-line tool that allows you to automatically combine and manage your prisma schema files. Whether you want to break up large schema files, have self-contained schema files for different modules, or simply manage your Schema schemas efficiently, this tool provides flexibility and automation.

Features

  • Combine multiple prisma schema files into a single file.
  • Watch for changes in schema files and trigger combining when changes stabilize.
  • Supports subdirectory scanning for schema files.
  • Customizable delay to control when schema combining occurs.

Installation

  1. Ensure you have Node.js and npm installed.

  2. Install the CLI globally:

    npm install -g schema-fuse

Usage

Combine Schema Files

Combine multiple schema files into a single schema file:

schema-fuse -i <input-directory> -o <output-directory>
  • -i, --input: Input directory where schema files are located.
  • -o, --output: Output directory where the combined schema file will be saved.

Run in Background

To watch for changes in prisma schema files and combine them when changes stabilize:

schema-fuse -b -i <input-directory> -o <output-directory>
  • -b, --background: Run in the background mode.
  • -d, --delay <milliseconds>: Customizable delay before combining (default is 5000 milliseconds).

Example

To combine schema files located in ./prisma and output the combined schema to ./output, run:

schema-fuse -i ./prisma -o ./output

To run in the background with a 10-second delay:

schema-fuse -b -d 10000 -i ./schema -o ./output

Contributing

Feel free to contribute to this project! You can submit issues, pull requests, or suggestions in the GitHub repository.

License

This CLI tool is licensed under the MIT License. See the LICENSE file for details.


Package Sidebar

Install

npm i schema-fuse

Weekly Downloads

2

Version

0.0.12

License

ISC

Unpacked Size

5.7 kB

Total Files

6

Last publish

Collaborators

  • mitch1009