Hix - A Code Generation Tool for Clean Architecture
Hix is a powerful code generation tool designed to help you implement clean architecture patterns in your projects. It uses templates and models to generate consistent, well-structured code across different layers of your application.
Features
- Template-based Code Generation: Write templates once, generate code for multiple models
- Clean Architecture Support: Built-in support for Domain, Application, Infrastructure, and Presentation layers
- Flexible Template Language: Simple yet powerful template syntax with conditionals and loops
- Model-driven Development: Define your models in JSON and generate code automatically
- CLI Interface: Easy-to-use command-line interface with initialization and help features
- Customizable Architecture: Support for different architecture patterns (Clean, Onion, Hexagonal)
- Extensible: Add your own templates and customize the generation process
Quick Start
-
Install Hix:
bash stack install hix
-
Initialize a Project:
bash mkdir my-project cd my-project hix init
-
Create a Model:
json { "className": "User", "properties": [ { "name": "Id", "type": "int" }, { "name": "Name", "type": "string" } ] }
-
Generate Code:
bash hix User.json
Documentation
- CLI Commands - Learn about available commands and options
- Usage Guide - Get started with basic usage
- Template Syntax - Understand the template language
- Advanced Features - Explore advanced capabilities
- Templates - Learn about creating and using templates
- Real-world Use Cases - See how Hix is used in practice
- Roadmap - Future plans and upcoming features
Getting Help
- Use
hix help
for basic command information - Use
hix man
for detailed documentation - Check the documentation for more information
- Report issues on our GitHub repository
License
Hix is licensed under the MIT License. See the LICENSE file for details.