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. Last updated on December 19, 2024.
⭐⭐⭐ 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.
https://github.com/mufeedvh/code2prompt
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://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.
https://github.com/yamadashy/repomix
Mify
July 15, 2024
LLM code generation paired with templates. Create backend service and update code via LLM.
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.
https://news.ycombinator.com/item?id=41021298
https://github.com/aerugo/prelude
TxtRepo
July 21, 2024
TxtRepo is a powerful tool that allows users to interact with GitHub repositories using a simple API.
https://github.com/matan1905/TxtRepo
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://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://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://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://github.com/licjon/concat-proj
copyall
December 2, 2024
CopyAll: Extract and Copy Directory Contents to Clipboard
https://github.com/patrickmaub/copyall
dirscribe
December 5, 2024
A CLI tool that combines contents of files with specific extensions from a directory
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://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
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.