schema-fuse
v0.0.12
Published
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 Prisma files for different modules, or simply manage your prism s
Downloads
3
Maintainers
Readme
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
Ensure you have Node.js and npm installed.
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.