Here are a collection of (mostly) CLI tools that help you copy your codebase into a custom prompt for AI models like ChatGPT and Claude, that I've found on Reddit and other places:
Dates are when the tools were shared online or when I found them.
⭐⭐⭐ indicates tools that are popular (> 1k stars on GitHub).
⭐⭐⭐ code2prompt
March 17, 2024
A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
SnapSource for VS Code
July 13, 2024
SnapSource is a powerful Visual Studio Code extension that allows you to easily copy file and folder contents along with the project tree structure to your clipboard.
- https://www.reddit.com/r/webdev/comments/1e2b0sb/snapsource_for_vs_code_oneclick_copy_of_project/
- https://marketplace.visualstudio.com/items?itemName=LeonKohli.snapsource
multi-file-code-to-ai
July 14, 2024
Select multiple files and convert them to a prompt for chatGPT, claude, or deepseek.
- https://www.reddit.com/r/aipromptprogramming/comments/1e2o8m0/fed_up_with_the_bad_ux_of_all_the_other_vscode_ai/
- https://github.com/kasfictionlive/multi-file-code-to-ai
⭐⭐⭐ Repomix (formerly Repopack)
July 15, 2024
Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file.
It is perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, and Gemini.
Mify
July 15, 2024
LLM code generation paired with templates. Create backend service and update code via LLM.
- https://www.reddit.com/r/programming/comments/1e3wqk8/ive_made_llm_generate_code_for_my_code_generator/
- https://github.com/mify-io/mify-llm-editor
ai-digest
July 16, 2024
A CLI tool to aggregate your codebase into a single Markdown file for use with Claude Projects or custom ChatGPTs.
- https://www.reddit.com/r/OpenAI/comments/1e4dgj7/aidigest_copy_your_whole_codebase_into_a_custom/
- https://www.npmjs.com/package/ai-digest
Prelude
July 21, 2024
A very simple tool to build LLM prompts from your code repositories.
TxtRepo
July 21, 2024
TxtRepo is a powerful tool that allows users to interact with GitHub repositories using a simple API.
ContextForge
July 28, 2024
ContextForge is a powerful and flexible command-line tool designed to compile the contents of a development project into a single, well-structured file.
- https://www.reddit.com/r/ClaudeAI/comments/1edj6sq/how_do_you_integrate_claude_into_your_development/
- https://github.com/seeschweiler/contextforge
Repo-Documenter
August 4, 2024
Repo-Documenter is a PowerShell script that generates comprehensive documentation for a repository, including a tree view of the repository structure and the contents of specified files.
- https://www.reddit.com/r/ClaudeAI/comments/1ej7ad9/powershell_script_to_describe_code_repo_structure/
- https://github.com/esoltys/Repo-Documenter
Coding Context File Generator
August 8, 2024
Generate concise project context for AI analysis
- https://www.reddit.com/r/ClaudeAI/comments/1emg2zu/for_coders_tool_to_create_claude_repo_context/
- https://repo-distillery.vercel.app/
CodeContext
CodeContext is an app for Mac & Windows to provide code context to Language Learning Models (LLMs).
- https://www.reddit.com/r/ArtificialInteligence/comments/1enhg48/free_app_to_share_your_entire_codebase_with/
- https://github.com/DavidVeksler/CodeContext
llmcat - Copy Code from CLI to Claude
November 12, 2024
Prepare files and directories for LLM consumption
- https://www.reddit.com/r/ClaudeAI/comments/1gp2btk/llmcat_copy_code_from_cli_to_claude/
- https://github.com/azer/llmcat
Concat-Proj
November 18, 2024
A utility tool designed to help developers provide code context to AI chat assistants (like ChatGPT, Claude, etc.) by combining multiple project files into a single, well-formatted text file.
- https://www.reddit.com/r/ClaudeAI/comments/1gtl5th/script_that_combines_all_project_files_into_1_txt/
- https://github.com/licjon/concat-proj
copyall
December 2, 2024
CopyAll: Extract and Copy Directory Contents to Clipboard
- https://www.reddit.com/r/ChatGPTCoding/comments/1h4x1df/i_made_a_cli_tool_to_copy_entire_codebases_for_ai/
- https://github.com/patrickmaub/copyall
dirscribe
December 5, 2024
A CLI tool that combines contents of files with specific extensions from a directory
- https://www.reddit.com/r/devtoolsbuilders/comments/1h77npt/cli_tool_for_collecting_file_contents_and_writing/
- https://crates.io/crates/dirscribe
gptree
December 19, 2024
A CLI tool to provide LLM context for coding projects by combining project files into a single text file (or clipboard text) with directory tree structure.
- https://www.reddit.com/r/ChatGPTCoding/comments/1hgz6c1/gptree_a_cli_tool_to_generate_project_context_to/
- https://github.com/travisvn/gptree
cargo-onefile
January 15, 2025
Cargo Onefile is a Rust tool that generates a single file containing all the source code of a Rust project, primarily designed for piping source code into Large Language Models (LLMs).
- https://www.reddit.com/r/rust/comments/1i1avz8/cargoonefile_bundle_your_rust_project_into_a/
- https://github.com/exotik850/cargo-onefile
Yek
January 19, 2025
A fast tool to read text-based files in a repository or directory, chunk them, and serialize them for LLM consumption.
Files to LLM Prompt
February 11, 2025
Convert your workspace files into well-structured prompts for Large Language Models (LLMs), with special optimization for Claude's XML format.
- https://www.reddit.com/r/PromptEngineering/comments/1imp2xu/introducing_files_to_llm_prompt_a_vscode/
- https://marketplace.visualstudio.com/items?itemName=DhrxvExtensions.files-to-llm-prompt
- https://github.com/DhruvParikh1/files-to-llm-prompt
CodeSelect
February 28, 2025
A simple, interactive tool to select and share code with AI assistants like Claude and ChatGPT. Analyzes file relationships and generates context-rich output.
Your Source to Prompt
March 12, 2025
Quickly and securely turn your code projects into LLM prompts, all locally on your own machine!
AI Code Fusion
March 14, 2025
A desktop application for preparing and optimizing code repositories for AI processing and analysis.
- https://www.reddit.com/r/claude/comments/1jaj03h/ai_code_fusion_a_tool_to_optimize_your_code_for/
- https://github.com/codingworkflow/ai-code-fusion
GUI tool
16x Prompt is a GUI tool that I built to make this process easier. It helps you manage source code context and generate optimized prompts for LLMs like ChatGPT and Claude.