Runes is a Python package that enables developers and designers to generate and map user-defined pseudo-code to various coding systems. This includes integration with LangChain for natural language processing, facilitating the creation of pseudo-code through conversational AI.
pip install rune
- User-Defined Syntax: Define your own pseudo-code syntax using emojis, ASCII art, or any textual representation.
- LangChain Integration: Utilize natural language processing to generate pseudo-code and map it directly other languages eg: Unreal Engine blueprints.
- Extensible Architecture: Easily extend
Runes
to support new coding systems
Create a JSON configuration file to define your syntax mappings. Here's an example for Unreal Engine blueprints:
{
"syntaxMappings": {
"🚀": "Event",
"➡️": "Execution Flow",
"✨": "Function Call",
...
}
}
Runes
integrates with LangChain to allow you to define pseudo-code through natural language. Here's how to get started:
from runes.langchain_integration import generate_pseudo_code
from runes.extensions.unreal_blueprint import UnrealBlueprintMapper
# Generate pseudo-code from natural language
pseudo_code = generate_pseudo_code("Create an event that increments score when an item is collected")
# Load your syntax configuration
unreal_mapper = UnrealBlueprintMapper('path/to/config.json')
# Map the generated pseudo-code to Unreal Engine blueprint
blueprint_code = unreal_mapper.map_to_blueprint(pseudo_code)
print(blueprint_code)
To see Runes
in action, check out the Bluepy Project on GitHub, which demonstrates how you can use Runes
to generate Unreal Engine blueprint code from user-defined pseudo-code.
To support additional coding systems, create a module in the extensions
directory. See unreal_blueprint.py
for an example.
Contributions are welcome! Whether you're adding new features, improving documentation, or extending support for other languages, your help is appreciated.
- Implement dynamic LSP for auto-complete functionality.
- Integrate alternative syntax extensions
- AI system prompts for pesudo code
Runes is available under the MIT License. For more information, see the LICENSE file in the repository.
### Implementation Notes
1. **Banner Image**: Ensure the banner image URL is valid and publicly accessible. Replace `https://example.com/path/to/banner.jpg` with the actual URL of the banner image you wish to use.
2. **LangChain Integration**: The example code snippet assumes the existence of a `langchain_integration` module within the `Runes` package. This module should handle communication with LangChain APIs to facilitate natural language processing and generation of pseudo-code.
3. **Project Link**: The provided link to the [Bluepy Project](https://github.com/ZackBradshaw/Bluepy) should point to an actual GitHub repository that demonstrates the use of `Runes` for Unreal Engine blueprint generation. Ensure the repository exists and is public.
4. **Extensibility and Contributions**: The README encourages contributions and extensions to the `Runes` package, aiming to create a community-driven tool that supports a wide range of coding systems.
By incorporating these updates, the `Runes` package README now offers a comprehensive guide to its features, usage, and extension, making it accessible for both developers and non-developers interested in leveraging AI for code generation.