{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "mufeedvh-code2prompt--turn-a-repo-into-one-llm-prompt",
 "repo": "mufeedvh/code2prompt",
 "repo_url": "https://github.com/mufeedvh/code2prompt",
 "repo_slug": "mufeedvh-code2prompt",
 "title": "Turn a whole repo into one prompt for an LLM",
 "page_title": "How to turn a whole repo into one prompt for an LLM with Code2prompt",
 "summary": "Point Code2prompt at a folder to get a formatted prompt with the source tree and files, copied or saved.",
 "who": "A developer who keeps copying files one by one into a chat window to ask about a codebase.",
 "problem": "Manually gathering and formatting files for an LLM is slow and you never know how many tokens you are sending.",
 "outcome": "One structured prompt of your project, with a token estimate, on your clipboard or in a file.",
 "steps": [
  "Install with `cargo install code2prompt` or `brew install code2prompt`",
  "Run `code2prompt .` in your project; output goes to stdout, add -c to copy it to the clipboard",
  "Save it instead with `code2prompt path/to/project --output-file prompt.txt`",
  "Check the token estimate before pasting so you stay inside your model's context window",
  "Paste the prompt into your LLM with your question"
 ],
 "agent_prompt": "Install mufeedvh/code2prompt and generate a prompt for <project folder> saved to prompt.txt. Tell me the token estimate, and if it is over <limit> tokens, rerun it excluding <folders> with glob filters.",
 "agents": [
  "any"
 ],
 "difficulty": "Beginner",
 "time": "5 minutes",
 "basis": "readme",
 "caveat": "The token count is an estimate: the README says the full rendered prompt is not re-tokenized. Check that no secrets are in the files before sending them to a hosted model.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "Cargo, Homebrew, or pip for the Python SDK; binaries are also on the releases page",
  "Git, Rust and Cargo only if you build from source",
  "Optional: the wayland feature flag for clipboard support on Wayland systems"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/mufeedvh-code2prompt/turn-a-repo-into-one-llm-prompt/",
 "md": "https://dedupedai.com/use-cases/mufeedvh-code2prompt/turn-a-repo-into-one-llm-prompt/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/mufeedvh-code2prompt--turn-a-repo-into-one-llm-prompt.json",
 "api_version": "v1"
}
