Metadata-Version: 2.1
Name: gpt_context_builder
Version: 1.0.1
Summary: A tool to build GPT context.
Author-email: Yuichiro Masui <masui@masuidrive.jp>
License: Apache License 2.0
        
        Copyright (c) 2024 Yuichiro Masui
        
        Licensed under the Apache License, Version 2.0
        http://www.apache.org/licenses/LICENSE-2.0
        
Project-URL: Homepage, https://github.com/masuidrive/gpt-context-builder
Project-URL: Repository, https://github.com/masuidrive/gpt-context-builder.git
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flask>=2.0.0
Requires-Dist: pathspec>=0.9.0
Requires-Dist: tiktoken>=0.3.0
Requires-Dist: click>=8.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: tox>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: isort>=5.0.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: wheel>=0.40.0; extra == "dev"

# GPT Context Builder

A web-based tool for creating context blocks for ChatGPT from local files.

![screenshot](https://github.com/masuidrive/gpt-context-builder/blob/main/screenshot.png?raw=true)

## Features

- Browse and select local files through a tree view interface
- Generate formatted content blocks (XML or Markdown code blocks)
- Track token count for GPT-4 context window
- Copy formatted content to clipboard for easy pasting into ChatGPT
- Automatic handling of special characters and code blocks
- Support for .gitignore patterns

## Installation

```bash
pip install gpt-context-builder
```

## Usage

Basic usage:
```bash
gpt-context-builder
```

With options:
```bash
gpt-context-builder --port 8000 --root /path/to/project
```

Options:
- `--port`: Specify the port number (default: 5432)
- `--root`: Specify the root directory to serve (default: current directory)
- `--help`: Show help message

## Output Formats

1. XML Format:
```xml
<content filename="path/to/file.py">
file content here
</content>
```

2. Code Block Format:
````markdown
```path/to/file.py
file content here
```
````

## Author

- [Yuichiro Masui](https://github.com/masuidrive)

## Repository

- https://github.com/masuidrive/gpt-context-builder

## License

Apache License 2.0
