@arizeai/phoenix-cli 1.6.2 → 1.8.0
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 +172 -2
- package/build/commands/annotationConfig.d.ts +4 -0
- package/build/commands/annotationConfig.d.ts.map +1 -1
- package/build/commands/annotationConfig.js +506 -8
- package/build/commands/annotationConfig.js.map +1 -1
- package/build/commands/annotationConfigValues.d.ts +35 -0
- package/build/commands/annotationConfigValues.d.ts.map +1 -0
- package/build/commands/annotationConfigValues.js +97 -0
- package/build/commands/annotationConfigValues.js.map +1 -0
- package/build/commands/dataset.d.ts.map +1 -1
- package/build/commands/dataset.js +2 -7
- package/build/commands/dataset.js.map +1 -1
- package/build/commands/docs.d.ts.map +1 -1
- package/build/commands/docs.js +2 -1
- package/build/commands/docs.js.map +1 -1
- package/build/commands/formatAnnotationConfigs.d.ts +16 -0
- package/build/commands/formatAnnotationConfigs.d.ts.map +1 -1
- package/build/commands/formatAnnotationConfigs.js +15 -0
- package/build/commands/formatAnnotationConfigs.js.map +1 -1
- package/build/commands/profile.d.ts.map +1 -1
- package/build/commands/profile.js +2 -4
- package/build/commands/profile.js.map +1 -1
- package/build/config.d.ts.map +1 -1
- package/build/config.js +4 -3
- package/build/config.js.map +1 -1
- package/build/optionParsers.d.ts +17 -0
- package/build/optionParsers.d.ts.map +1 -0
- package/build/optionParsers.js +22 -0
- package/build/optionParsers.js.map +1 -0
- package/build/pxi/App.d.ts.map +1 -1
- package/build/pxi/App.js +60 -8
- package/build/pxi/App.js.map +1 -1
- package/build/pxi/toolPresentation.d.ts +56 -0
- package/build/pxi/toolPresentation.d.ts.map +1 -0
- package/build/pxi/toolPresentation.js +295 -0
- package/build/pxi/toolPresentation.js.map +1 -0
- package/build/pxi/toolProgress.d.ts +2 -1
- package/build/pxi/toolProgress.d.ts.map +1 -1
- package/build/pxi/toolProgress.js +10 -1
- package/build/pxi/toolProgress.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -48,7 +48,8 @@ CLI flags (`--endpoint`, `--project`, `--api-key`) override environment variable
|
|
|
48
48
|
| Variable | Description |
|
|
49
49
|
| ---------------------------------------- | --------------------------------------------- |
|
|
50
50
|
| `PHOENIX_HOST` | Phoenix API endpoint |
|
|
51
|
-
| `PHOENIX_PROJECT` | Project name or ID
|
|
51
|
+
| `PHOENIX_PROJECT` | Project name or ID (canonical) |
|
|
52
|
+
| `PHOENIX_PROJECT_NAME` | Project name or ID (alias for above) |
|
|
52
53
|
| `PHOENIX_API_KEY` | API key (if auth is enabled) |
|
|
53
54
|
| `PHOENIX_CLIENT_HEADERS` | Custom headers as JSON string |
|
|
54
55
|
| `PHOENIX_CLI_DANGEROUSLY_ENABLE_DELETES` | Enable CLI delete commands when set to `true` |
|
|
@@ -105,6 +106,25 @@ For VS Code project-wide association add to `.vscode/settings.json`:
|
|
|
105
106
|
|
|
106
107
|
## Commands
|
|
107
108
|
|
|
109
|
+
### `pxi`
|
|
110
|
+
|
|
111
|
+
Open **PXI** (Phoenix Intelligence), an interactive terminal chat with the Phoenix
|
|
112
|
+
agent. It connects to a running Phoenix instance and is the same server-side agent
|
|
113
|
+
that powers the in-browser assistant — investigate failing traces, iterate on
|
|
114
|
+
prompts, and drive Phoenix from your terminal.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pxi # uses PHOENIX_HOST / PHOENIX_API_KEY
|
|
118
|
+
pxi --endpoint http://localhost:6006 --provider OPENAI --model gpt-5.4
|
|
119
|
+
npx -y @arizeai/phoenix-cli pxi # run without installing
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Inside the chat, `/help`, `/clear`, and `/exit` are handled locally. See the
|
|
123
|
+
[PXI documentation](https://arize.com/docs/phoenix/pxi) for the full flag and
|
|
124
|
+
slash-command reference, model setup, and privacy controls.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
108
128
|
### `px self update`
|
|
109
129
|
|
|
110
130
|
Check the npm registry for the latest CLI release and update the installed
|
|
@@ -476,12 +496,37 @@ px session-annotations delete --identifier "$PHOENIX_CODING_IDENTIFIER" --all -y
|
|
|
476
496
|
|
|
477
497
|
---
|
|
478
498
|
|
|
499
|
+
Annotation configs come in three types — `CATEGORICAL` (a fixed set of labels, each with an optional numeric score), `CONTINUOUS` (a numeric range), and `FREEFORM` (free text). The `create`, `get`, `update`, and `delete` commands round out full CRUD alongside `list`.
|
|
500
|
+
|
|
501
|
+
#### Specifying categorical values
|
|
502
|
+
|
|
503
|
+
`create` and `update` accept categorical labels the same way, so you only learn it once. Prefer the repeatable, shell-friendly flag; the JSON form is a bulk/agent alternative.
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
# Repeatable flag: label with an optional score (label=score, or just label)
|
|
507
|
+
--value good=1 --value bad=0 --value needs-review
|
|
508
|
+
|
|
509
|
+
# JSON payload (handy for agents or large label sets)
|
|
510
|
+
--values '[{"label":"good","score":1},{"label":"bad","score":0}]'
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
The two forms are mutually exclusive — pass one or the other, not both.
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
479
517
|
### `px annotation-config list`
|
|
480
518
|
|
|
481
519
|
List annotation configurations defined in your Phoenix instance.
|
|
482
520
|
|
|
483
521
|
```bash
|
|
484
|
-
|
|
522
|
+
# Show all annotation configs as a table
|
|
523
|
+
px annotation-config list
|
|
524
|
+
|
|
525
|
+
# Extract config names as JSON (agent-friendly)
|
|
526
|
+
px annotation-config list --format raw --no-progress | jq -r '.[].name'
|
|
527
|
+
|
|
528
|
+
# Fetch at most 10 configs
|
|
529
|
+
px annotation-config list --limit 10
|
|
485
530
|
```
|
|
486
531
|
|
|
487
532
|
| Option | Description | Default |
|
|
@@ -491,6 +536,131 @@ px annotation-config list --format raw --no-progress | jq '.[].name'
|
|
|
491
536
|
|
|
492
537
|
---
|
|
493
538
|
|
|
539
|
+
### `px annotation-config get <config-identifier>`
|
|
540
|
+
|
|
541
|
+
Fetch a single annotation configuration by name or ID. The config is written to stdout in the selected `--format` (a single object for `raw`/`json`).
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
# Look up a config by name
|
|
545
|
+
px annotation-config get response-quality
|
|
546
|
+
|
|
547
|
+
# Resolve a config name to its ID (agent-friendly)
|
|
548
|
+
px annotation-config get response-quality --format raw --no-progress | jq -r '.id'
|
|
549
|
+
|
|
550
|
+
# Inspect the labels of a categorical config
|
|
551
|
+
px annotation-config get response-quality --format raw --no-progress | jq '.values'
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
| Option | Description | Default |
|
|
555
|
+
| ------------------- | -------------------------- | -------- |
|
|
556
|
+
| `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
|
|
557
|
+
| `--no-progress` | Suppress progress output | — |
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
### `px annotation-config create`
|
|
562
|
+
|
|
563
|
+
Create a new annotation configuration via `POST /v1/annotation_configs`. The created config is written to stdout in the selected `--format`.
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
# Pass/fail quality rating with scored labels (higher is better)
|
|
567
|
+
px annotation-config create --type CATEGORICAL --name response-quality \
|
|
568
|
+
--value good=1 --value bad=0 --optimization-direction MAXIMIZE
|
|
569
|
+
|
|
570
|
+
# Sentiment labels without scores
|
|
571
|
+
px annotation-config create --type CATEGORICAL --name sentiment \
|
|
572
|
+
--value positive --value neutral --value negative
|
|
573
|
+
|
|
574
|
+
# Confidence score between 0 and 1
|
|
575
|
+
px annotation-config create --type CONTINUOUS --name confidence --lower-bound 0 --upper-bound 1
|
|
576
|
+
|
|
577
|
+
# Free-text feedback from human reviewers
|
|
578
|
+
px annotation-config create --type FREEFORM --name reviewer-notes --description 'Free-form reviewer feedback'
|
|
579
|
+
|
|
580
|
+
# Create from a JSON payload and capture the new config ID (agent-friendly)
|
|
581
|
+
px annotation-config create --type CATEGORICAL --name response-quality \
|
|
582
|
+
--values '[{"label":"good","score":1},{"label":"bad","score":0}]' \
|
|
583
|
+
--format raw --no-progress | jq -r '.id'
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
| Option | Description | Default |
|
|
587
|
+
| -------------------------------- | ----------------------------------------------------- | -------- |
|
|
588
|
+
| `--type <type>` | `CATEGORICAL`, `CONTINUOUS`, or `FREEFORM` (required) | — |
|
|
589
|
+
| `--name <name>` | Annotation config name (required) | — |
|
|
590
|
+
| `--description <description>` | Description | — |
|
|
591
|
+
| `--optimization-direction <dir>` | `MINIMIZE`, `MAXIMIZE`, or `NONE` | `NONE` |
|
|
592
|
+
| `--value <label[=score]>` | Categorical label (repeatable; CATEGORICAL configs) | — |
|
|
593
|
+
| `--values <json>` | Categorical values as JSON (CATEGORICAL configs) | — |
|
|
594
|
+
| `--lower-bound <number>` | Lower bound (CONTINUOUS/FREEFORM configs) | — |
|
|
595
|
+
| `--upper-bound <number>` | Upper bound (CONTINUOUS/FREEFORM configs) | — |
|
|
596
|
+
| `--threshold <number>` | Threshold (FREEFORM configs) | — |
|
|
597
|
+
| `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
|
|
598
|
+
| `--no-progress` | Suppress progress output | — |
|
|
599
|
+
|
|
600
|
+
`--type` and `--name` are required; a `CATEGORICAL` config also requires at least one value. `--type` and `--optimization-direction` are case-insensitive. Invalid input — including flags that don't apply to the chosen type — exits with `INVALID_ARGUMENT`.
|
|
601
|
+
|
|
602
|
+
---
|
|
603
|
+
|
|
604
|
+
### `px annotation-config update <config-identifier>`
|
|
605
|
+
|
|
606
|
+
Update an annotation configuration by name or ID. Only the fields you pass are changed — the command fetches the existing config, merges your flags, and writes the result back via `PUT /v1/annotation_configs/{id}`. The config `type` is immutable; to change it, delete and recreate the config. The updated config is written to stdout in the selected `--format`.
|
|
607
|
+
|
|
608
|
+
```bash
|
|
609
|
+
# Change only the description; every other field is preserved
|
|
610
|
+
px annotation-config update response-quality --description 'Pass/fail rating from human review'
|
|
611
|
+
|
|
612
|
+
# Rename a config and set its optimization direction
|
|
613
|
+
px annotation-config update response-quality --name answer-quality --optimization-direction MAXIMIZE
|
|
614
|
+
|
|
615
|
+
# Replace the label set of a categorical config
|
|
616
|
+
px annotation-config update response-quality --value good=1 --value acceptable=0.5 --value bad=0
|
|
617
|
+
|
|
618
|
+
# Widen the range of a continuous config
|
|
619
|
+
px annotation-config update confidence --lower-bound -1 --upper-bound 1
|
|
620
|
+
|
|
621
|
+
# Update and capture the config ID (agent-friendly)
|
|
622
|
+
px annotation-config update response-quality --description 'Updated' --format raw --no-progress | jq -r '.id'
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
| Option | Description | Default |
|
|
626
|
+
| -------------------------------- | --------------------------------------------------- | -------- |
|
|
627
|
+
| `--name <name>` | New name | — |
|
|
628
|
+
| `--description <description>` | New description | — |
|
|
629
|
+
| `--optimization-direction <dir>` | `MINIMIZE`, `MAXIMIZE`, or `NONE` | — |
|
|
630
|
+
| `--value <label[=score]>` | Categorical label (repeatable; CATEGORICAL configs) | — |
|
|
631
|
+
| `--values <json>` | Categorical values as JSON (CATEGORICAL configs) | — |
|
|
632
|
+
| `--lower-bound <number>` | Lower bound (CONTINUOUS/FREEFORM configs) | — |
|
|
633
|
+
| `--upper-bound <number>` | Upper bound (CONTINUOUS/FREEFORM configs) | — |
|
|
634
|
+
| `--threshold <number>` | Threshold (FREEFORM configs) | — |
|
|
635
|
+
| `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
|
|
636
|
+
| `--no-progress` | Suppress progress output | — |
|
|
637
|
+
|
|
638
|
+
At least one field flag is required. Invalid input — including flags that don't apply to the config's type (e.g. `--value` on a continuous config) — exits with `INVALID_ARGUMENT`.
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
### `px annotation-config delete <config-id>`
|
|
643
|
+
|
|
644
|
+
Delete an annotation configuration by ID. Like all delete commands, this is disabled unless `PHOENIX_CLI_DANGEROUSLY_ENABLE_DELETES=true` is set, and prompts for confirmation unless `--yes` is passed.
|
|
645
|
+
|
|
646
|
+
```bash
|
|
647
|
+
# Delete with an interactive confirmation prompt
|
|
648
|
+
px annotation-config delete QW5ub3RhdGlvbkNvbmZpZzoxMjM=
|
|
649
|
+
|
|
650
|
+
# Skip the confirmation prompt (for scripts and agents)
|
|
651
|
+
px annotation-config delete QW5ub3RhdGlvbkNvbmZpZzoxMjM= --yes
|
|
652
|
+
|
|
653
|
+
# Resolve a name to its ID, then delete it
|
|
654
|
+
px annotation-config get response-quality --format raw --no-progress | jq -r '.id' | xargs px annotation-config delete --yes
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
| Option | Description | Default |
|
|
658
|
+
| --------------- | ------------------------ | ------- |
|
|
659
|
+
| `-y, --yes` | Skip confirmation prompt | — |
|
|
660
|
+
| `--no-progress` | Suppress progress output | — |
|
|
661
|
+
|
|
662
|
+
---
|
|
663
|
+
|
|
494
664
|
### `px auth status`
|
|
495
665
|
|
|
496
666
|
Show current Phoenix authentication status, including the configured endpoint, whether you are authenticated or anonymous, and an obscured API key.
|
|
@@ -3,5 +3,9 @@ import { Command } from "commander";
|
|
|
3
3
|
* Create the `annotation-config` command with subcommands
|
|
4
4
|
*/
|
|
5
5
|
export declare function createAnnotationConfigCommand(): Command;
|
|
6
|
+
export declare function createAnnotationConfigListCommand(): Command;
|
|
7
|
+
export declare function createAnnotationConfigGetCommand(): Command;
|
|
8
|
+
export declare function createAnnotationConfigCreateCommand(): Command;
|
|
9
|
+
export declare function createAnnotationConfigUpdateCommand(): Command;
|
|
6
10
|
export declare function createAnnotationConfigDeleteCommand(): Command;
|
|
7
11
|
//# sourceMappingURL=annotationConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotationConfig.d.ts","sourceRoot":"","sources":["../../src/commands/annotationConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"annotationConfig.d.ts","sourceRoot":"","sources":["../../src/commands/annotationConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2vBpC;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAWvD;AAED,wBAAgB,iCAAiC,IAAI,OAAO,CA2B3D;AAED,wBAAgB,gCAAgC,IAAI,OAAO,CAuB1D;AAED,wBAAgB,mCAAmC,IAAI,OAAO,CAuD7D;AAED,wBAAgB,mCAAmC,IAAI,OAAO,CAoD7D;AAED,wBAAgB,mCAAmC,IAAI,OAAO,CAuB7D"}
|