promptext
π Smart code context extractor for AI assistants
![Release](https://img.shields.io/github/release/1broseidon/promptext.svg)
promptext is an intelligent code context extraction tool designed specifically for AI assistant interactions. It analyzes your codebase, filters relevant files, estimates token usage, and provides formatted output suitable for AI prompts.
Key Features
- π Smart file filtering with .gitignore support
- π Automatic token counting for AI context limits
- ποΈ Intelligent project structure analysis
- π Multiple output formats (Markdown, XML)
- π§ Configurable via CLI flags or .promptext.yml
- π Project statistics and metadata extraction
Quick Install
# Linux/macOS
curl -sSL https://raw.githubusercontent.com/1broseidon/promptext/main/install.sh | bash
# Using Go
go install github.com/1broseidon/promptext/cmd/promptext@latest
Basic Usage
# Process current directory
promptext
# Process specific file types
promptext -extension .go,.js
# Show project summary with token counts
promptext -info
# Export as XML with debug logging
promptext -format xml -output project.xml -debug
See our full documentation for:
- Advanced configuration options
- Output format details
- File filtering rules
- Project analysis features
- Token counting methodology
- And more!
License
MIT License - see LICENSE for details.