type-craft-wizard
v1.0.1
Published
Type-Craft-Wizard is a TypeScript package that simplifies and automates type generation based on contextual data and samples.
Downloads
5
Maintainers
Readme
Type-Craft-Wizard
Type-Craft-Wizard is a powerful TypeScript tool designed to automate and streamline type generation based on contextual data samples. It simplifies the process of type management by creating a structured type system tailored to your project's needs.
Features
- Automatic Type Generation: Generate TypeScript types based on sample data and context.
- Structured Directory Setup: Automatically creates a
types
directory withTypes.ts
andSampleData.ts
, and autils
directory withutils.ts
. - Easy Integration: Includes an
index.ts
entry point and necessary configurations for seamless integration into your project.
Installation
You can install Type-Craft-Wizard globally or locally in your project using npm or yarn.
Global Installation
npm install -g type-craft-wizard
or
yarn global add type-craft-wizard
Local Installation
npm install type-craft-wizard --save-dev
or
yarn add type-craft-wizard --dev
Usage
Once installed, you can use the command line interface to generate the necessary files and directories for type management.
Command Line Interface
Run the following command to generate the types
directory and other necessary files:
npx generate <type-name>
Command Categories and Options
1. Data Management Types
Generate types and sample data for various data management needs:
dataset-data
: Types and data for datasets.evaluation-metrics
: Types and data for evaluation metrics.interactive-exercises
: Types and data for interactive exercises.learning-progress
: Types and data for tracking learning progress.
2. Financial Management
Generate types and sample data for financial management:
investment-portfolios
: Types and data for investment portfolios.market-trends
: Types and data for market trends.financial-reports
: Types and data for financial reports.
3. Customer and Supply Chain Management
Generate types and sample data for customer and supply chain management:
crm
: Types and data for customer relationship management, including customer details and interaction history.supply-chain-management
: Types and data for managing supply chain aspects like inventory levels and order status.
4. Developer and User Profiles
Generate types and sample data for profiles:
developer-profile
: Types and data for developer profiles.user
: Types and data for user profiles.
5. Health and Nutrition
Generate types and sample data for health and nutrition:
meal-plans
: Types and data for meal plans and dietary restrictions.mental-health
: Types and data for mental health, including therapy session notes and mood tracking.medical-records
: Types and data for medical records.treatment-plans
: Types and data for treatment plans.
6. Media and Entertainment
Generate types and sample data for media and entertainment:
playlist-data
: Types and data for music playlists and streaming metrics.episode-metadata
: Types and data for TV episode metadata and cast data.music-streaming
: Types and data for music streaming metrics.
7. Environment and Agriculture
Generate types and sample data for environmental and agricultural management:
air-quality
: Types and data for air quality monitoring.water-quality
: Types and data for water quality monitoring.weather-data
: Types and data for weather data.soil-data
: Types and data for soil data.farm-activities
: Types and data for farm activities and management.crop-data
: Types and data for crop management.
8. Technology
Generate types and sample data for various technology-related information:
model-data
: Types and data for AI model data.deployment-info
: Types and data for deployment configurations.
9. Media
Generate types and sample data for media:
audio
: Types and data for audio content, including metadata and formats.video
: Types and data for video content, including metadata and formats.image-metadata
: Types and data for image metadata.image-tags
: Types and data for image tags.image-usage
: Types and data for image usage statistics.
10. Event and Education
Generate types and sample data for events and educational purposes:
event
: Types and data for event management, including event details and scheduling.education-game
: Types and data for educational games and their mechanics.
Help Commands
To list all available commands and their explanations:
npx generate --help all
To get help on a specific command:
npx generate <type-name> --help
Directory and File Overview
After running the generate
command, the directory structure will be:
/project-root
├── types
│ ├── Types.ts
│ └── SampleData.ts
├── utils
│ └── utils.ts
├── lib
├── .gitignore
├── index.ts
└── package.json
types/Types.ts
: Contains the generated TypeScript types based on your context and sample data.types/SampleData.ts
: Holds sample data used for type generation.utils/utils.ts
: Includes utility functions for type manipulation and management.lib/
: Reserved for any additional library files or compiled output..gitignore
: Ensures that generated files and directories are ignored by version control.index.ts
: Entry point for your project or package.package.json
: Manages your project's dependencies and scripts.
Contributing
Contributions to Type-Craft-Wizard are welcome! If you have ideas for improvements or find any issues, please open an issue or submit a pull request on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For questions or support, please reach out to [email protected].