Skip to content

Script to concatenate repository files into a single file, respecting '.gitignore'. Ideal for AI analysis prep and code reviews.

License

Notifications You must be signed in to change notification settings

gundurraga/repo-concatenate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo Concatenator

Supercharge your LLM interactions with full repository context.

What it does

Repo Concatenator creates a single file containing your entire codebase, making it easy to feed your project's context into Large Language Models (LLMs) like GPT-4.

Key Features

  • Respects .gitignore rules
  • Handles binary files and empties
  • Smart truncation for large files (e.g., JSON)
  • Works with Python and JavaScript
  • Customizable to fit your workflow

Quick Start

Python

wget https://raw.githubusercontent.com/gundurraga/repo-concatenate/main/repo_concatenate.py
python repo_concatenate.py

JavaScript

wget https://raw.githubusercontent.com/gundurraga/repo-concatenate/main/repo_concatenate.js
npm install fs path url
node repo_concatenate.js

Your consolidated codebase will be saved as {repo_name}.txt in the current directory.

Output

  1. AI-friendly instructions
  2. Repo stats
  3. Folder structure
  4. File index
  5. Full file contents (with handy navigation headers)

Why use Repo Concatenator?

  • LLM-optimized: Perfect for providing full context to AI coding assistants
  • Time-saver: No more copy-pasting multiple files
  • Flexible: Customizable for various project types and sizes
  • Lightweight: No complex dependencies or setups

Contribute

Got ideas? Found a bug? Contributions are welcome! Open an issue or send a pull request on our GitHub repository.

License

MIT License. Go wild, just give credit where it's due. See the LICENSE file for details.

About

Script to concatenate repository files into a single file, respecting '.gitignore'. Ideal for AI analysis prep and code reviews.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published