Metadata-Version: 2.4
Name: codecapsule
Version: 1.0.4
Summary: Transform entire projects into portable JSON capsules for easy sharing and LLM processing
Project-URL: Homepage, https://github.com/joshschmelzle/codecapsule
Project-URL: Bug Tracker, https://github.com/joshschmelzle/codecapsule/issues
Author-email: Josh Schmelzle <josh@joshschmelzle.com>
License: BSD 3-Clause License
        
        Copyright (c) 2025, jsz
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# CodeCapsule 🚀📦

## Overview

CodeCapsule is a powerful Python utility that transforms entire project directories into a single, portable JSON file. Perfect for sharing code with AI models, archiving projects, or creating compact code representations.

## Features

- 🌐 Convert entire project structures to JSON
- 🧩 Supports multiple programming languages
- 🔍 Configurable file inclusion/exclusion
- 💡 Ideal for LLM code analysis and sharing

## Installation

Install CodeCapsule using pip:

```bash
pip install codecapsule
```

## Quick Start

### Basic Usage

```bash
# Convert current project to JSON
codecapsule

# Convert a specific project directory
codecapsule /path/to/your/project

# Save to a specific output file
codecapsule /path/to/project -o project_capsule.json
```

## Filtering and Handling

CodeCapsule provides robust file processing with the following features:

- 🚫 Automatically excludes:
  - Binary files
  - Large executables (`.exe`, `.dll`, `.so`)
  - Compiled Python files (`.pyc`)
  - Version control directories (`.git`)
  - Virtual environments (`.venv`)
  - Development databases

- 🔍 File Content Detection
  - Uses UTF-8 encoding
  - Skips files that cannot be decoded
  - Detects binary files using null-byte heuristic

## Example Output

```json
[
  {
    "path": "src/main.py",
    "content": "# Full contents of the Python file"
  },
  {
    "path": "README.md", 
    "content": "# Project documentation"
  }
]
```

## Limitations

- Large files may impact performance
- Only text-based files are processed
- Some binary or complex file types are automatically excluded

## Use Cases

- 📤 Sharing entire project contexts with AI models
- 🗄️ Lightweight project archiving
- 🔬 Code analysis and exploration

## License

BSD-3 License - See `LICENSE` file for details.

## Requirements

- Python 3.9+
- No external dependencies

## Disclaimer

CodeCapsule is designed for code sharing and analysis. Always review JSON contents before sharing sensitive code.