Overview
Phoenix CLI now supports prompt introspection with two new commands:px prompts and px prompt. These commands let you list, view, and export prompt templates directly from the terminal—and pipe them to AI coding assistants for optimization.
Prompt Optimization with AI Assistants
The--format text option outputs prompt content in a clean format with XML-style role tags, designed for piping to AI assistants like Claude Code:
Use Cases
Prompt Version Management
Access specific versions of your prompts:Prompt Analysis
Export prompts for offline analysis or documentation:Interactive Development
Ask AI assistants to work with your prompts directly:Why This Matters
Prompts are code. They should be versioned, reviewed, and optimized with the same rigor as application code. By making prompts accessible through the CLI:- Version Control Integration: Export prompts to files for git tracking
- AI-Assisted Optimization: Pipe prompts to Claude, GPT, or other models for improvement suggestions
- Automated Testing: Generate test cases programmatically from prompt templates
- Documentation: Extract prompt content for technical documentation
Commands Reference
px prompts
List all prompts with names and descriptions.
| Option | Description |
|---|---|
--format <format> | pretty, json, or raw |
--limit <number> | Maximum prompts to fetch |
px prompt <identifier>
Show a specific prompt’s content and configuration.
| Option | Description |
|---|---|
--tag <name> | Get version by tag |
--version <id> | Get specific version |
--format <format> | pretty, json, raw, or text |
text format is optimized for piping—no progress messages, just the prompt content with role tags.

