Overview
@arizeai/phoenix-cli is a command-line interface for retrieving trace data from Phoenix. It provides the same observability data available in the Phoenix UI, accessible through shell commands and file exports.
Why a CLI Matters Now
AI coding assistants—Claude Code, Cursor, Windsurf, Codex, Gemini CLI—operate through two primary interfaces: the terminal and the filesystem. They run shell commands, read output, and process files. This is how they interact with your development environment. For these assistants to help debug and improve AI applications, they need access to observability data through these same interfaces. A browser-based UI, while useful for humans, is inaccessible to an AI assistant working in your IDE. The Phoenix CLI bridges this gap. Your AI assistant can now:- Query your Phoenix instance directly via shell commands
- Retrieve trace data as structured JSON
- Export traces to files for analysis
- Pipe output to tools like
jqfor filtering
Practical Workflows
Debugging with AI Assistance
When an agent fails, you no longer need to manually copy trace data from the UI. Instead:px traces --limit 5 --format raw --no-progress, parses the JSON output, and analyzes the span data directly.
Exporting for Analysis
Build evaluation datasets by exporting traces to disk:Filtering and Processing
Use standard Unix tools alongside the CLI:Output Formats
pretty— Human-readable tree view showing span hierarchyjson— Formatted JSON with indentationraw— Compact JSON for piping to other tools

