Skip to main content

CLI Reference

Full documentation

npm

Install from npm

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:
The text output format:

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:
  1. Version Control Integration: Export prompts to files for git tracking
  2. AI-Assisted Optimization: Pipe prompts to Claude, GPT, or other models for improvement suggestions
  3. Automated Testing: Generate test cases programmatically from prompt templates
  4. Documentation: Extract prompt content for technical documentation
This continues the pattern of making Phoenix data accessible where developers already work—in the terminal and through AI coding assistants.

Commands Reference

px prompts

List all prompts with names and descriptions.

px prompt <identifier>

Show a specific prompt’s content and configuration. The text format is optimized for piping—no progress messages, just the prompt content with role tags.

Installation

Or update an existing installation: