Output Formats
Markdown (Default)
Section titled “Markdown (Default)”Human-readable format optimized for AI assistants:
promptext -f markdown
Structure:
- Project metadata and analysis
- Directory structure with file tree
- Source code with syntax highlighting
- Token counts and statistics
Benefits:
- Direct copy-paste to AI chats
- Readable in any text editor
- Preserves code formatting
- Includes contextual information
XML Format
Section titled “XML Format”Structured format for automated processing:
promptext -f xml -o project.xml
Structure:
<project> <metadata language="go" tokens="2590"/> <files> <file path="main.go" tokens="150">...</file> <file path="pkg/utils.go" tokens="85">...</file> </files> <dependencies> <dependency name="github.com/spf13/pflag" version="v1.0.5"/> </dependencies></project>
Benefits:
- Machine parseable
- Preserves hierarchical structure
- Suitable for build tools
- Schema validation ready
Command line:
promptext -f xml -o report.xml
Config file:
format: xml
Output to file:
promptext -o output.md # Auto-detects .md formatpromptext -o data.xml # Auto-detects .xml format