Note: This entire project has been generated by AI, through an iterative process whereby it constantly improves itself in response to user direction via the prompt.
The Builder project is a Go program that automates the process of generating and updating code based on user prompts. It leverages the power of AI to generate code and README files, making it easier for developers to iterate on their projects.
- Generates code based on user prompts
- Overwrites specified files with the generated code
- Creates a new Git branch for each code generation iteration
- Generates a README.md file describing the purpose and functionality of the main code file
- Utilizes the Anthropic API for AI-powered code generation
- Handles API errors and retries failed requests
- Escapes and unescapes HTML entities in the generated code
- Trims unnecessary whitespace and backticks from the generated code
- Set the
API_KEY
environment variable in a.env
file. - Run the program with the
--file
flag to specify the file path to overwrite with the generated code. - Enter a prompt describing the desired changes or additions to the code.
- The program will generate new code based on the prompt and overwrite the specified file.
- A new Git branch will be created with the generated code and README.md file.
- The changes will be committed to the new branch.
API_KEY
: The API key for the Anthropic API, set in the.env
file.--file
: The file path to overwrite with the generated code (default:./main.go
).
- github.com/joho/godotenv: Used for loading environment variables from the
.env
file.
Contributions to the Builder project are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the project's GitHub repository.
This project is licensed under the MIT License.