/gpt-context-builder

Primary LanguageHTMLOtherNOASSERTION

GPT Context Builder

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

screenshot

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

pip install gpt-context-builder

Usage

Basic usage:

gpt-context-builder

With options:

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:
<content filename="path/to/file.py">
file content here
</content>
  1. Code Block Format:
```path/to/file.py
file content here
```

Author

Repository

License

Apache License 2.0