#10 · Primary category: Prompt Engineering Tools
code2prompt
A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
Project last updated:06/29/26
GitHub Stars
7.6K
Forks
437
Contributors
38
License
MIT
Why we included this project
Anyone who feeds a codebase to a language model knows the slow part: assembling the context, not asking the question. Code2Prompt handles that assembly for you. It walks your project, builds a source tree, and packages the relevant files into one structured prompt you can paste into ChatGPT or any other model. Handlebars templates let you define reusable prompt layouts, and the token counter keeps you inside a model's context window before a run fails halfway. It runs as a plain CLI or an interactive terminal UI, and you can call it from Python when you want to wire context into an agent or a small MCP server. Teams that prepare code context by hand every day will find this a genuine timesaver rather than another wrapper around a chat interface.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
awesome-nano-banana-pro-prompts
🍌 World's largest Nano Banana Pro prompt library — 10,000+ curated prompts with preview images, 16 languages. Google Gemini AI image generation. Free & open source.
prompt-master
A Claude skill that writes the accurate prompts for any AI tool. Zero tokens or credits wasted. Full context and memory retention
chatgpt_system_prompt
A collection of GPT system prompts and various prompt injection/leaking knowledge.
awesome-nanobanana-pro
🚀 An awesome list of curated Nano Banana pro prompts and examples. Your go-to resource for mastering prompt engineering and exploring the creative potential of the Nano banana pro(Nano banana 2) AI image model.
awesome-gpt-image-2
🚀 World's largest GPT Image 2 prompt library, updated daily — 2000+ curated prompts with preview images, 16 languages. OpenAI's next-gen image model with pixel-perfect text rendering, cross-image consistency, and commercial-grade illustration. Free & open source.