@arizeai/phoenix-cli 1.6.1 → 1.7.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.
Files changed (45) hide show
  1. package/README.md +170 -1
  2. package/build/commands/annotationConfig.d.ts +4 -0
  3. package/build/commands/annotationConfig.d.ts.map +1 -1
  4. package/build/commands/annotationConfig.js +506 -8
  5. package/build/commands/annotationConfig.js.map +1 -1
  6. package/build/commands/annotationConfigValues.d.ts +35 -0
  7. package/build/commands/annotationConfigValues.d.ts.map +1 -0
  8. package/build/commands/annotationConfigValues.js +97 -0
  9. package/build/commands/annotationConfigValues.js.map +1 -0
  10. package/build/commands/dataset.d.ts.map +1 -1
  11. package/build/commands/dataset.js +2 -7
  12. package/build/commands/dataset.js.map +1 -1
  13. package/build/commands/docs.d.ts.map +1 -1
  14. package/build/commands/docs.js +2 -1
  15. package/build/commands/docs.js.map +1 -1
  16. package/build/commands/formatAnnotationConfigs.d.ts +16 -0
  17. package/build/commands/formatAnnotationConfigs.d.ts.map +1 -1
  18. package/build/commands/formatAnnotationConfigs.js +15 -0
  19. package/build/commands/formatAnnotationConfigs.js.map +1 -1
  20. package/build/commands/profile.d.ts.map +1 -1
  21. package/build/commands/profile.js +2 -4
  22. package/build/commands/profile.js.map +1 -1
  23. package/build/optionParsers.d.ts +17 -0
  24. package/build/optionParsers.d.ts.map +1 -0
  25. package/build/optionParsers.js +22 -0
  26. package/build/optionParsers.js.map +1 -0
  27. package/build/pxi/App.d.ts.map +1 -1
  28. package/build/pxi/App.js +219 -28
  29. package/build/pxi/App.js.map +1 -1
  30. package/build/pxi/draftEditor.d.ts +31 -0
  31. package/build/pxi/draftEditor.d.ts.map +1 -0
  32. package/build/pxi/draftEditor.js +95 -0
  33. package/build/pxi/draftEditor.js.map +1 -0
  34. package/build/pxi/index.d.ts.map +1 -1
  35. package/build/pxi/index.js +9 -0
  36. package/build/pxi/index.js.map +1 -1
  37. package/build/pxi/toolPresentation.d.ts +56 -0
  38. package/build/pxi/toolPresentation.d.ts.map +1 -0
  39. package/build/pxi/toolPresentation.js +295 -0
  40. package/build/pxi/toolPresentation.js.map +1 -0
  41. package/build/pxi/toolProgress.d.ts +2 -1
  42. package/build/pxi/toolProgress.d.ts.map +1 -1
  43. package/build/pxi/toolProgress.js +10 -1
  44. package/build/pxi/toolProgress.js.map +1 -1
  45. package/package.json +4 -4
package/README.md CHANGED
@@ -105,6 +105,25 @@ For VS Code project-wide association add to `.vscode/settings.json`:
105
105
 
106
106
  ## Commands
107
107
 
108
+ ### `pxi`
109
+
110
+ Open **PXI** (Phoenix Intelligence), an interactive terminal chat with the Phoenix
111
+ agent. It connects to a running Phoenix instance and is the same server-side agent
112
+ that powers the in-browser assistant — investigate failing traces, iterate on
113
+ prompts, and drive Phoenix from your terminal.
114
+
115
+ ```bash
116
+ pxi # uses PHOENIX_HOST / PHOENIX_API_KEY
117
+ pxi --endpoint http://localhost:6006 --provider OPENAI --model gpt-5.4
118
+ npx -y @arizeai/phoenix-cli pxi # run without installing
119
+ ```
120
+
121
+ Inside the chat, `/help`, `/clear`, and `/exit` are handled locally. See the
122
+ [PXI documentation](https://arize.com/docs/phoenix/pxi) for the full flag and
123
+ slash-command reference, model setup, and privacy controls.
124
+
125
+ ---
126
+
108
127
  ### `px self update`
109
128
 
110
129
  Check the npm registry for the latest CLI release and update the installed
@@ -476,12 +495,37 @@ px session-annotations delete --identifier "$PHOENIX_CODING_IDENTIFIER" --all -y
476
495
 
477
496
  ---
478
497
 
498
+ 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`.
499
+
500
+ #### Specifying categorical values
501
+
502
+ `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.
503
+
504
+ ```bash
505
+ # Repeatable flag: label with an optional score (label=score, or just label)
506
+ --value good=1 --value bad=0 --value needs-review
507
+
508
+ # JSON payload (handy for agents or large label sets)
509
+ --values '[{"label":"good","score":1},{"label":"bad","score":0}]'
510
+ ```
511
+
512
+ The two forms are mutually exclusive — pass one or the other, not both.
513
+
514
+ ---
515
+
479
516
  ### `px annotation-config list`
480
517
 
481
518
  List annotation configurations defined in your Phoenix instance.
482
519
 
483
520
  ```bash
484
- px annotation-config list --format raw --no-progress | jq '.[].name'
521
+ # Show all annotation configs as a table
522
+ px annotation-config list
523
+
524
+ # Extract config names as JSON (agent-friendly)
525
+ px annotation-config list --format raw --no-progress | jq -r '.[].name'
526
+
527
+ # Fetch at most 10 configs
528
+ px annotation-config list --limit 10
485
529
  ```
486
530
 
487
531
  | Option | Description | Default |
@@ -491,6 +535,131 @@ px annotation-config list --format raw --no-progress | jq '.[].name'
491
535
 
492
536
  ---
493
537
 
538
+ ### `px annotation-config get <config-identifier>`
539
+
540
+ 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`).
541
+
542
+ ```bash
543
+ # Look up a config by name
544
+ px annotation-config get response-quality
545
+
546
+ # Resolve a config name to its ID (agent-friendly)
547
+ px annotation-config get response-quality --format raw --no-progress | jq -r '.id'
548
+
549
+ # Inspect the labels of a categorical config
550
+ px annotation-config get response-quality --format raw --no-progress | jq '.values'
551
+ ```
552
+
553
+ | Option | Description | Default |
554
+ | ------------------- | -------------------------- | -------- |
555
+ | `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
556
+ | `--no-progress` | Suppress progress output | — |
557
+
558
+ ---
559
+
560
+ ### `px annotation-config create`
561
+
562
+ Create a new annotation configuration via `POST /v1/annotation_configs`. The created config is written to stdout in the selected `--format`.
563
+
564
+ ```bash
565
+ # Pass/fail quality rating with scored labels (higher is better)
566
+ px annotation-config create --type CATEGORICAL --name response-quality \
567
+ --value good=1 --value bad=0 --optimization-direction MAXIMIZE
568
+
569
+ # Sentiment labels without scores
570
+ px annotation-config create --type CATEGORICAL --name sentiment \
571
+ --value positive --value neutral --value negative
572
+
573
+ # Confidence score between 0 and 1
574
+ px annotation-config create --type CONTINUOUS --name confidence --lower-bound 0 --upper-bound 1
575
+
576
+ # Free-text feedback from human reviewers
577
+ px annotation-config create --type FREEFORM --name reviewer-notes --description 'Free-form reviewer feedback'
578
+
579
+ # Create from a JSON payload and capture the new config ID (agent-friendly)
580
+ px annotation-config create --type CATEGORICAL --name response-quality \
581
+ --values '[{"label":"good","score":1},{"label":"bad","score":0}]' \
582
+ --format raw --no-progress | jq -r '.id'
583
+ ```
584
+
585
+ | Option | Description | Default |
586
+ | -------------------------------- | ----------------------------------------------------- | -------- |
587
+ | `--type <type>` | `CATEGORICAL`, `CONTINUOUS`, or `FREEFORM` (required) | — |
588
+ | `--name <name>` | Annotation config name (required) | — |
589
+ | `--description <description>` | Description | — |
590
+ | `--optimization-direction <dir>` | `MINIMIZE`, `MAXIMIZE`, or `NONE` | `NONE` |
591
+ | `--value <label[=score]>` | Categorical label (repeatable; CATEGORICAL configs) | — |
592
+ | `--values <json>` | Categorical values as JSON (CATEGORICAL configs) | — |
593
+ | `--lower-bound <number>` | Lower bound (CONTINUOUS/FREEFORM configs) | — |
594
+ | `--upper-bound <number>` | Upper bound (CONTINUOUS/FREEFORM configs) | — |
595
+ | `--threshold <number>` | Threshold (FREEFORM configs) | — |
596
+ | `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
597
+ | `--no-progress` | Suppress progress output | — |
598
+
599
+ `--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`.
600
+
601
+ ---
602
+
603
+ ### `px annotation-config update <config-identifier>`
604
+
605
+ 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`.
606
+
607
+ ```bash
608
+ # Change only the description; every other field is preserved
609
+ px annotation-config update response-quality --description 'Pass/fail rating from human review'
610
+
611
+ # Rename a config and set its optimization direction
612
+ px annotation-config update response-quality --name answer-quality --optimization-direction MAXIMIZE
613
+
614
+ # Replace the label set of a categorical config
615
+ px annotation-config update response-quality --value good=1 --value acceptable=0.5 --value bad=0
616
+
617
+ # Widen the range of a continuous config
618
+ px annotation-config update confidence --lower-bound -1 --upper-bound 1
619
+
620
+ # Update and capture the config ID (agent-friendly)
621
+ px annotation-config update response-quality --description 'Updated' --format raw --no-progress | jq -r '.id'
622
+ ```
623
+
624
+ | Option | Description | Default |
625
+ | -------------------------------- | --------------------------------------------------- | -------- |
626
+ | `--name <name>` | New name | — |
627
+ | `--description <description>` | New description | — |
628
+ | `--optimization-direction <dir>` | `MINIMIZE`, `MAXIMIZE`, or `NONE` | — |
629
+ | `--value <label[=score]>` | Categorical label (repeatable; CATEGORICAL configs) | — |
630
+ | `--values <json>` | Categorical values as JSON (CATEGORICAL configs) | — |
631
+ | `--lower-bound <number>` | Lower bound (CONTINUOUS/FREEFORM configs) | — |
632
+ | `--upper-bound <number>` | Upper bound (CONTINUOUS/FREEFORM configs) | — |
633
+ | `--threshold <number>` | Threshold (FREEFORM configs) | — |
634
+ | `--format <format>` | `pretty`, `json`, or `raw` | `pretty` |
635
+ | `--no-progress` | Suppress progress output | — |
636
+
637
+ 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`.
638
+
639
+ ---
640
+
641
+ ### `px annotation-config delete <config-id>`
642
+
643
+ 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.
644
+
645
+ ```bash
646
+ # Delete with an interactive confirmation prompt
647
+ px annotation-config delete QW5ub3RhdGlvbkNvbmZpZzoxMjM=
648
+
649
+ # Skip the confirmation prompt (for scripts and agents)
650
+ px annotation-config delete QW5ub3RhdGlvbkNvbmZpZzoxMjM= --yes
651
+
652
+ # Resolve a name to its ID, then delete it
653
+ px annotation-config get response-quality --format raw --no-progress | jq -r '.id' | xargs px annotation-config delete --yes
654
+ ```
655
+
656
+ | Option | Description | Default |
657
+ | --------------- | ------------------------ | ------- |
658
+ | `-y, --yes` | Skip confirmation prompt | — |
659
+ | `--no-progress` | Suppress progress output | — |
660
+
661
+ ---
662
+
494
663
  ### `px auth status`
495
664
 
496
665
  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;AAoLpC;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CA0BvD;AAED,wBAAgB,mCAAmC,IAAI,OAAO,CAS7D"}
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"}