CLI Commands¶
Prela provides a command-line interface for managing traces and running evaluations.
Installation¶
The CLI is included with Prela:
Global Options¶
prela --version # Show version
prela --help # Show help
prela COMMAND --help # Command-specific help
Commands¶
init¶
Initialize Prela in a new project.
Options:
- --service-name: Service name (default: directory name)
- --exporter: Exporter type (console, file)
Example:
list¶
List available traces.
Options:
- --directory: Traces directory (default: ./traces)
- --service: Filter by service name
- --date: Filter by date (YYYY-MM-DD)
- --limit: Max results (default: 20)
Example:
show¶
Display a specific trace.
Options:
- --directory: Traces directory
- --format: Output format (json, tree, default: tree)
Example:
prela show 550e8400-e29b-41d4-a716-446655440000
prela show 550e8400-e29b-41d4-a716-446655440000 --format json
search¶
Search traces by attributes.
prela search [--directory DIR] [--service NAME] [--status STATUS] [--type TYPE] [--date DATE] [--limit N]
Options:
- --directory: Traces directory
- --service: Service name
- --status: Span status (success, error, pending)
- --type: Span type (agent, llm, tool, etc.)
- --date: Date (YYYY-MM-DD)
- --limit: Max results (default: 20)
Example:
eval run¶
Run evaluation suite.
Options:
- --agent: Path to agent module
- --format: Output format (console, json, junit, default: console)
- --output: Output file path
- --parallel: Enable parallel execution
- --workers N: Number of parallel workers (default: 4)
- --trace: Enable tracing
- --exporter: Trace exporter (console, file)
Example:
prela eval run tests.yaml --agent agent.py
prela eval run tests.yaml --agent agent.py --parallel --workers 8
prela eval run tests.yaml --agent agent.py --format junit --output results.xml
export¶
Export traces to different formats.
Options:
- --directory: Traces directory
- --output: Output file
- --format: Format (json, jsonl, csv)
- --service: Filter by service
- --date: Filter by date
Example:
replay¶
Replay captured traces with modifications for testing and debugging.
Options:
- --model: Override model (e.g., gpt-4o, claude-sonnet-4)
- --temperature: Override temperature
- --max-tokens: Override max tokens
- --compare: Compare with original execution
- --stream: Enable streaming output
- --enable-tools: Enable tool re-execution
- --enable-retrieval: Enable retrieval re-execution
- --format: Output format (json, tree, default: tree)
Examples:
Basic replay with different model:
Replay with comparison:
Replay with streaming:
Replay with tool execution:
See also: - Replay Concepts - Replay Examples
Configuration File¶
Create .prela.yaml for defaults:
CLI options override config file.
Next Steps¶
- See Configuration
- Learn about Exporters