https://github.com/u-c4n/codecontextor
A Tkinter file/folder viewer that displays file content in Markdown and calculates token counts for LLM contexts. Built with modern Python practices (pathlib, type hints) and supports multiple languages (English, Turkish, Russian).
https://github.com/u-c4n/codecontextor
Last synced: 5 months ago
JSON representation
A Tkinter file/folder viewer that displays file content in Markdown and calculates token counts for LLM contexts. Built with modern Python practices (pathlib, type hints) and supports multiple languages (English, Turkish, Russian).
- Host: GitHub
- URL: https://github.com/u-c4n/codecontextor
- Owner: U-C4N
- Created: 2025-02-02T11:04:02.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-01T22:47:10.000Z (7 months ago)
- Last Synced: 2025-04-28T18:12:43.107Z (5 months ago)
- Language: Python
- Size: 323 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CodeContextor v2

A specialized tool for preparing and sending source code to LLM chats. CodeContextor helps you scan project directories, calculate token usage, and format entire codebases for AI analysis and modifications.
## What's New in v2
- ๐ **Performance Optimizations**: Significantly faster processing of large markdown files
- ๐งต **Multi-threading**: Background processing prevents UI freezing during heavy operations
- ๐พ **Smart Caching**: Efficient caching for file contents, token counts, and directory listings
- ๐ **Search Functionality**: Quick filtering of files and folders
- ๐ **Enhanced UI**: Modern interface with better visualization and organization
- ๐ฒ **Tree View**: Improved file/folder display with type and size information
- ๐จ **Syntax Highlighting**: Better markdown and code visualization
- โฑ๏ธ **Progress Indicators**: Visual feedback during long operations with cancellation support
- ๐ **Lazy Loading**: Smart depth limiting to handle large directory structures## Features
- ๐ Scan and collect entire project source code
- ๐ Real-time token counting for different LLM models
- ๐ Smart directory traversal and file filtering
- โก Quick copy-paste to LLM chat interfaces
- ๐ Multi-language support (English, Turkish, Russian)
- ๐ก Intelligent context preparation for code modifications## Technical Stack
- Python 3.x with type hints
- Modern Python practices (pathlib, dataclasses)
- Tkinter for GUI with ttk styling
- Multi-threading for background processing
- Cache optimization strategies
- Source code parsing and formatting
- Token estimation for popular LLM models## Installation
```bash
git clone https://github.com/yourusername/CodeContextor.git
cd CodeContextor
pip install -r requirements.txt
```## Usage
```bash
python app.py
```### Performance Tips
- Use the search functionality to filter large directories
- Cancel long-running operations if they're taking too long
- The application automatically limits directory depth to prevent excessive recursion
- Large files are processed in the background, allowing you to continue using the interface## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
MIT License - See LICENSE file for details