HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mufeedvh
code2prompt
Rust2024–2026
mufeedvh / code2prompt

code2prompt

A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.

10Distinct people
14Mentions
0Explicit recommenders
7.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 3:30:57 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month14 dated mentions

Observed mentions: 2024-03-11 20:32:28 UTC to 2026-05-28 22:52:35 UTC.

01232024-03-01 00:00:00 UTC to 2024-04-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 commentsMar 20242024-04-01 00:00:00 UTC to 2024-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-01 00:00:00 UTC to 2024-06-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-06-01 00:00:00 UTC to 2024-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-01 00:00:00 UTC to 2024-08-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-08-01 00:00:00 UTC to 2024-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-09-01 00:00:00 UTC to 2024-10-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-10-01 00:00:00 UTC to 2024-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-11-01 00:00:00 UTC to 2024-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-12-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments2025-01-01 00:00:00 UTC to 2025-02-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments2025-02-01 00:00:00 UTC to 2025-03-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-03-01 00:00:00 UTC to 2025-04-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-04-01 00:00:00 UTC to 2025-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsApr 20252025-05-01 00:00:00 UTC to 2025-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-06-01 00:00:00 UTC to 2025-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-01 00:00:00 UTC to 2025-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-01 00:00:00 UTC to 2025-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-01 00:00:00 UTC to 2025-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-10-01 00:00:00 UTC to 2025-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-11-01 00:00:00 UTC to 2025-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-12-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2026-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-02-01 00:00:00 UTC to 2026-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-01 00:00:00 UTC to 2026-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-01 00:00:00 UTC to 2026-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-01 00:00:00 UTC to 2026-06-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsMay 2026

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Mar 20242024-03-01 00:00:00 UTC2024-04-01 00:00:00 UTC211
Apr 20242024-04-01 00:00:00 UTC2024-05-01 00:00:00 UTC000
May 20242024-05-01 00:00:00 UTC2024-06-01 00:00:00 UTC101
Jun 20242024-06-01 00:00:00 UTC2024-07-01 00:00:00 UTC000
Jul 20242024-07-01 00:00:00 UTC2024-08-01 00:00:00 UTC101
Aug 20242024-08-01 00:00:00 UTC2024-09-01 00:00:00 UTC000
Sep 20242024-09-01 00:00:00 UTC2024-10-01 00:00:00 UTC202
Oct 20242024-10-01 00:00:00 UTC2024-11-01 00:00:00 UTC000
Nov 20242024-11-01 00:00:00 UTC2024-12-01 00:00:00 UTC000
Dec 20242024-12-01 00:00:00 UTC2025-01-01 00:00:00 UTC321
Jan 20252025-01-01 00:00:00 UTC2025-02-01 00:00:00 UTC220
Feb 20252025-02-01 00:00:00 UTC2025-03-01 00:00:00 UTC101
Mar 20252025-03-01 00:00:00 UTC2025-04-01 00:00:00 UTC101
Apr 20252025-04-01 00:00:00 UTC2025-05-01 00:00:00 UTC000
May 20252025-05-01 00:00:00 UTC2025-06-01 00:00:00 UTC000
Jun 20252025-06-01 00:00:00 UTC2025-07-01 00:00:00 UTC000
Jul 20252025-07-01 00:00:00 UTC2025-08-01 00:00:00 UTC000
Aug 20252025-08-01 00:00:00 UTC2025-09-01 00:00:00 UTC000
Sep 20252025-09-01 00:00:00 UTC2025-10-01 00:00:00 UTC000
Oct 20252025-10-01 00:00:00 UTC2025-11-01 00:00:00 UTC000
Nov 20252025-11-01 00:00:00 UTC2025-12-01 00:00:00 UTC000
Dec 20252025-12-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
Jan 20262026-01-01 00:00:00 UTC2026-02-01 00:00:00 UTC000
Feb 20262026-02-01 00:00:00 UTC2026-03-01 00:00:00 UTC000
Mar 20262026-03-01 00:00:00 UTC2026-04-01 00:00:00 UTC000
Apr 20262026-04-01 00:00:00 UTC2026-05-01 00:00:00 UTC000
May 20262026-05-01 00:00:00 UTC2026-06-01 00:00:00 UTC110

What Hacker News says

3 sources

Show HN: Source to Prompt- Turn your code into an LLM prompt with more features

Your Source to Prompt-- Turn your code into an LLM prompt, but with way more features! I just made this useful tool as a single html file that lets you easily turn your coding projects into targeted single text files for use in LLM prompts for AI-aided development. Unlike the many other existing competing projects-- to name just a few: 1. [files-to-prompt](https://github.com/simonw/files-to-prompt) 2. [repo2txt](https://repo2txt.simplebasedomain.com/) 3. [code2prompt](https://github.com/mufeedvh/code2prompt) 4. [repomix](https://github.com/yamadashy/repomix) 5. [ingest](https://github.com/sammcj/ingest) 6. [1filellm](https://github.com/jimmc414/1filellm) 7. [repo2file](https://github.com/artkulak/repo2file) ...there are some real advantages to this one that make it stand out: * It's a single html file that you download to your local machi
Read the rest
ne-- that's it! just open in a modern browser like chrome and you can use it securely. * Because it's locally hosted, with no requirements like python or anything else, it's very quick to get it running on any machine, and because it's local, you can use it on your own private repos without worrying about using a github authorization token or similar annoyance. * You don't even need to be working with a repo at all, it works just as well with a regular folder of code files. Also, I added tons of quality of life improvements that were major pain points for me personally: These include laboriously re-selecting the same or very similar subset of files over and over again; now you can save a preset (either to localStorage in the browser or exported and saved as a JSON file) and dramatically speed this up. There are also a few other features to speed up the file selection process, such as quick string based filtering on file names, and common quick selection patterns (such as "select all React files"). It also keeps track of the total size in KB and lines of text that have been selected in a handy tally section which is always visible in the upper right corner, so you always know when you are reaching the maximum of the context window of whatever model you're working with. Based on my experience, I added in warnings for GPT4o and o1 and also Claude3.5 Sonnet. Before the listing of the files and their contents, it also automatically includes the hierarchical file/folder structure of the files you select, and next to each one, shows the size in KB and the number of lines, which helps give the model context about which files are the most important. I also added the ability to minify the code so you can cram more into the context window. Similarly, you can also strip out code comments, and it will tell you how much space this saved. You can also specify a "preamble" that you can save and quickly edit, as well as a "goal" where you specify what you're trying to accomplish. All of this can be included in your saved presets to save you time. I hope you find it useful!
1 points · Open discussion
I just made this useful tool as a single html file that lets you easily turn your coding projects into targeted single text files for use in LLM prompts for AI-aided development: https://github.com/Dicklesworthstone/your-source-to-prompt.h... Unlike the many other existing competing projects-- to name just a few: files-to-prompt: https://github.com/simonw/files-to-prompt repo2txt: https://repo2txt.simplebasedomain.com/ code2prompt: https://github.com/mufeedvh/code2prompt repomix: https://github.com/yamadashy/repomix ingest: https://github.com/sammcj/ingest 1filellm: https://github.com/jimmc414/1filellm repo2file: https://github.com/artkulak/repo2file ...there are some real advantages to this one that make it stand out: It's a single html file that you download to your local machine-- that's it! just open in a modern browser like chrome an
Read the rest
d you can use it securely. Because it's locally hosted, with no requirements like python or anything else, it's very quick to get it running on any machine, and because it's local, you can use it on your own private repos without worrying about using a github authorization token or similar annoyance. You don't even need to be working with a repo at all, it works just as well with a regular folder of code files. Also, I added tons of quality of life improvements that were major pain points for me personally: These include laboriously re-selecting the same or very similar subset of files over and over again; now you can save a preset (either to localStorage in the browser or exported and saved as a JSON file) and dramatically speed this up. There are also a few other features to speed up the file selection process, such as quick string based filtering on file names, and common quick selection patterns (such as "select all React files"). It also keeps track of the total size in KB and lines of text that have been selected in a handy tally section which is always visible in the upper right corner, so you always know when you are reaching the maximum of the context window of whatever model you're working with. Based on my experience, I added in warnings for GPT4o and o1 and also Claude3.5 Sonnet. Before the listing of the files and their contents, it also automatically includes the hierarchical file/folder structure of the files you select, and next to each one, shows the size in KB and the number of lines, which helps give the model context about which files are the most important. I also added the ability to minify the code so you can cram more into the context window. You can also specify a "preamble" that you can save and quickly edit, as well as a "goal" where you specify what you're trying to accomplish.
In Source to Prompt- Turn your code into an LLM prompt, but with more features

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.