UNPKG

git-contextor

Version:

A code context tool with vector search and real-time monitoring, with optional Git integration.

236 lines (186 loc) 10.5 kB
# Git Contextor Features Overview Git Contextor is a comprehensive code context tool that bridges your repository with AI capabilities. Here's an overview of all available features. ## Core Features ### 🔍 Semantic Search - **Natural Language Queries**: Search your codebase using plain English - **Vector-based Similarity**: Find contextually relevant code, not just keyword matches - **Multi-language Support**: Works with JavaScript, TypeScript, Python, Java, C++, and more - **Smart Chunking**: Intelligent code splitting that preserves function and class boundaries ### 💬 AI Chat - **Conversational Interface**: Ask questions about your codebase and get detailed answers - **Context-aware Responses**: AI has access to relevant code context for accurate answers - **Multiple Context Types**: General, architecture, and security-focused conversations - **Streaming Responses**: Real-time response generation for better user experience ### 🚀 Real-time Monitoring - **File Watching**: Automatically detects and indexes changes to your codebase - **Live Updates**: Search results stay current as you modify files - **Activity Logging**: Track indexing progress and file changes - **Debounced Updates**: Efficient batching of file changes to prevent excessive reindexing ### 🌐 Web Dashboard - **Intuitive Interface**: Easy-to-use web UI for all Git Contextor features - **Repository Browser**: Explore your codebase structure directly in the browser - **Search Interface**: Visual search with syntax highlighting and file previews - **Chat Interface**: Conversational AI interface with context visualization - **Configuration Panel**: Manage settings without editing JSON files ## Advanced Features ### 🔄 Collection Summary - **AI-Generated Overview**: Automatic high-level summary of your entire repository - **Cluster Analysis**: Groups related code into logical clusters - **Architecture Insights**: Understand the overall structure and patterns in your codebase - **Enhanced Context**: Better AI responses by providing repository overview first ### 🤝 Sharing & Collaboration - **Secure Sharing**: Share repository access with time-limited, query-limited tokens - **Public URLs**: Generate shareable links for code review and collaboration - **Tunnel Integration**: Expose your local instance publicly using ngrok, localtunnel, or serveo - **Access Control**: Fine-grained permissions and usage tracking ### 📊 Metrics & Monitoring - **Performance Metrics**: Track indexing performance, memory usage, and system health - **Repository Statistics**: File counts, chunk statistics, and indexing progress - **Error Tracking**: Monitor and debug indexing issues - **Usage Analytics**: Track search queries and API usage ### 🔗 Integration APIs - **REST API**: Comprehensive API for programmatic access - **Model Context Protocol (MCP)**: Standard protocol for AI tool integration - **File Browser API**: Programmatic access to repository structure and file contents ## AI & ML Features ### 🧠 Multiple AI Providers - **OpenAI**: GPT-4, GPT-3.5, and embedding models - **Google Gemini**: Gemini Pro and embedding models - **Local Models**: Offline processing with Transformers.js - **Flexible Configuration**: Mix and match providers for embeddings vs. chat ### 📊 Embedding Options - **Cloud Embeddings**: High-quality OpenAI and Google embeddings - **Local Embeddings**: Privacy-focused offline processing - **Configurable Dimensions**: Optimize for speed vs. accuracy - **Caching**: Efficient embedding reuse and storage ### 🎨 Vision Capabilities (Experimental) - **Image Analysis**: Index and search through images, diagrams, and screenshots - **OCR Support**: Extract text from images and include in search - **Technical Diagrams**: Understand architectural diagrams and flowcharts - **UI Mockups**: Analyze user interface designs and mockups ## Developer Tools ### 🛠️ Command Line Interface - **Full CLI**: Complete command-line interface for all operations - **Shell Integration**: Works seamlessly with existing development workflows - **Scripting Support**: Automate Git Contextor operations - **Cross-platform**: Works on Linux, macOS, and Windows ### 📝 IDE Integration - **VS Code Extension**: Native VS Code integration with custom tasks - **Generic Integration**: Works with any editor through CLI and API - **Keybinding Support**: Quick access to search and chat features - **Context Menus**: Right-click integration for selected code ### 🔧 Configuration Management - **JSON Configuration**: Comprehensive configuration file - **Environment Variables**: Secure API key management - **Runtime Configuration**: Update settings without restart - **Migration Support**: Automatic configuration upgrades ## Data & Storage ### 💾 Vector Storage - **Qdrant Integration**: High-performance vector database for large repositories - **In-memory Storage**: Lightweight option for smaller projects - **Persistence**: Configurable data persistence across restarts - **Backup & Restore**: Export and import vector data ### 🗂️ File Processing - **Smart Filtering**: Respects .gitignore and custom exclude patterns - **Multiple Formats**: Support for code, documentation, and configuration files - **Chunking Strategies**: Function-based, line-based, and semantic chunking - **Metadata Preservation**: Maintain file paths, line numbers, and context ### 📦 Package Management - **NPM Distribution**: Easy installation via npm - **Docker Support**: Containerized deployment options - **Dependency Management**: Minimal dependencies for better compatibility - **Version Management**: Semantic versioning and upgrade paths ## Security Features ### 🔐 Authentication & Authorization - **API Key Authentication**: Secure API access with generated keys - **Share-based Access**: Time-limited, scope-limited sharing - **Local-only Admin**: Admin functions restricted to localhost - **Rate Limiting**: Protection against abuse ### 🛡️ Data Protection - **Local Processing**: Data never leaves your infrastructure - **Secure Tunneling**: Optional secure public access - **Access Logging**: Track and monitor all access - **Privacy Controls**: Configurable data retention and sharing ## Performance & Scalability ### ⚡ Performance Optimization - **Incremental Indexing**: Only process changed files - **Batch Processing**: Efficient bulk operations - **Caching**: Multiple levels of caching for speed - **Concurrent Processing**: Parallel file processing ### 📈 Scalability - **Large Repository Support**: Handles repositories with thousands of files - **Memory Management**: Efficient memory usage patterns - **Queue Management**: Handles high-volume file changes - **Background Processing**: Non-blocking operations ## Customization & Extensions ### 🎛️ Configurable Behavior - **Chunking Strategies**: Customize how code is split - **Exclude Patterns**: Fine-tune which files to index - **Token Limits**: Control response sizes - **Context Types**: Custom conversation contexts ### 🔌 Plugin Architecture - **MCP Protocol**: Standard integration protocol - **REST API**: Build custom integrations - **Extension Points**: Customize behavior at key points ## Monitoring & Observability ### 📊 Built-in Monitoring - **Health Checks**: System health and status monitoring - **Performance Metrics**: CPU, memory, and indexing metrics - **Error Tracking**: Detailed error reporting and logging - **Usage Statistics**: Track feature usage and performance ### 🔍 Debugging Tools - **Debug Mode**: Detailed logging for troubleshooting - **Status Commands**: CLI tools for system inspection - **Log Analysis**: Structured logging for monitoring tools - **Performance Profiling**: Identify bottlenecks and optimization opportunities ## Use Cases ### 👨‍💻 Individual Development - **Code Exploration**: Understand unfamiliar codebases quickly - **Documentation**: Generate explanations for complex code - **Refactoring**: Find all usages and related code - **Learning**: Understand patterns and best practices ### 👥 Team Collaboration - **Code Reviews**: Share repository context with reviewers - **Onboarding**: Help new team members understand the codebase - **Architecture Discussions**: Provide context for technical decisions - **Knowledge Sharing**: Distribute domain knowledge across the team ### 🏢 Enterprise Use - **Code Auditing**: Analyze large codebases for patterns and issues - **Technical Debt**: Identify and prioritize refactoring opportunities - **Compliance**: Ensure code meets standards and regulations - **Knowledge Management**: Capture and share institutional knowledge ## Getting Started ### Quick Setup 1. **Install**: `npm install -g git-contextor` 2. **Initialize**: `git-contextor init` 3. **Configure**: Set up your AI provider (OpenAI, Gemini, or local) 4. **Start**: `git-contextor start` 5. **Use**: Open `http://localhost:3333` or use CLI commands ### First Steps - Try searching: `git-contextor query "authentication logic"` - Start a conversation: `git-contextor chat "How does this app work?"` - Explore the web UI: `http://localhost:3333` - Check the status: `git-contextor status` ### Next Steps - Read the [User Guide](./GUIDE.md) for detailed setup instructions - Explore [Integration options](./INTEGRATION.md) for your workflow - Check out [Usage Scenarios](./USAGE_SCENARIOS.md) for real-world examples - Review the [API Reference](./API_REFERENCE.md) for programmatic access ## Community & Support ### Documentation - **User Guide**: Comprehensive setup and usage instructions - **API Reference**: Complete API documentation - **Integration Guides**: Platform-specific integration instructions - **CLI Reference**: Command-line interface documentation ### Support Channels - **GitHub Issues**: Bug reports and feature requests - **Discussions**: Community Q&A and sharing - **Documentation**: Self-service help and guides - **Examples**: Sample implementations and use cases ### Contributing - **Open Source**: MIT license, contributions welcome - **Issue Tracking**: GitHub Issues for bugs and features - **Pull Requests**: Code contributions and improvements - **Community**: Join the discussion and share your use cases --- Git Contextor is designed to be your AI-powered development companion, making it easy to understand, navigate, and work with any codebase. Whether you're a solo developer or part of a large team, Git Contextor adapts to your workflow and helps you be more productive.