git404hub

what is code2prompt fr?

mufeedvh/code2prompt — explained in plain English

Analysis updated 2026-06-24

7,343RustAudience · developerComplexity · 2/5LicenseSetup · easy

tl;dr

A command-line tool that packages an entire code project into a single formatted block of text you can paste into an AI assistant, with token counting, gitignore support, and customizable output templates.

vibe map

mindmap
  root((code2prompt))
    What it does
      Codebase to AI prompt
      Token counting
      File collection
    Tech Stack
      Rust
      Python
      Handlebars
    Interfaces
      CLI tool
      Python SDK
      Local server mode
    Features
      gitignore support
      Git diff inclusion
      Custom templates
    Audience
      AI-assisted developers
      Vibe coders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Instantly package your entire codebase into a single AI-ready prompt to ask ChatGPT or Claude to review, explain, or refactor it.

VIBE 2

Use the Python SDK to integrate automated codebase-to-prompt conversion into your own AI agent or scripting workflow.

VIBE 3

Add git diffs or commit logs to your AI prompt to ask for a code review of your latest changes.

what's the stack?

RustPythonHandlebars

how it stacks up fr

mufeedvh/code2prompttimvisee/ffsendjtroo/kanata
Stars7,3437,3397,322
LanguageRustRustRust
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Install via Cargo, Homebrew, pip, or pre-built binary, no external services or API keys required to run the tool itself.

Open source under the MIT License, use freely for any purpose, including commercial projects.

in plain english

code2prompt is a command-line tool that takes a software project on your computer and converts it into a single block of text formatted for use with an AI language model. When you want to ask an AI assistant about a codebase, you typically need to paste the relevant code into the chat. Doing that manually is tedious, especially for large projects with many files. code2prompt automates that process. You point the tool at a directory, and it walks through the files, collects their contents, and formats everything into a structured prompt. It respects .gitignore rules, which means it skips files your project has already marked as unimportant, like compiled output or environment files. It also tracks token counts, which is useful because AI models have limits on how much text they can process at once. The tool has several components. The core is a Rust library that handles file reading and formatting at high speed. On top of that is a command-line interface with a minimal interactive mode, and a Python package for developers who want to integrate this behavior into their own scripts or AI agent workflows. There is also a local server mode that allows AI agent applications to access your codebase without you needing to pipe files around manually. Templating is supported through Handlebars, a templating format, so you can customize how the output is structured for different kinds of questions or tasks. Git integration is also included, letting you add diffs, commit logs, or branch comparisons to the prompt. Installation is available via Cargo (the Rust package manager), Homebrew on macOS, pip for the Python SDK, or by downloading a pre-built binary. The project is open source under the MIT License.

prompts (copy fr)

prompt 1
I have a Node.js project in ~/myapp. Use code2prompt to package it into a prompt I can paste into Claude to ask for a security review. What command do I run?
prompt 2
How do I use code2prompt with a custom Handlebars template so the output is formatted specifically for asking an AI to write unit tests for each file?
prompt 3
I want to use the code2prompt Python SDK inside a script that automatically sends a repo to an AI API for analysis. Show me a minimal example.
prompt 4
How do I run code2prompt in local server mode so an AI agent can query my codebase without me piping files manually?

Frequently asked questions

what is code2prompt fr?

A command-line tool that packages an entire code project into a single formatted block of text you can paste into an AI assistant, with token counting, gitignore support, and customizable output templates.

What language is code2prompt written in?

Mainly Rust. The stack also includes Rust, Python, Handlebars.

What license does code2prompt use?

Open source under the MIT License, use freely for any purpose, including commercial projects.

How hard is code2prompt to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is code2prompt for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.