CLI Tools Collection

A collection of CLI tools to combine multiple source code files into one for prompting.

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.

code2prompt

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://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.

https://github.com/yamadashy/repomix

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.

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://txtrepo.com/

https://github.com/matan1905/TxtRepo

ContextForge

July 28, 2024

ContextForge

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

llmcat

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

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.

16x Prompt

Download 16x Prompt

Join 5000+ users from tech companies, consulting firms, and agencies.