What it does
Code2Prompt reads a software project and turns it into a single, well-organised piece of text that you can paste into an AI like ChatGPT or Claude.
It shows the folder layout, lets you include or leave out files, follows the project's ignore rules, counts tokens (the units AI models measure text in) and lets you shape the output with templates.
It comes as a command-line tool with an interactive mode, a Python library, an MCP server for AI agents, and a skill for coding agents.
Who it's for
Programmers who share code with AI chatbots or build AI coding tools.
Can I use it without coding?
Developers only. It is a command-line tool for programmers. New to this? Start here.
Can I run it?
- Cost
- FreeNothing to pay or sign up for.
- Computer
- An ordinary computer is fine
- Privacy
- Runs on your own device: your data stays with you
- API key
- Not needed
Try it
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
- Only download from the official GitHub page or the official download page above. Copies with similar names exist for many popular projects.
- License (MIT): Very permissive: free to use, change and share, including for business.
- More on staying safe