Show HN: Code2prompt – Generate LLM prompts from your codebase
4 points| mufeedvh | 2 years ago |github.com
I initially wrote this for personal use to utilize Claude 3.0's 200K context window and it has proven to be pretty useful so I decided to open-source it. Let me know what you think.
myyke|2 years ago
mufeedvh|2 years ago
- Rewrite the code to another language.
- Find bugs/security vulnerabilities.
- Document the code.
- Implement new features.
You can customize the prompt template to achieve any of the desired use cases. It essentially traverses a codebase and creates a prompt with all source files combined. In short, it automates copy-pasting multiple source files into your prompt and formatting them along with letting you know how many tokens your code consumes.