Skip to content

Releases: dotpyu/codemd

CodeMD v0.0.3b

20 Nov 21:26
Compare
Choose a tag to compare

CodeMD v0.0.3b 🚀

Transform code files and repositories into markdown-formatted strings ready for LLM prompting and automatically copy to your clipboard. Perfect for seamless code-to-prompt workflow with ChatGPT, Claude, and other LLMs.

✨ Key Features

📝 Core Functionality

  • Process single files or entire repositories into markdown format optimized for LLM prompting
  • Smart scanning with recursive directory support and single file processing
  • Cross-platform clipboard integration (Windows, macOS, Linux)
  • Configurable output display with file saving options

🎯 Customization Options

  • Single File Processing: Direct processing of individual files
    codemd /path/to/script.py --print
  • Extension Support: Extended language support including Rust, TypeScript, Go, and more
    codemd /path/to/code -e rs,ts,go,kt
  • Pattern Exclusion: Skip files matching specific patterns
    codemd /path/to/code --exclude-patterns test_,debug_
  • Extension Exclusion: Omit specific file extensions
    codemd /path/to/code --exclude-extensions test.py,spec.js

📊 Token Estimation

  • Built-in token counting via tiktoken
  • Support for both GPT-4 and GPT-3.5 encodings
  • Token count reporting without output display
  • Automatic fallback between encoders

🚀 Quick Start

# Install from PyPI
pip install codemd

# Process a single file
codemd /path/to/script.py
codemd /path/to/script.py --print  # show output

# Process a directory
codemd /path/to/code
codemd /path/to/code --print  # show output

# Save to file with custom extensions
codemd /path/to/code -e py,java,ts -o output.md

# Exclude test files and get verbose output
codemd /path/to/code --exclude-patterns test_ -v

💡 New in This Release

  • NEW: Single file processing support
    • Auto-disabled structure output for single files
    • Streamlined output for individual files
  • NEW: Configurable output display
    • Output disabled by default for cleaner operation
    • Use --print to display markdown output
    • Token counts and stats always shown
  • NEW: Expanded language support
    • Added Rust, Go, TypeScript, and more
    • Comprehensive web development extensions
    • Support for configuration and data files
  • IMPROVED: Repository structure handling
    • Auto-disabled for single files
    • Optional for directories (--no-structure)
  • MAINTAINED: Automatic .gitignore integration
    • Uses project's .gitignore by default
    • Custom gitignore files via --gitignore
    • Disable with --ignore-gitignore

🔧 Requirements

  • Python 3.8+
  • pathspec: Required for gitignore pattern matching
  • Optional: tiktoken for token estimation
  • Optional: xclip or xsel for Linux clipboard support

📝 Notes

  • Token counting requires tiktoken: pip install tiktoken
  • Linux users need xclip or xsel for clipboard support
  • Multiple gitignore files can be specified and are processed in order
  • Output is not displayed by default; use --print to show markdown
  • Structure output is automatically disabled for single files

🐛 Bug Fixes

  • N/A (Feature Release)

🔄 Breaking Changes

  • Default behavior changed to not print output (use --print to show output)
  • Directory argument renamed to 'path' to reflect single file support

For detailed usage and examples, please visit our GitHub Repository.

CodeMD v0.0.3

20 Nov 21:33
Compare
Choose a tag to compare

CodeMD v0.0.3 🚀

Transform code files and repositories into markdown-formatted strings ready for LLM prompting and automatically copy to your clipboard. Perfect for seamless code-to-prompt workflow with ChatGPT, Claude, and other LLMs.

✨ Key Features

📝 Core Functionality

  • Process single files or entire repositories into markdown format optimized for LLM prompting
  • Smart scanning with recursive directory support and single file processing
  • Cross-platform clipboard integration (Windows, macOS, Linux)
  • Configurable output display with file saving options

🎯 Customization Options

  • Relative Path Support: Options for relative/absolute paths in output
    codemd /path/to/code --relative-paths
  • Extended File Support: Process any text-based files
    codemd /path/to/code -e md,txt,log
  • Pattern Exclusion: Enhanced pattern matching
    codemd /path/to/code --exclude-patterns "test_,debug_,tmp_"
  • Extension Exclusion: Multiple extension formats
    codemd /path/to/code --exclude-extensions ".test.js,.spec.ts,_test.py"

📊 Enhanced Output Control

  • Built-in token counting via tiktoken
  • Support for both GPT-4 and GPT-3.5 encodings
  • Optional line numbers in code blocks
  • Customizable markdown formatting

🚀 Quick Start

# Install latest version from PyPI
pip install codemd

# Process files with relative paths
codemd . --relative-paths

# Add line numbers to code blocks
codemd /path/to/code --line-numbers

# Process with custom markdown format
codemd /path/to/code --no-structure --minimal

💡 New in This Release

  • NEW: Relative path support
    • Switch between absolute and relative paths
    • Better for sharing and documentation
    • Configurable base directory
  • NEW: Line number support
    • Optional line numbers in code blocks
    • Configurable starting number
    • Toggle for specific file types
  • NEW: Enhanced pattern matching
    • More flexible exclude patterns
    • Support for complex file patterns
    • Improved wildcard handling
  • IMPROVED: Output formatting
    • Minimal output option
    • Customizable headers
    • Better whitespace handling
  • IMPROVED: File extension handling
    • Support for compound extensions (.test.js)
    • Better text file detection
    • Automatic language detection

🔧 Requirements

  • Python 3.8+
  • pathspec: Required for pattern matching
  • Optional: tiktoken for token estimation
  • Optional: xclip or xsel for Linux clipboard support

📝 Notes

  • Token counting requires tiktoken: pip install tiktoken
  • Linux users need xclip or xsel for clipboard support
  • Line numbers might affect token count
  • Relative paths are relative to current directory by default

🐛 Bug Fixes

  • Fixed path handling in Windows environments
  • Corrected token counting for files with line numbers
  • Improved handling of binary files
  • Better error messages for inaccessible files

🔄 Breaking Changes

  • Changed default path handling to absolute (use --relative-paths for relative)
  • Modified exclude pattern syntax for better glob support
  • Adjusted output formatting for better LLM compatibility

For detailed usage and examples, please visit our GitHub Repository.

CodeMD v0.0.2b

20 Nov 21:18
Compare
Choose a tag to compare

CodeMD v0.0.2b 🚀

Transform code files and repositories into markdown-formatted strings ready for LLM prompting and automatically copy to your clipboard. Perfect for seamless code-to-prompt workflow with ChatGPT, Claude, and other LLMs.

✨ Key Features

📝 Core Functionality

  • Process single files or entire repositories into markdown format optimized for LLM prompting
  • Smart scanning with recursive directory support and single file processing
  • Cross-platform clipboard integration (Windows, macOS, Linux)
  • Configurable output display with file saving options

🎯 Customization Options

  • Single File Processing: Direct processing of individual files
    codemd /path/to/script.py --print
  • Extension Support: Extended language support including Rust, TypeScript, Go, and more
    codemd /path/to/code -e rs,ts,go,kt
  • Pattern Exclusion: Skip files matching specific patterns
    codemd /path/to/code --exclude-patterns test_,debug_
  • Extension Exclusion: Omit specific file extensions
    codemd /path/to/code --exclude-extensions test.py,spec.js

📊 Token Estimation

  • Built-in token counting via tiktoken
  • Support for both GPT-4 and GPT-3.5 encodings
  • Token count reporting without output display
  • Automatic fallback between encoders

🚀 Quick Start

# Install from PyPI
pip install codemd

# Process a single file
codemd /path/to/script.py
codemd /path/to/script.py --print  # show output

# Process a directory
codemd /path/to/code
codemd /path/to/code --print  # show output

# Save to file with custom extensions
codemd /path/to/code -e py,java,ts -o output.md

# Exclude test files and get verbose output
codemd /path/to/code --exclude-patterns test_ -v

💡 New in This Release

  • NEW: Single file processing support
    • Auto-disabled structure output for single files
    • Streamlined output for individual files
  • NEW: Configurable output display
    • Output disabled by default for cleaner operation
    • Use --print to display markdown output
    • Token counts and stats always shown
  • NEW: Expanded language support
    • Added Rust, Go, TypeScript, and more
    • Comprehensive web development extensions
    • Support for configuration and data files
  • IMPROVED: Repository structure handling
    • Auto-disabled for single files
    • Optional for directories (--no-structure)
  • MAINTAINED: Automatic .gitignore integration
    • Uses project's .gitignore by default
    • Custom gitignore files via --gitignore
    • Disable with --ignore-gitignore

🔧 Requirements

  • Python 3.8+
  • pathspec: Required for gitignore pattern matching
  • Optional: tiktoken for token estimation
  • Optional: xclip or xsel for Linux clipboard support

📝 Notes

  • Token counting requires tiktoken: pip install tiktoken
  • Linux users need xclip or xsel for clipboard support
  • Multiple gitignore files can be specified and are processed in order
  • Output is not displayed by default; use --print to show markdown
  • Structure output is automatically disabled for single files

🐛 Bug Fixes

  • N/A (Feature Release)

🔄 Breaking Changes

  • Default behavior changed to not print output (use --print to show output)
  • Directory argument renamed to 'path' to reflect single file support

For detailed usage and examples, please visit our GitHub Repository.

CodeMD v0.0.2

11 Nov 19:31
d6990ce
Compare
Choose a tag to compare

CodeMD v0.0.2 🚀

Transform your code repositories into LLM-friendly markdown prompts with advanced filtering and token estimation.

✨ Key Features

📝 Core Functionality

  • Convert code repositories into markdown format optimized for LLM prompting
  • Smart directory scanning with recursive support
  • Cross-platform clipboard integration (Windows, macOS, Linux)
  • Flexible output options (stdout or file)

🎯 Customization Options

  • Extension Filtering: Specify which file types to include
    codemd /path/to/code -e py,java,sql
  • Pattern Exclusion: Skip files matching specific patterns
    codemd /path/to/code --exclude-patterns test_,debug_
  • Extension Exclusion: Omit specific file extensions
    codemd /path/to/code --exclude-extensions test.py,spec.js

📊 Token Estimation

  • Built-in token counting via tiktoken
  • Support for both GPT-4 and GPT-3.5 encodings
  • Cost estimation for API usage
  • Automatic fallback between encoders

🚀 Quick Start

# Install from PyPI
pip install codemd

# Basic usage (prints to stdout)
codemd /path/to/code

# Save to file with custom extensions
codemd /path/to/code -e py,java -o output.md

# Exclude test files and get verbose output
codemd /path/to/code --exclude-patterns test_ -v

💡 New in This Release

  • NEW: Repository structure output (to disable, use --no-structure)
  • NEW: Automatic .gitignore integration
    • Uses project's .gitignore by default
    • Specify custom gitignore files with --gitignore
    • Disable with --ignore-gitignore
  • Cross-platform clipboard support
  • Token estimation with cost analysis
  • Flexible output options (stdout or file)
  • Markdown generation optimized for LLMs

🔧 Requirements

  • Python 3.8+
  • pathspec: Required for gitignore pattern matching (New)
  • Optional: tiktoken for token estimation
  • Optional: xclip or xsel for Linux clipboard support

📝 Notes

  • Token counting requires tiktoken: pip install tiktoken
  • Linux users need xclip or xsel for clipboard support
  • Multiple gitignore files can be specified and are processed in order

🐛 Bug Fixes

  • N/A (Initial Release)

For detailed usage and examples, please visit our GitHub Repository.

Init Release: v0.0.1

07 Nov 16:55
Compare
Choose a tag to compare

CodeMD v0.0.1 🚀

Transform your code repositories into LLM-friendly markdown prompts with advanced filtering and token estimation.

✨ Key Features

📝 Core Functionality

  • Convert code repositories into markdown format optimized for LLM prompting
  • Smart directory scanning with recursive support
  • Cross-platform clipboard integration (Windows, macOS, Linux)
  • Flexible output options (stdout or file)

🎯 Customization Options

  • Extension Filtering: Specify which file types to include
    codemd /path/to/code -e py,java,sql
  • Pattern Exclusion: Skip files matching specific patterns
    codemd /path/to/code --exclude-patterns test_,debug_
  • Extension Exclusion: Omit specific file extensions
    codemd /path/to/code --exclude-extensions test.py,spec.js

📊 Token Estimation

  • Built-in token counting via tiktoken
  • Support for both GPT-4 and GPT-3.5 encodings
  • Cost estimation for API usage
  • Automatic fallback between encoders

🚀 Quick Start

# Install from PyPI
pip install codemd

# Basic usage (prints to stdout)
codemd /path/to/code

# Save to file with custom extensions
codemd /path/to/code -e py,java -o output.md

# Exclude test files and get verbose output
codemd /path/to/code --exclude-patterns test_ -v

💡 New in This Release

  • Initial public release
  • Cross-platform clipboard support
  • Token estimation with cost analysis
  • Flexible output options (stdout or file)
  • Markdown generation optimized for LLMs

🔧 Requirements

  • Python 3.8+
  • Optional: tiktoken for token estimation
  • Optional: xclip or xsel for Linux clipboard support

📝 Notes

  • Token counting requires tiktoken: pip install tiktoken
  • Linux users need xclip or xsel for clipboard support

🐛 Bug Fixes

  • N/A (Initial Release)

For detailed usage and examples, please visit our GitHub Repository.