RadarTopicsBuildersWeeklyReads
Open Source Radar
mufeedvh/

code2prompt

GitHubWebsite

Code2Prompt is a Rust-based CLI tool that converts a codebase into a single LLM prompt, with templating, token tracking, and Git-aware features. It supports clipboard, file output, and multiple installation options.

7.5kstars
428forks
20issues
MITlicense
2024since
Star historydaily snapshots by VibeCrowd

Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).

Alternatives & relatedmatched by topic overlap
Reviewgenerated from repository data · Aug 5, 2026

What it is

Code2Prompt is a tool to ingest codebases and format them for Large Language Models. It provides a CLI and TUI, with features for filtering, templating, token tracking, and integration with Git data to include diffs and logs in prompts.

How it works

The project comprises a Rust core library and a CLI, designed to read code while respecting .gitignore, apply templates (Handlebars), and output a structured prompt. It supports reading multiple file formats and tracking token usage to fit within LLM context limits.

Getting started

Install options include:

cargo install code2prompt

To enable Wayland clipboard integration:

cargo install --features wayland code2prompt

Alternatively:

brew install code2prompt
pip install code2prompt-rs

Basic usage examples:

code2prompt .
code2prompt path/to/project --output-file prompt.txt

Recent releases

  • v4.2.0 Release refs/tags/v4.2.0 (2025-12-11)
  • v4.0.2 Release refs/tags/v4.0.2 (2025-09-18)
  • v3.0.2 v3.0.2 (2025-04-09)
  • v2.0.0 v2.0.0 (2024-09-13)
  • v1.1.0 v1.1.0 (2024-04-15)

Traction

Stars: 7513; Forks: 428; Open issues: 20

Behind the repo

The project is comprised of a core Rust library and a CLI tool, with bindings and integration across Python (code2prompt-rs) and a release page for binaries. (No external startup/company details provided in the README.)

Caveats

License: MIT; Created: 2024-03-09; Last push: 2026-06-29

SharePost on XLinkedIn
All trending reposRevenue-verified startups →