Tools To Share Your Codebase With LLMs
Written by Nikos Vaggalis   
Tuesday, 25 March 2025

Here we take a look at Gitingest and Repomix, two tools that render a codebase suitable for LLM ingestion. Why is that useful?

When wanting to share code with a LLM for asking it to do some work on it, developers face two issues:

  • they run out of tokens since code fills up the context window quickly
  • the format of the source files might not be uniform
  • copying and pasting individual files rather than a whole code base doesn't reflect the structure and notion of the codebase

So here's two tools that help with these issues. First of all Gitingest, which promises to:

Turn any Git repository into a simple text digest of its codebase.


llm1

 

Features:

  • Easy code context: Get a text digest from a Git repository URL or a directory
  • Smart Formatting: Optimized output format for LLM prompts
  • Statistics about:
  • File and directory structure
  • Size of the extract
  • Token count
  • CLI tool: Run it as a shell command
  • Python package: Import it in your code

It has a dedicated site with an input box where you can enter the repo's URL, although you can also replace hub with ingest in any GitHub URL for the same, as in "github.com" to "gitingest.com". Even easier, there's a browser extension for the most popular browsers.

And then Repomix is:

A powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, DeepSeek, Perplexity, Gemini, Gemma, Llama, Grok, and more.

llm2

Features:

  • AI-Optimized: Formats your codebase in a way that's easy for AI to understand and process.
  • Token Counting: Provides token counts for each file and the entire repository, useful for LLM context limits.
  • Simple to Use: You need just one command to pack your entire repository.
  • Customizable: Easily configure what to include or exclude.
  • Git-Aware: Automatically respects your .gitignore files and .git/info/exclude.
  • Security-Focused: Incorporates Secretlint for robust security checks to detect and prevent inclusion of sensitive information.
  • Code Compression: The --compress option uses Tree-sitter to extract key code elements, reducing token count while preserving structure.

Repomix looks more professional by sporting a cleaner web interface, giving more options to tweak, while it can also output the result file in XML, Markdown and plain text.

In either case what do you do with the resulting file? You can give the following instructions to your LLM:

This file contains all the files in the repository combined into one.
I want to refactor the code, so please review it first.

After that you can tell it to debug, write tests or generate code.

Both projects can also be selfhosted by cloning their Github repo. There you have it, modern tooling for developers in the age of AI.

github-original

 

More Information

GitIngest

Repomix 

Related Articles

Potpie - Agentic AI On Your Codebase  

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


GNU Head Drawing Fetches $40K
28/03/2025

Eighteen items of FSF memorabilia that used to adorn the organization's offices were auctioned of last weekend at the culmination of an online auction. The highest bid, as anticipated, was for the ico [ ... ]



Kotlin 2.12 Boosts Plugin Support
26/03/2025

Kotlin 2.12 has been released with updates to the kapt and Lombok plugins, a new DSL to replace Gradle's application plugin, and a number of improvements for WASM. 


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 25 March 2025 )