Skip to content

Getting Started

macOS/Linux:

Terminal window
curl -sSL chain.sh/promptext/scripts/install.sh | bash

Windows:

Terminal window
irm chain.sh/promptext/scripts/install.ps1 | iex

Go Install (requires Go 1.19+):

Terminal window
go install github.com/1broseidon/promptext/cmd/promptext@latest

Manual Install: Download binaries from GitHub Releases and add to your PATH.

Linux/macOS:

Terminal window
curl -sSL chain.sh/promptext/scripts/uninstall.sh | bash

Manual Removal:

Terminal window
# Remove binary (default location)
rm ~/.local/bin/promptext
# Remove aliases from shell configs
sed -i '/alias prx=/d' ~/.bashrc ~/.zshrc
Terminal window
# Process current directory (PTX format to clipboard)
promptext
# Use alias for convenience
prx
# Process specific directory
prx /path/to/project
# Show project overview only
prx -i
# Export to file (format auto-detected from extension)
prx -o context.ptx # PTX format (default)
prx -o context.md # Markdown format
prx -o project.xml # XML format
FlagDescription
(path)Directory to process (e.g., prx /path/to/project)
-eFile extensions (.go,.js)
-xExclude patterns
-fFormat (ptx, toon-strict, markdown, xml)
-oOutput file (auto-detects format from extension)
-iInfo mode only
-rRelevant keywords for prioritization
--max-tokensToken budget limit
-vVerbose output
-DDebug mode with timing

Filter by file type:

Terminal window
prx -e .go,.js,.ts

Exclude directories:

Terminal window
prx -x "node_modules/,vendor/,test/"

Generate reports:

Terminal window
# PTX format (default, token-optimized)
prx -o context.ptx
# Markdown format
prx -f markdown -o context.md
# XML format for automation
prx -f xml -o report.xml

Prioritize relevant files:

Terminal window
# Focus on authentication code
prx -r "auth login OAuth"
# Database-related files
prx -r "database SQL migration"

Stay within token budgets:

Terminal window
# Limit to 8000 tokens (Claude Haiku)
prx --max-tokens 8000
# Combine with relevance for smart selection
prx -r "api routes" --max-tokens 5000
Terminal window
# Quick context (3k tokens)
prx -r "auth" --max-tokens 3000
# Standard context (8k tokens)
prx -r "api database" --max-tokens 8000
# Full codebase (within limits)
prx --max-tokens 50000
Terminal window
# Export project overview
prx -i -o overview.md
# Export full context in markdown
prx -f markdown -o full-context.md
Terminal window
# Machine-readable XML
prx -f xml -o build/context.xml
# PTX format for programmatic use
prx -o context.ptx