A modern PySide6 application for easily copying the context of your code projects as a JSON object. Built to import context easily to ChatGPT and other AI tools.
- Modern PySide6 UI: Clean, responsive interface with GitHub-inspired themes
- Light & Dark Themes: Automatic theme switching with GitHub color schemes
- Tabbed File Viewing: View multiple files simultaneously in organized tabs
- Smart File Filtering: Automatically exclude common development files and directories
- Real-time Statistics: Live word count, character count, and line count tracking
- Progress Indicators: Visual feedback for AI tool limits
- Keyboard Shortcuts: Quick access to common actions
- Settings Persistence: Remembers your preferences and window state
- Light Theme: Clean GitHub-inspired light interface
- Dark Theme: Modern GitHub Dark theme (default)
- Automatic Switching: Toggle between themes with a single click
- Choose Folder: Click "Choose Folder" to select your project directory
- Browse Files: Navigate through the file tree on the left
- Select Files: Click on files to view their content in the right panel
- Copy Context: Use "Copy to Clipboard" to get JSON-formatted file data
- Paste to AI: Paste the copied JSON into ChatGPT or other AI tools
The app generates structured JSON output perfect for AI context:
[
{
"fileName": "main",
"fileType": ".py",
"filePath": "src/main.py",
"content": "# Your file content here..."
}
]
The app follows modern PySide6 patterns:
src/
├── core/ # Core functionality
│ └── theme_manager.py
├── ui/ # UI components
│ ├── main_window.py
│ ├── directory_tree_widget.py
│ ├── content_viewer_widget.py
│ └── toolbar_widget.py
└── main.py # Application entry point
-
Clone the repository:
git clone <repository-url> cd code-context-python
-
Create virtual environment:
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python main.py
- Python 3.8+
- PySide6 6.6+
The app tracks recommended limits for AI tools:
- Words: 1,100 maximum
- Characters: 12,000 maximum
Visual indicators show when you're approaching or exceeding these limits.
Ctrl+O
: Open folderCtrl+C
: Copy to clipboardCtrl+Q
: Quit application
The app automatically saves:
- Window geometry and position
- Selected theme preference
- Application settings
This is a refactored version of the original Tkinter application, now using modern PySide6 architecture with:
- Proper separation of concerns
- Signal/slot architecture
- Theme management system
- Professional UI components
Note: Screenshot shows the original interface. The new PySide6 version features a modern, tabbed interface with theme support.
Open source - feel free to use and modify for your projects!