You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`code2prompt` makes it easy to generate prompts for LLMs from your codebase. It traverses the directory, builds a tree structure, and collects information about each file. You can customize the prompt generation using Handlebars templates. The generated prompt is automatically copied to your clipboard and can also be saved to an output file. `code2prompt` helps streamline the process of creating LLM prompts for code analysis, generation, and other tasks.
> 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!
228
-
229
239
## Templates
230
240
231
241
`code2prompt` comes with a set of built-in templates for common use cases. You can find them in the [`templates`](templates) directory.
@@ -312,9 +322,14 @@ print(result["prompt"])
312
322
313
323
[](https://star-history.com/#mufeedvh/code2prompt&Date)
314
324
315
-
## How is it useful?
316
325
317
-
`code2prompt` makes it easy to generate prompts for LLMs from your codebase. It traverses the directory, builds a tree structure, and collects information about each file. You can customize the prompt generation using Handlebars templates. The generated prompt is automatically copied to your clipboard and can also be saved to an output file. `code2prompt` helps streamline the process of creating LLM prompts for code analysis, generation, and other tasks.
326
+
## License
327
+
328
+
Licensed under the MIT License, see <ahref="https://github.com/mufeedvh/code2prompt/blob/master/LICENSE">LICENSE</a> for more information.
329
+
330
+
## Liked the project?
331
+
332
+
If you liked the project and found it useful, please give it a :star: !
318
333
319
334
## Contribution
320
335
@@ -326,10 +341,3 @@ Ways to contribute:
326
341
- Help me document the code
327
342
- Spread the word
328
343
329
-
## License
330
-
331
-
Licensed under the MIT License, see <ahref="https://github.com/mufeedvh/code2prompt/blob/master/LICENSE">LICENSE</a> for more information.
332
-
333
-
## Liked the project?
334
-
335
-
If you liked the project and found it useful, please give it a :star: !
0 commit comments