Skip to content

HaolongChen/CodeVault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

🚀 CodeVault

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.


📌 Features

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.

💡 Why Use CodeVault?

🔹 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!


⏳ When to Use CodeVault?

📂 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.


🛠️ Installation Guide

1️⃣ Clone the Repository

git clone https://github.com/yourusername/CodeVault.git
cd CodeVault

2️⃣ Install Dependencies

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.


🚀 Running the Program

▶️ Launch CodeVault

python CodeVault.py

📁 Select Your Project Folder

  1. A GUI window will prompt you to select the project folder.
  2. Once selected, CodeVault extracts the directory tree and file contents.

🖥️ How to Use CodeVault

📌 Explore the Interface

🔸 Folder Tree Tab – Displays the folder structure with an interactive tree.
🔸 File Contents Tab – Shows the contents of all included files.

🛠️ Manage Exclusions

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.

💾 Save Extracted Data

Once satisfied, click Save All to File to export file contents with clear headers for each file.


📜 Requirements

✔️ Python 3.x
✔️ Tkinter (usually included with Python)
✔️ pathspec (install via pip install pathspec)


🤝 Contributing

🔹 Fork the repository.
🔹 Create a new branch for your feature or bugfix.
🔹 Submit a pull request with a detailed explanation of your changes.


📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


🙌 Acknowledgments

💡 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! 🎯

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages