mufeedvh/code2prompt
A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
This tool helps developers transform their entire codebase into a single, well-structured text prompt for Large Language Models (LLMs). It takes your project directory as input and outputs a formatted text string that includes your code, file structure, and optional Git metadata. Developers working with AI models for code-related tasks, like debugging or generating documentation, will find this useful.
7,220 stars. Actively maintained with 7 commits in the last 30 days.
Use this if you need to feed an entire software project's code context to an LLM for analysis, summarization, or code generation without manually copying files.
Not ideal if you primarily work with natural language data or only need to process small, isolated code snippets for LLMs.
Stars
7,220
Forks
407
Language
Rust
License
MIT
Category
Last pushed
Mar 02, 2026
Commits (30d)
7
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/prompt-engineering/mufeedvh/code2prompt"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Recent Releases
Related tools
shcherbak-ai/contextgem
ContextGem: Effortless LLM extraction from documents
ShahzaibAhmad05/gitree
An upgrade from "ls" for developers. An open-source tool to analyze folder structures and to...
nicepkg/ctxport
Copy AI conversations as clean Markdown Context Bundles — one click from ChatGPT, Claude,...
nikolay-e/treemapper
Export your entire codebase to ChatGPT/Claude in one command. Structure + contents in YAML/JSON...
WecoAI/weco-cli
The Platform for Self-Improving Code. Ideal for GPU kernels, ML model development, feature...