Latest / AI & agents

code2prompt

github.com · Open source · Active

Turns a codebase into a single prompt for large language models

Visit github.com ↗Share

Stars
7.8k
Forks
458
Open issues
9
Last commit
Releases
6
Found
2 years ago

GitHub figures as of . They are context, not a ranking.

code2prompt is a command-line tool that converts a codebase into one prompt, so an LLM can read the whole project in a single context. It is written in Rust and also available as a Python package, and it suits developers who want to share a whole project with chat models in one piece.

Repository description on GitHub: “A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.”

What it does

  • Converts a directory tree into one prompt document
  • Works from the command line
  • Available as a Rust crate and a Python package
  • Documentation site and a community Discord

Good for

  • Paste a whole repository into a chat model for a code review.
  • Prepare project context for an AI assistant in a single file.

Suits: Developers who share whole codebases with AI chat models.

What you can try

Install it from Homebrew, the channel it was listed on; a crate is also on crates.io and a Python package on PyPI.

Install

brew install code2prompt
cargo add code2prompt
pip install code2prompt-rs

Confirmed against the package registry. Read the project’s own instructions before running anything.

Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.

Found vs. released

Kip first saw code2prompt on , when its repository was created; it is packaged in Homebrew. The oldest published release on GitHub is v1.0.0, dated . Its first tagged release came 7 days after it was found. 6 releases have been published in total; the latest is v4.2.0 ().

Day-7 and day-30 updates

Day 7 no new release

  • No tagged release was published in the first 7 days after it was found (GitHub release dates).

Checked , later than day 7 because tracking began after.

Day 30 1 release shipped

  • 1 release in the first 30 days: v1.0.0 (16 Mar 2024)

Checked , later than day 30 because tracking began after.

Release timeline every entry links to its source

Releases per month, last 24 months (3 in total, busiest month 1).
  1. Repository created on GitHub: mufeedvh/code2prompt
  2. Found: its repository was created; it is packaged in Homebrew. Homebrew
  3. Release v1.0.0
  4. Release v1.1.0
  5. Release v2.0.0
  6. Release v3.0.2
  7. Release v4.0.2
  8. Release v4.2.0
  9. Day-7 check recorded by Kip (details)
  10. Day-30 check recorded by Kip (details)

Quick answers

When was code2prompt released?
Its first tagged release on GitHub is dated 16 Mar 2024. Kip found it on Homebrew on 9 Mar 2024.
Is code2prompt open source?
Its source is public on GitHub at mufeedvh/code2prompt under the MIT licence.
What does code2prompt run on?
Command line, Library.
Is code2prompt free?
It is open source, so the code is free to read and run; check the licence for terms.
Is code2prompt still maintained?
Yes. It had a commit or release in the last 90 days as of the latest check.

Provenance

SourceRecordLast checked
Homebrewlisting
official API record
GitHub repositorymufeedvh/code2prompt
REST API record
GitHub Releasesrelease list
REST API record

Stable ID brew-code2prompt. Summary written by KipFound’s editor.

Share

Similar tools

More in AI & agents

Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.