@arizeai/phoenix-cli 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -99,6 +99,49 @@ px trace abc123def456 --file trace.json
|
|
|
99
99
|
|
|
100
100
|
---
|
|
101
101
|
|
|
102
|
+
### `px spans [file]`
|
|
103
|
+
|
|
104
|
+
Fetch spans for the configured project with filtering options. Output is JSON.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
px spans --limit 50 # stdout (pretty)
|
|
108
|
+
px spans --span-kind LLM --limit 20 # only LLM spans
|
|
109
|
+
px spans --status-code ERROR --format raw --no-progress # pipe-friendly error spans
|
|
110
|
+
px spans --name chat_completion --trace-id abc123 # filter by name and trace
|
|
111
|
+
px spans --parent-id null # root spans only
|
|
112
|
+
px spans spans.json --limit 100 --include-annotations # save to file with annotations
|
|
113
|
+
px spans --last-n-minutes 30 --span-kind TOOL RETRIEVER # multiple span kinds
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
| Option | Description | Default |
|
|
117
|
+
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------- |
|
|
118
|
+
| `[file]` | Save spans as JSON to file | stdout |
|
|
119
|
+
| `-n, --limit <number>` | Maximum number of spans (newest first) | `100` |
|
|
120
|
+
| `--last-n-minutes <number>` | Only spans from the last N minutes | — |
|
|
121
|
+
| `--since <timestamp>` | Spans since ISO timestamp | — |
|
|
122
|
+
| `--span-kind <kinds...>` | Filter by span kind (`LLM`, `CHAIN`, `TOOL`, `RETRIEVER`, `EMBEDDING`, `AGENT`, `RERANKER`, `GUARDRAIL`, `EVALUATOR`, `UNKNOWN`) | — |
|
|
123
|
+
| `--status-code <codes...>` | Filter by status code (`OK`, `ERROR`, `UNSET`) | — |
|
|
124
|
+
| `--name <names...>` | Filter by span name(s) | — |
|
|
125
|
+
| `--trace-id <ids...>` | Filter by trace ID(s) | — |
|
|
126
|
+
| `--parent-id <id>` | Filter by parent span ID (use `"null"` for root spans only) | — |
|
|
127
|
+
| `--include-annotations` | Include span annotations in the output | — |
|
|
128
|
+
| `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
|
|
129
|
+
| `--no-progress` | Suppress progress output | — |
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Find all ERROR spans
|
|
133
|
+
px spans --status-code ERROR --format raw --no-progress | jq '.[] | {name, status_code}'
|
|
134
|
+
|
|
135
|
+
# Get LLM spans with token counts
|
|
136
|
+
px spans --span-kind LLM --format raw --no-progress | \
|
|
137
|
+
jq '.[] | {name, model: .attributes["llm.model_name"], tokens: (.attributes["llm.token_count.prompt"] + .attributes["llm.token_count.completion"])}'
|
|
138
|
+
|
|
139
|
+
# Root spans only, sorted by name
|
|
140
|
+
px spans --parent-id null --format raw --no-progress | jq 'sort_by(.name)'
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
102
145
|
### `px datasets`
|
|
103
146
|
|
|
104
147
|
List all datasets.
|
|
@@ -176,6 +219,78 @@ px prompt my-evaluator --tag production --format json | jq '.template'
|
|
|
176
219
|
|
|
177
220
|
---
|
|
178
221
|
|
|
222
|
+
### `px projects`
|
|
223
|
+
|
|
224
|
+
List all available Phoenix projects.
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
px projects # pretty output
|
|
228
|
+
px projects --format raw --no-progress | jq '.[].name'
|
|
229
|
+
px projects --limit 5
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
| Option | Description | Default |
|
|
233
|
+
| ------------------- | ----------------------------------- | -------- |
|
|
234
|
+
| `--limit <number>` | Maximum number of projects per page | — |
|
|
235
|
+
| `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
|
|
236
|
+
| `--no-progress` | Suppress progress output | — |
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### `px sessions`
|
|
241
|
+
|
|
242
|
+
List sessions for a project.
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
px sessions # latest 10 sessions
|
|
246
|
+
px sessions --limit 20 --order asc # oldest first
|
|
247
|
+
px sessions --format raw --no-progress | jq '.[].session_id'
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
| Option | Description | Default |
|
|
251
|
+
| ---------------------- | --------------------------- | -------- |
|
|
252
|
+
| `-n, --limit <number>` | Maximum number of sessions | `10` |
|
|
253
|
+
| `--order <order>` | Sort order: `asc` or `desc` | `desc` |
|
|
254
|
+
| `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
|
|
255
|
+
| `--no-progress` | Suppress progress output | — |
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
### `px session <session-id>`
|
|
260
|
+
|
|
261
|
+
View a session's conversation flow.
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
px session my-session-id
|
|
265
|
+
px session my-session-id --file session.json
|
|
266
|
+
px session my-session-id --include-annotations --format raw | jq '.traces'
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
| Option | Description | Default |
|
|
270
|
+
| ----------------------- | -------------------------------------- | -------- |
|
|
271
|
+
| `--file <path>` | Save session to file instead of stdout | — |
|
|
272
|
+
| `--include-annotations` | Include session annotations | — |
|
|
273
|
+
| `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
|
|
274
|
+
| `--no-progress` | Suppress progress output | — |
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### `px auth status`
|
|
279
|
+
|
|
280
|
+
Show current Phoenix authentication status, including the configured endpoint, whether you are authenticated or anonymous, and an obscured API key.
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
px auth status
|
|
284
|
+
px auth status --endpoint http://localhost:6006
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
| Option | Description | Default |
|
|
288
|
+
| ------------------ | -------------------- | ------- |
|
|
289
|
+
| `--endpoint <url>` | Phoenix API endpoint | — |
|
|
290
|
+
| `--api-key <key>` | Phoenix API key | — |
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
179
294
|
### `px api graphql <query>`
|
|
180
295
|
|
|
181
296
|
Make authenticated GraphQL queries against the Phoenix API. Output is `{"data": {...}}` JSON — pipe with `jq '.data.<field>'` to extract values. Only queries are permitted; mutations and subscriptions are rejected.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arizeai/phoenix-cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "A command-line interface for Phoenix",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arize",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@arizeai/openinference-semantic-conventions": "^1.1.0",
|
|
34
34
|
"commander": "^12.1.0",
|
|
35
|
-
"@arizeai/phoenix-
|
|
36
|
-
"@arizeai/phoenix-
|
|
35
|
+
"@arizeai/phoenix-client": "6.5.2",
|
|
36
|
+
"@arizeai/phoenix-config": "0.1.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^18.19.0",
|