Skip to content

Releases: RMLaroche/codectx

v2.2.0 - Code Refactoring & Organization

24 Jul 07:46

Choose a tag to compare

🔧 Code Refactoring & Organization Release

This release focuses on code quality improvements, better organization, and enhanced maintainability while preserving all existing functionality.

🚀 Major Improvements

Centralized Configuration

  • New constants.py module - Single source of truth for all configuration defaults
  • Consistent constant usage - All hardcoded values moved to reusable constants
  • Better organization - Clear separation between configuration and business logic

Enhanced Code Structure

  • API Configuration: DEFAULT_API_URL, DEFAULT_MODEL, DEFAULT_TIMEOUT centralized
  • Processing Settings: Token thresholds, retry attempts, file size limits organized
  • UI Configuration: Table widths, refresh rates, display settings consolidated
  • Ignore Patterns: Comprehensive default patterns moved from inline code
  • AI Prompts: System prompts and mock templates centralized for consistency

Improved Documentation

  • Enhanced module docstrings - Comprehensive documentation for all modules
  • Better inline documentation - Clear comments and function descriptions
  • Consistent code style - Improved readability throughout the codebase

🐛 Bug Fixes

Deleted File Handling

  • Fixed critical issue: Summaries of deleted files are now properly removed in update mode
  • Accurate documentation: Generated output now exactly reflects current project files
  • Automatic cleanup: No manual intervention needed when files are deleted

Enhanced Error Handling

  • Improved edge case coverage for file processing
  • Better checksum-based change detection accuracy
  • More robust error recovery in processing pipeline

🧪 Testing & Quality

  • 28/28 tests passing including new deletion-specific tests
  • Enhanced test coverage for deleted file handling scenarios
  • Improved test reliability with consistent fixtures and mocking
  • No breaking changes - Full backward compatibility maintained

📈 Technical Benefits

  • Better Maintainability - Centralized constants make changes easier
  • Enhanced Testability - Consistent defaults across all modules
  • Improved Readability - Clear module structure and documentation
  • Future-Proof Architecture - Well-organized foundation for new features

🔄 Migration Notes

No action required! This release maintains full backward compatibility:

  • All CLI commands work exactly the same
  • All configuration options preserved
  • All output formats unchanged
  • Existing .codectxignore files continue to work

Full Changelog: v2.1.0...v2.2.0

This release provides a solid, well-organized foundation for future development while fixing important issues with deleted file handling.

v2.1.0 - Comprehensive Test Suite

22 Jul 07:10

Choose a tag to compare

🧪 Comprehensive Test Suite Release

This major feature release adds a complete testing infrastructure to make development easier and reduce token usage during testing.

✨ New Features

Testing Infrastructure

  • 26 comprehensive tests covering all core functionality
    • 18 unit tests for file discovery, ignore patterns, and checksums
    • 2 integration tests for end-to-end CLI functionality
    • 6 smoke tests for basic imports and functionality validation
  • pytest framework with proper configuration and markers
  • Makefile with convenient test commands (make test, make test-coverage)
  • Fast execution - all tests run in ~0.6 seconds

Test Coverage Areas

✅ File discovery and directory traversal
.codectxignore pattern matching and filtering
✅ FileInfo class with SHA256 checksum calculation
✅ Binary file handling and size formatting
✅ Error handling for missing/unreadable files
✅ Mock mode end-to-end CLI testing
✅ Status mode integration testing
✅ Module imports and functionality validation

🔧 Infrastructure Improvements

  • pytest.ini - Proper pytest configuration with markers and settings
  • tests/conftest.py - Shared fixtures for consistent test data
  • tests/README.md - Comprehensive testing documentation
  • No external dependencies - Uses mock mode to avoid API calls
  • Isolated testing - Each test uses temporary directories

📚 Documentation Updates

  • Updated CLAUDE.md with comprehensive test documentation
  • Added testing section with examples and best practices
  • Environment variable documentation for CODECTX_MODEL
  • Test-first development workflow guidelines

🚀 Usage

Running Tests

# All tests
pytest tests/ -v

# By category  
pytest tests/unit/ -v          # Unit tests
pytest tests/integration/ -v   # Integration tests

# With coverage
make test-coverage

# Quick test commands
make test      # All tests
make test-unit # Unit tests only

🎯 Benefits

  • Faster development - No need for manual testing during feature development
  • Reduced token usage - Comprehensive automated testing reduces Claude iterations
  • Code quality assurance - Prevents regressions and ensures reliability
  • Easy to extend - Well-structured test framework for adding new tests

This release provides a solid foundation for future development and significantly improves the development experience.

Full Changelog: v2.0.0...v2.1.0

v2.0.0 - Major Architecture Simplification

22 Jul 06:46

Choose a tag to compare

🎉 codectx v2.0.0 - Major Architecture Simplification

This is a major breaking release that completely refactors codectx for simplicity, maintainability, and better user experience.

💥 Breaking Changes

  • Interactive mode removed entirely - The CLI is now direct and simple
  • File structure simplified - From 23 files to 6 files (74% reduction)
  • Configuration simplified - Environment variables and CLI arguments only

✨ Major Improvements

🏗️ Architecture

  • 89% code reduction: 2,950 lines removed, 333 lines added
  • 6 clean modules: cli.py, discovery.py, processing.py, ui.py, init.py, main.py
  • Clear separation of concerns - Each file has a single, focused responsibility

🚀 Features

  • Unified live table UI across all modes (update, scan-all, status)
  • Checksum-based change detection - More reliable than date-based
  • Fixed scan-all mode - Now properly forces processing of all files
  • Better error handling - Errors show in table, don't pollute output file
  • Environment variable support - CODECTX_API_KEY, CODECTX_API_URL, CODECTX_MODEL
  • Cleaner processing table - Removed useless "Last Summary" column

📚 Documentation

  • Enhanced README with complete CLI reference
  • All CLI options documented with examples and defaults
  • Environment variables documented with precedence rules

🔧 Usage

Quick Start

# Install
git clone https://github.com/RMLaroche/codectx.git
cd codectx
pip install -e .

# Set API key
export CODECTX_API_KEY="your-mistral-api-key"

# Run
codectx                    # Update changed files (default)
codectx --scan-all         # Process all files  
codectx --mock-mode        # Test without API calls
codectx --status           # Show file status

Environment Variables

export CODECTX_API_KEY="your-key"       # Required for AI mode
export CODECTX_API_URL="custom-url"     # Override API endpoint
export CODECTX_MODEL="custom-model"     # Override AI model

🎯 Migration Guide

From v1.x to v2.0

  • Interactive mode: Use direct CLI commands instead
    • Old: codectx (interactive menu)
    • New: codectx --status (show status), codectx (process updates)
  • Configuration: Use environment variables instead of complex config files
  • All core functionality preserved: update mode, scan-all, mock-mode, copy-mode

📊 Performance

The simplified architecture provides:

  • Faster startup - No complex initialization
  • Better reliability - Checksum-based change detection
  • Cleaner output - No error summaries polluting files
  • Maintainable code - 89% less code to maintain

Result: A simple, fast, and reliable code summarization tool that's easy to use and maintain.

🤖 Generated with Claude Code

v1.0.0 - Initial Release

21 Jul 12:47

Choose a tag to compare

🎉 codectx v1.0.0 - Initial Release

codectx is an AI-powered code context and file summarization tool that helps developers quickly understand codebases through intelligent analysis and structured summaries.

✨ Key Features

  • 🔄 Smart Update Mode: Only processes files that have changed since last summary (default behavior)
  • 🤖 AI-Powered Summarization: Intelligent analysis of code files with structured output
  • 📊 Enhanced Tables: Color-coded status indicators with emoji headers and real-time updates
  • 🎯 Dynamic Interactive Menu: Shows file counts, greys out options when not needed
  • 📅 Timestamp Tracking: Tracks when each file was last summarized with visual indicators
  • 📁 Smart File Processing: Automatically handles different file types and encodings
  • 🎯 Ignore Patterns: Configurable .codectxignore file with sensible defaults
  • 📊 Real-time Progress: Beautiful console interface with live progress tracking
  • 🔧 Multiple Modes: Update (default), scan all, mock (testing), and copy (raw content) modes
  • 📝 Structured Output: Organized markdown summaries with timestamps and file metadata

🚀 Quick Start

Installation

git clone https://github.com/RMLaroche/codectx.git
cd codectx
pip install -e .

Basic Usage

# Interactive mode with enhanced UI
codectx

# Process changed files only (fastest)
codectx /path/to/your/project

# Test without API calls
codectx --mock-mode

📋 Requirements

  • Python 3.8+
  • AI API key (set as CODECTX_API_KEY environment variable)

🔍 How It Works

  • Files < 200 estimated tokens: Copied as raw content
  • Files ≥ 200 estimated tokens: Sent to AI for intelligent summarization
  • Token estimation: Uses characters ÷ 4 as rough approximation
  • Smart updates: Only reprocesses files modified since their last summary

🤝 Contributing

Contributions welcome! This is the foundation release with core functionality in place.


Made with ❤️ for developers who love clean, documented code.