An LLM-based compiler to generate and execute code from plain prompts, acting as source code.
Fullscreen for better experience.
CreateCalculatorSmall.mp4
- Reads project files with the
*.llmc.jsonextension (one per directory). - Generates an
undo.executor.txtfile for undo operations. - Allows cleanup operations by renaming
undo.executor.txttocleanup.executor.txt. LLMC will detect and execute the cleanup commands, then stop.
- Place your prompt files (e.g.,
*.prompt.txt) in the project directory. - Create a single
*.llmc.jsonproject file for each directory. - Run
llmcto:- Parse prompts.
- Generate the desired outputs (code, files, scripts, etc.).
- Execute any
PostBuildcommands defined in the prompt.
When executed, llmc provides guidance:
* It looks for *.llmc.json as a project file. There should be only one such file in the directory.
* It generates undo.executor.txt for any undo operation.
* Rename the undo file to cleanup.executor.txt - So whenever llmc runs and finds this file, it will execute all undo operations and then stop.
Below are examples of prompt files and their expected behavior.
Prompt:
- IncludeDateTime
- IncludeLs
PostBuild:
- ExecuteCmd(batchCode="index.html")
---
Write a single html file "index.html". It should render some javascript, css, and HTML buttons to build a functional calculator.
Keep it colorful with good typography and elegant. Support basic operations e.g., +, -, *, /, pow, sqrt.
Give the instructions to save the file as `index.html`.
Prompt:
- IncludeDateTime
- IncludeLs
PostBuild:
---
Write a `.gitignore` file for a C# project.
The file must also exclude the `bin` and `obj` folders.
Give instructions to save the file.
Prompt:
- IncludeDateTime
- IncludeLs
PostBuild:
- RenameFile(from="goodmorning.html", to="index.html")
- ExecuteCmd(batchCode="index.html")
---
Write an HTML file with a beautiful CSS framework that shows the text "Good morning Prateek" with excellent animations and typography.
Also, keep it colorful but high contrast and easy on the eyes. After the wishes, include a paragraph with good typography and a motivational poem.
Avoid using NodeJS. Additionally, include an SVG drawing related to the theme.
Save the file with the name **goodmorning.html** and don't open it.
To use LLMC, you'll need to configure an LLM backend. Currently, Gemini is supported.
- Obtain an API key from Gemini.
- Set the API key as an environment variable:
GEMINI_API_KEY=<your-gemini-api-key>
- LLMC will automatically use this key during execution.
- Extensibility: Developers are encouraged to modify the inference code to support additional LLM backends or enhance existing features.
- Prompt Flexibility: Customize prompt structures or extend the post-build commands to suit your workflow.
We welcome contributions from the community! Follow these steps to contribute:
- Fork the repository on GitHub.
- Create a new branch for your feature:
git checkout -b feature/your-feature-name
- Implement your changes and commit them:
git commit -m "Add your-feature-name" - Push your changes to your forked repository:
git push origin feature/your-feature-name
- Open a Pull Request and describe your changes in detail.

