Skip to content

Introduction

Crygen is a shard that generates Crystal code. It is inspired by the PHP library nette/php-generator.

API documentation: https://crystaldoc.info/github/tamdaz/crygen/main/index.html

Why Crygen?

Crygen was created to address the need for automated Crystal code generation. By providing an intuitive API, it helps developers avoid repetitive boilerplate and focus on core logic. Whether you are scaffolding new projects, generating code from documentation, or building tools that output Crystal code, Crygen makes it easier to generate Crystal code automatically.

Key benefits include:

  • Consistency: Ensures generated code follows good practices and style guidelines.
  • Productivity: Reduces manual coding effort and speeds up project setup.
  • Extensibility: Easily integrates into custom tools and workflows.
  • Documentation Conversion: Facilitates transforming documentation or code from other languages into Crystal.

This shard can also save time. Many frameworks (such as Symfony, Laravel, Adonis, and others) provide features for rapid code generation, eliminating the need to rewrite everything by hand.

Contributing

If you find any issues or inconsistencies, or have suggestions, feel free to open an issue or submit a pull request on GitHub.