raphaelmansuy / code2prompt
Code2Prompt is a powerful command-line tool that simplifies the process of providing context to Large Language Models (LLMs) by generating a comprehensive Markdown file containing the content of your codebase. ⭐ If you find Code2Prompt useful, consider giving us a star on GitHub! It helps us reach more developers and improve the tool. ⭐
Why this job: works in the areas we cover, but does not say which job it does

What it does
- Holistic Codebase Representation. Generate a well-structured Markdown prompt that captures your entire project's essence, making it easier for LLMs to understand the context.
- Intelligent Source Tree Generation. Create a clear, hierarchical view of your codebase structure, allowing for better navigation and understanding of the project.
- Customizable Prompt Templates. Tailor your output using Jinja2 templates to suit specific AI tasks, enhancing the relevance of generated prompts.
- Smart Token Management. Count and optimize tokens to ensure compatibility with various LLM token limits, preventing errors during processing.
- Gitignore Integration. Respect your project's .gitignore rules for accurate representation, ensuring that irrelevant files are excluded from processing.
Get started
No single install command. Read the steps in the README (opens in new tab)
- Maintenance
- Active
- Last commit 4 months ago
- Stars
- 887
- On GitHub
- Licence
- MIT
- Allows business use
- Downloads for
- None listed
- No release files
- Latest version
- None yet
- No releases
- Built with
- Python
- 88% of the code
Is it looked after?
- Contributors
- Not stated
- Last 90 days
- Issues
- 30% closed
- 7 still open
- Pull requests
- 17 merged
- 3 waiting
- Releases
- None
- Never published
Similar repos
| Repo | Stars | Last commit | Licence | Downloads for |
|---|---|---|---|---|
| K-Dense-AI / claude-scientific-writer | 2,572 | 5 days ago | MIT | No downloads |
| ethen8181 / machine-learning | 3,500 | 38 days ago | MIT | No downloads |
More: languages, topics and project record
Languages
- Python 88%
- Jinja 12%
- Shell <1%
Topics
- cli
- python3
- tools
- llm
Project record
- JobOther AI tools
- StatusListed
- Commits142
- Forks58
- Watching6
- Stars in 28 days+2
- CreatedMar 19, 2024
- First seen by usNov 7, 2026
- CheckedNov 8, 2026
