CodeVault is a powerful open-source tool designed for developers and data scientists to extract, analyze, and manage the structure and contents of code projects. It efficiently traverses your project directory, honoring .gitignore
rules and excluding hidden files/folders by default, while also providing an interactive GUI to let you manually exclude specific files or folders. This makes it especially useful when preparing code for analysis by AI tools, documentation, or code reviews.
✅ Project Extraction – Automatically extracts the full directory tree and file contents from a selected project folder.
✅ .gitignore Support – Reads and honors all .gitignore
files, ensuring ignored files are skipped.
✅ Hidden Items Exclusion – Ignores hidden files and folders (e.g., those starting with a dot) by default.
✅ Interactive Exclusion Manager –
- View the project structure with an expandable treeview.
- Select files or folders to exclude and remove them when needed.
- Preserve the expansion state of folders so navigation isn’t interrupted.
✅ Tree Map Visualization – Displays the project’s structure visually, helping users understand folder relationships.
✅ Tabbed Interface – View the folder tree and file contents separately in a structured manner.
✅ Export to File – Saves all extracted file contents into a single file with clear headers for each file path.
🔹 Enhanced Project Analysis – Quickly understand large codebases without manually browsing files.
🔹 AI-Ready Output – Easily prepare relevant code for AI analysis without unnecessary files.
🔹 Customizable Filtering – Exclude files or folders that aren’t needed for better focus.
🔹 User-Friendly Interface – Clean GUI with an intuitive workflow.
🔹 Open Source & Community-Driven – Free to use, modify, and contribute!
📂 Code Analysis & Review – Generate a structured overview of a project for peer reviews or study.
🤖 AI Code Processing – Prepare selected code snippets for AI-based tools.
📑 Documentation & Reporting – Extract structured code content for documentation.
🔍 Project Audits – Quickly filter out unnecessary files from large repositories.
git clone https://github.com/yourusername/CodeVault.git
cd CodeVault
CodeVault is written in Python and requires Python 3.x. Install the required package:
pip install pathspec
Note: Tkinter is required for the GUI and is usually bundled with Python installations.
python CodeVault.py
- A GUI window will prompt you to select the project folder.
- Once selected, CodeVault extracts the directory tree and file contents.
🔸 Folder Tree Tab – Displays the folder structure with an interactive tree.
🔸 File Contents Tab – Shows the contents of all included files.
1️⃣ Click Manage Exclusions to open the interactive exclusion manager.
2️⃣ In the Available Items panel, navigate and select files/folders to exclude.
3️⃣ Click Add » to move them to the Excluded Items list.
4️⃣ If needed, select items in the Excluded Items panel and click « Remove.
5️⃣ Click Apply to update the file contents view.
Once satisfied, click Save All to File to export file contents with clear headers for each file.
✔️ Python 3.x
✔️ Tkinter (usually included with Python)
✔️ pathspec (install via pip install pathspec
)
🔹 Fork the repository.
🔹 Create a new branch for your feature or bugfix.
🔹 Submit a pull request with a detailed explanation of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
💡 Thanks to the developers of pathspec for providing a robust library for ignore pattern matching.
🎉 Special thanks to the open-source community for feedback and contributions!
🚀 Enjoy using CodeVault! Happy coding! 🎯