Metadata-Version: 2.1
Name: codeconcat
Version: 0.1.7
Summary: A tool to concatenate a folders into a single text file
Home-page: https://github.com/lguibr/CodeConcat
Author: Luis Guilherme
Author-email: lgpelin92@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/lguibr/CodeConcat/issues
Project-URL: Documentation, https://github.com/lguibr/CodeConcat/blob/main/README.md
Project-URL: Source Code, https://github.com/lguibr/CodeConcat
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# CodeConcat

[![CI](https://github.com/lguibr/codeconcat/workflows/CI/badge.svg)](https://github.com/lguibr/codeconcat/actions)
[![PyPI](https://img.shields.io/pypi/v/codeconcat.svg)](https://pypi.org/project/codeconcat/)
[![Python Version](https://img.shields.io/pypi/pyversions/codeconcat.svg)](https://pypi.org/project/codeconcat/)
[![License](https://img.shields.io/pypi/l/codeconcat.svg)](https://github.com/lguibr/codeconcat/blob/main/LICENSE)

**CodeConcat** is a powerful command-line tool designed to simplify the process of concatenating the entire contents of local directories or code repositories into a single text file. This tool is particularly useful for developers who need to prepare large datasets for analysis or training in machine learning models, especially those that benefit from understanding the broader context provided by having complete codebases in a single file.

## Key Features

- **Efficiency**: Quickly concatenate entire directories or repositories.
- **Flexibility**: Use include and exclude patterns to control exactly what gets included in the output.
- **Clarity**: Each file's path is included in the output, maintaining the context necessary for large language models.
- **Simplicity**: A straightforward command-line interface that integrates easily into any developer's workflow.

## Installation

You can install CodeConcat directly from PyPI:

```bash
pip install codeconcat
```

## How to Use

### Basic Command Structure

```bash
codeconcat <source_path> <destination_file> [--exclude <pattern>] [--whitelist <pattern>]
```

### Parameters

- `<source_path>`: Path to the directory or repository to process.
- `<destination_file>`: Path where the concatenated output will be saved.
- `--exclude <pattern>`: (Optional) Exclude files matching this pattern.
- `--whitelist <pattern>`: (Optional) Only include files matching this pattern.

### Examples

**Basic Concatenation:**

```bash
codeconcat ./my-repo output.txt
```

**Using Exclude Patterns:**

```bash
codeconcat ./my-repo output.txt --exclude "*.log"
```

**Using Whitelist Patterns:**

```bash
codeconcat ./my-repo output.txt --whitelist "*.py"
```

## Contributing

Contributions to CodeConcat are welcome! Please check out the [issues on GitHub](https://github.com/lguibr/codeconcat/issues) or submit a pull request if you have an improvement or bug fix.

## License

CodeConcat is distributed under the MIT license. See the [LICENSE](LICENSE) file for more details.


