promptext is an intelligent code context extraction tool designed specifically for AI assistant interactions. It analyzes your codebase, filters relevant files, estimates token usage using tiktoken (GPT-3.5/4 compatible), and provides formatted output suitable for AI prompts.
- 🔍 Smart file filtering with .gitignore support and intelligent defaults
- 📊 Accurate token counting using tiktoken (GPT-3.5/4 compatible)
- 🗂️ Comprehensive project analysis (entry points, configs, core files, tests, docs)
- 📝 Multiple output formats (Markdown, XML)
- 🔧 Configurable via CLI flags or .promptext.yml
- 📈 Project metadata extraction (language, version, dependencies)
- 🔄 Git repository information extraction
- ⚡ Performance monitoring and debug logging
Linux/macOS:
curl -sSL https://raw.githubusercontent.com/1broseidon/promptext/main/scripts/install.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/1broseidon/promptext/main/scripts/install.ps1 | iex
Go install:
go install github.com/1broseidon/promptext/cmd/promptext@latest
See our documentation for more installation options.
# Process current directory
prx
# Process specific file types
prx -e .go,.js
# Show project summary
prx -i
# Export as XML with debug logging
prx -f xml -o project.xml -D
# Process with custom exclusions and verbose output
prx -x "test/,vendor/" -v
Create a .promptext.yml
in your project root:
extensions:
- .go
- .js
excludes:
- vendor/
- "*.test.go"
format: markdown
verbose: false
Visit our documentation site for:
- 📚 Getting Started Guide
- ⚙️ Configuration Options
- 🔍 File Filtering Rules
- 📊 Token Analysis
- 🔬 Project Analysis Features
- 📝 Output Format Specifications
- ⚡ Performance Tips
MIT License - see LICENSE for details.