Skip to content

Repository files navigation

Codebase Structure & Context Dumper for LLM Analysis 🗂️🤖

Python License LLM Ready


English Version

Interface & Context Output Preview

Application Interface Generated Context Dump Output
Application Interface Context Output Preview

Description

Specialized Python utility for automated repository scanning, visual directory tree generation, and packing codebase content into a single formatted dump file for AI analysis (ChatGPT, Claude, Gemini, DeepSeek).

Purpose

When performing refactoring or auditing large projects, manually copying dozens of codebase files into an AI chat is difficult due to folder nesting and noise (cache, virtual environments, binaries). This utility creates an ideal "tree + content" layout with strict data isolation.

Key Features

  • 🌲 Project Tree Generation: Creates a symbolic directory map.
  • 🛡️ Privacy & Security: Automatically ignores .env, API keys, tokens, .git, __pycache__, and binary files.
  • 📝 Semantic Markup: Each file is enclosed with clear boundary tags and source code extension indicators.
  • ⚙️ Flexible Configuration: Supports file extension filtering (.py, .js, .sql, .html, .css, etc.).

Tech Stack

  • Language: Python 3.9+
  • System Modules: os, sys, pathlib, re

Repository Structure

├── project_converter.py        # Base structure script
├── project_converter_cenv.py   # Enhanced configuration isolation version
├── project_converter_obnova.py # Updated context generator module
├── assets/                     # Interface and generated context previews
│   ├── gui_preview.png
│   └── output_preview.png
├── .gitignore                  # Git ignore rules
├── LICENSE                     # MIT License
└── README.md                   # Documentation

Usage

  1. Clone repository:
    git clone https://github.com/Bargaisl/llm-code-dumper.git
    cd llm-code-dumper
  2. Run converter:
    python project_converter_obnova.py

⚠️ Disclaimer & Precautions

This tool reads files from your local filesystem. Users are advised to review generated dump files before submitting them to third-party AI services or APIs to prevent unintended exposure of proprietary code or confidential credentials. The author is not responsible for any data leaks caused by improper usage.

License

Licensed under the MIT License.


Русская версия (Russian Version)

Демонстрация интерфейса и сгенерированного контекста

Графический интерфейс программы Пример сгенерированного файла контекста
Интерфейс программы Пример контекста

Описание

Специализированная Python-утилита для автоматического сканирования репозиториев, генерации визуального дерева папок и упаковки кодовой базы в единый размечанный дамп-файл для анализа с помощью ИИ (ChatGPT, Claude, Gemini, DeepSeek).

Зачем нужен этот инструмент?

При рефакторинге или аудите больших проектов вручную скопировать десятки файлов кодовой базы в диалог с нейросетью сложно из-за структуры папок и шума (кэш, виртуальные окружения, бинарники). Данная утилита формирует идеальное «дерево + содержимое» со строгой изоляцией чувствительных данных.

Ключевые возможности

  • 🌲 Построение дерева проекта: Генерация символьной карты директорий.
  • 🛡️ Защита конфиденциальности: Автоматическое исключение .env, API-ключей, токенов, .git, __pycache__ и бинарных файлов.
  • 📝 Семантическая разметка: Каждый файл помещается в дамп с четкими тегами границ и указанием типа исходного кода.
  • ⚙️ Гибкая конфигурация: Поддержка фильтров расширений (.py, .js, .sql, .html, .css и т.д.).

Стек технологий

  • Язык программирования: Python 3.9+
  • Системные модули: os, sys, pathlib, re

Структура репозитория

├── project_converter.py        # Базовый скрипт формирования структуры
├── project_converter_cenv.py   # Версия с усиленной изоляцией конфигураций
├── project_converter_obnova.py # Обновленный модуль генератора контекста
├── assets/                     # Скриншоты интерфейса и файла контекста
│   ├── gui_preview.png
│   └── output_preview.png
├── .gitignore                  # Исключения Git
├── LICENSE                     # Лицензия MIT
└── README.md                   # Техническая документация

Инструкция по использованию

  1. Клонируйте репозиторий:
    git clone https://github.com/Bargaisl/llm-code-dumper.git
    cd llm-code-dumper
  2. Запустите конвертер:
    python project_converter_obnova.py

⚠️ Предупреждение и отказ от ответственности

Данный инструмент считывает файлы с локальной файловой системы. Пользователям рекомендуется проверять сгенерированные файлы перед отправкой в сторонние сервисы ИИ или API во избежание случайной разглашения конфиденциального кода или учетных данных. Автор не несет ответственности за любые утечки данных, вызванные ненадлежащим использованием утилиты.

Лицензия

Распространяется под лицензией MIT License.

About

Automated Codebase Context Dumper & Structure Analyzer for LLM Audits | Prepares Structured Prompts for ChatGPT & Claude

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages