Desktop App Productivity ★ 7,771 stars on GitHub

code2prompt

Easily package your entire coding project into a clean, organized text prompt for artificial intelligence models.

Guide and Overview

What it does in plain English

Code2Prompt gathers all the files inside your software project and combines them into one cohesive document. It automatically respects your privacy rules and hidden folders, saving you hours of manual copying and pasting. You can then feed this single organized file directly to artificial intelligence assistants to get accurate coding help.

Who it’s for

  • Software developers working with artificial intelligence coding assistants who need to share project context.
  • Programmers looking to audit or review large directories of code files all at once.
  • Automation creators building custom tools that feed project files into large language models.

Key features

  • Smart File Selection: Automatically follows your existing ignore rules so sensitive or unnecessary files stay out of your prompts.
  • Token Counting: Gives you a helpful estimate of how large your prompt will be before sending it to an AI model.
  • Custom Layouts: Organize your output files using flexible templates to suit different artificial intelligence assistants.
  • Git Awareness: Includes recent history, changes, and branch comparisons directly into your project summary.
  • Interactive Screen: Offers an easy-to-use terminal interface for selecting folders and configuring your outputs on the fly.

How to install (Download)

  • Download for Windows (.exe)
  • For Mac users with Homebrew, run: brew install code2prompt
  • For Python users, install the package via pip: pip install code2prompt-rs

Pros and Cons

  • Pros: Completely free and open-source, lightning fast, saves immense amounts of manual copy-pasting time.
  • Cons: Runs through a command-line interface which may require a brief learning period for non-technical users.

Optional commercial services unrelated to the open-source developer. Clicking an #ad link helps fund HubHum at no extra cost to you.

  • ★ Top Recommended — Systeme.io: Free-forever all-in-one platform to build landing pages, newsletters, and automated workflows with zero monthly fees — Activate Systeme.io → (#ad)
  • AdGuard: Block intrusive ads, tracking scripts, and phishing domains system-wide across all browsers and desktop apps — AdGuard (#ad)
  • InterServer: Launch and host self-hosted web apps 24/7 on managed Linux cloud VPS servers starting at $3/month — InterServer (#ad)

Official Source & Credits: Official Source / Credits

Affiliate transparency (#ad): Some links on this page are affiliate links. If you choose to activate a service through them, we may earn a commission at no extra cost to you.

Your Saved Favorites

Your favorite apps are saved right here in this browser.


Sign in with one click to link your GitHub profile and sync favorites.