Skip to content

v0.4.0

Choose a tag to compare

@luckpoint luckpoint released this 20 Jul 04:42
· 38 commits to main since this release
9d8a07a

🚀 list-codes v0.4.0: Enhanced File Size Management and Output Structure

This major release introduces powerful file size management capabilities and improved output organization, making list-codes more efficient and user-friendly for LLM integration.

✨ New Features

📊 Human-Readable Size Formats

  • Support for intuitive size formats: 1k, 1m, 1g, 500k, 2.5m, etc.
  • Both flags now accept human-readable input:
    • --max-file-size 500k (individual file limit)
    • --max-total-size 10m (total collection limit)
  • Backward compatible: Still accepts byte values (e.g., 1048576)

🔢 Total Size Management

  • New --max-total-size flag: Control the total size of collected files
  • Smart collection termination: Stops scanning when total limit is reached
  • Clear reporting: Shows when scanning stopped due to size limits

📈 Source Code Size Check Section

  • Prominent file statistics: Displayed at the top of output
  • Comprehensive information:
    • Total size of collected files
    • Current size limits (individual and total)
    • List of skipped files with their sizes
    • Limit enforcement notifications

🧪 Enhanced Test File Control

  • --include-tests flag: Optionally include test files in analysis
  • Smart test detection: Recognizes test patterns across multiple languages
  • Default behavior: Test files excluded by default for cleaner output

📁 Improved Output Structure

New logical section ordering for better user experience:

  1. Source Code Size Check - File statistics and size information
  2. Project Structure - Directory tree visualization
  3. Source Code Files - Language-organized source code
  4. Dependency Files - Configuration files (debug mode)

🔧 Technical Improvements

  • Robust ParseSize() function: Regex-based parsing with comprehensive error handling
  • Enhanced size tracking: Better monitoring and limit enforcement
  • Improved error messages: Clear feedback for invalid size formats
  • Test coverage expansion: New comprehensive test suite for size parsing

📚 Documentation Updates

  • README.md: Updated with all new features and examples
  • docs/spec.md: Technical specifications and implementation details
  • docs/index.html: Refreshed content while preserving beautiful design

🛠️ Installation

Homebrew (Recommended)

brew tap luckpoint/list-codes
brew install list-codes

Go Install

go install github.com/luckpoint/list-codes/cmd/list-codes@v0.4.0

Binary Download

Download from GitHub Releases

📖 Usage Examples

# Use human-readable size formats
list-codes --max-file-size 500k --max-total-size 10m

# Include test files in analysis
list-codes --include-tests

# Combine with prompts for LLM integration
list-codes --prompt explain --max-total-size 5m --output analysis.md

🔄 Migration Guide

  • Existing users: All previous commands work unchanged
  • Size parameters: Consider using human-readable formats for better readability
  • Output structure: Source Code Size Check section now appears at the top

📊 What's Changed

  • Added human-readable size format support by @luckpoint
  • Implemented total size limit enforcement by @luckpoint
  • Added Source Code Size Check section by @luckpoint
  • Enhanced test file detection and control by @luckpoint
  • Improved output structure and organization by @luckpoint
  • Updated comprehensive documentation by @luckpoint

Full Changelog: v0.3.0...v0.4.0


Thank you for using list-codes! 🎉