retell-cli 1.5.0 → 1.6.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/CHANGELOG.md +86 -0
- package/README.md +139 -4
- package/dist/index.js +1970 -296
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,92 @@ All notable changes to the Retell AI CLI will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.6.0] - 2026-04-16
|
|
9
|
+
|
|
10
|
+
Bulk addition of CLI surface for Retell SDK resources that were previously unwrapped or partially wrapped. Bumped `retell-sdk` dependency to `^5.12.0`.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
#### Calls (`calls`)
|
|
15
|
+
- `calls create-phone` — create an outbound phone call (supports `--agent-override`, `--metadata`, `--dynamic-variables`, `--custom-sip-headers`, `--override-agent-id`, `--override-agent-version`, `--ignore-e164-validation`).
|
|
16
|
+
- `calls create-web` — create a web call for browser-based agents.
|
|
17
|
+
- `calls register-phone` — register a call for custom telephony.
|
|
18
|
+
- `calls update <call_id>` — update metadata, custom attributes, dynamic variables, and data-storage setting.
|
|
19
|
+
- `calls delete <call_id>` — delete a call and its data.
|
|
20
|
+
- Note: `calls list` / `calls get` are intentionally omitted; use `transcripts list` / `transcripts get` / `transcripts search`.
|
|
21
|
+
|
|
22
|
+
#### Batch Calls (`batch-calls`)
|
|
23
|
+
- `batch-calls create` — schedule a batch of outbound calls from a JSON tasks file with optional `--call-time-window`, `--reserved-concurrency`, `--trigger-timestamp`.
|
|
24
|
+
|
|
25
|
+
#### LLMs (`llms`)
|
|
26
|
+
- `llms list`, `llms get <llm_id>`, `llms delete <llm_id>`.
|
|
27
|
+
- `llms create` — via simple flags (`--general-prompt`, `--model`, `--s2s-model`, `--start-speaker`, `--begin-message`) or full `--file` body.
|
|
28
|
+
- `llms update <llm_id> --file <path>` — full body update.
|
|
29
|
+
|
|
30
|
+
#### Voices (`voices`)
|
|
31
|
+
- `voices list`, `voices get <voice_id>`, `voices search`.
|
|
32
|
+
- `voices add-resource` — add a community voice to the account library.
|
|
33
|
+
- `voices clone` — clone a voice from one or more audio files (repeatable `--file`).
|
|
34
|
+
|
|
35
|
+
#### Chats (`chats`) and Chat Agents (`chat-agents`)
|
|
36
|
+
- `chats create`, `chats get`, `chats list`, `chats update`, `chats end`.
|
|
37
|
+
- `chats complete` — send a user message to an existing chat and receive the agent's completion.
|
|
38
|
+
- `chats sms` — create an SMS-backed chat session.
|
|
39
|
+
- `chat-agents list/get/create/update/delete/versions/publish` — full chat agent lifecycle.
|
|
40
|
+
|
|
41
|
+
#### Phone Numbers (CRUD gap filled)
|
|
42
|
+
- `phone-numbers create` — purchase a new number and bind agents (reuses weighted-agent flags from `import`).
|
|
43
|
+
- `phone-numbers update <phone_number>` — update bound agents, nickname, SIP auth (note: SDK uses `auth_username`/`auth_password` on update vs `sip_trunk_auth_username`/`sip_trunk_auth_password` on import; CLI flag `--sip-username/--sip-password` translates correctly), country allow-lists, webhook URLs.
|
|
44
|
+
- `phone-numbers delete <phone_number>` — release a phone number.
|
|
45
|
+
|
|
46
|
+
#### Flow Components (`flow-components`)
|
|
47
|
+
- `flow-components list/get/create/update/delete` — CRUD for reusable conversation-flow components (create/update bodies via `--file`).
|
|
48
|
+
|
|
49
|
+
#### Concurrency and MCP Tools
|
|
50
|
+
- `concurrency get` — view the org's current call concurrency and limits.
|
|
51
|
+
- `agents mcp-tools <agent_id> --mcp-id <id>` — list MCP tools available to an agent from a specific MCP server.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- Bumped `retell-sdk` from `^5.10.3` to `^5.12.0`.
|
|
56
|
+
- Extracted weighted-agent parsing from `phone-numbers/import.ts` into a shared `src/services/weighted-agents.ts` so `import`, `create`, and `update` can share a single implementation. Behavior of `phone-numbers import` is unchanged; its mutual-exclusion errors now flow through `handleSdkError` as `ValidationError` rather than via an inline `process.exit(1)`, giving consistent error shape with other commands.
|
|
57
|
+
- Added a small `src/services/json-arg.ts` helper for flags that accept inline JSON or `@path` file references (`--metadata`, `--dynamic-variables`, `--custom-sip-headers`, etc.).
|
|
58
|
+
|
|
59
|
+
### Tests
|
|
60
|
+
|
|
61
|
+
- Added ~80 new test cases covering happy paths, flag parsing, validation errors, and SDK error passthrough for every new command, plus a dedicated test file for the weighted-agents service and json-arg helper.
|
|
62
|
+
|
|
63
|
+
### Fixed (post-review)
|
|
64
|
+
|
|
65
|
+
- `llms update --version` now sets `query_version` on the request params instead of a nonexistent body `version` field — the flag previously had no effect.
|
|
66
|
+
- Numeric flag parsing (`--version`, `--limit`, `--area-code`, `--trigger-timestamp`, etc.) now rejects empty and whitespace-only strings. Centralized via `src/services/numeric-flag.ts`.
|
|
67
|
+
- `calls update`, `chats update`, and `phone-numbers update` now require at least one mutation flag instead of silently sending an empty body to the SDK.
|
|
68
|
+
- Body-as-file flags (`llms create/update`, `chat-agents create/update`, `flow-components create/update`, `calls create-phone/create-web --agent-override`, `batch-calls create --call-time-window`) now reject non-object JSON (arrays, null, scalars) with a clear `ValidationError` via new `readJsonObjectFile` helper.
|
|
69
|
+
- README: per-command flag lists for `calls create-phone / create-web / register-phone` now reflect the actual supported flags on each command.
|
|
70
|
+
- `phone-numbers create` help no longer claims `--country-code` defaults to US or `--number-provider` defaults to twilio (the CLI does not set these defaults); the SDK still applies those server-side.
|
|
71
|
+
- `loadJsonArg` now throws a descriptive error for a bare `@` with no path.
|
|
72
|
+
|
|
73
|
+
### Fixed (second review pass)
|
|
74
|
+
|
|
75
|
+
- `chat-agents create` / `llms create` now reject `--file` combined with simple flags (previously the simple flags were silently ignored).
|
|
76
|
+
- `phone-numbers update` can now clear nullable fields with an explicit empty string (`--nickname ""`, `--fallback-number ""`, `--inbound-webhook-url ""`, `--inbound-sms-webhook-url ""`, `--transport ""` map to `null` in the SDK request). Previously these were silently dropped.
|
|
77
|
+
- `phone-numbers create` / `update` now validate `--transport` against `TLS`/`TCP`/`UDP` before the SDK call (previously typos passed through and produced opaque 400s).
|
|
78
|
+
- `llms update` / `chat-agents update` / `flow-components update` now reject an empty `--file` body object, matching the empty-body guard already in place on `calls update` / `chats update` / `phone-numbers update`.
|
|
79
|
+
- `phone-numbers import` no longer advertises `--inbound-sms-agents` / `--outbound-sms-agents`; SMS agent bindings are not supported on import per the SDK. Use `phone-numbers update` after import to bind SMS agents.
|
|
80
|
+
- Pre-existing numeric flag call sites in `src/index.ts` (`transcripts list/analyze/search`, `agents list/get/update`, `tests cases/batches create`, `flows list/get/update` — `--limit`, `--engine-version`, `--latency-threshold`, `--silence-threshold`) migrated to the centralized `parseNumericFlag`. Invalid or whitespace-only values now produce a clear error instead of silently becoming `NaN`.
|
|
81
|
+
- Weighted-agents parser now rejects empty `agent_id` (e.g. `:0.5`, `agent_1:0.5,:0.5`) with a clear error instead of emitting `{agent_id: "", weight: 0.5}`.
|
|
82
|
+
|
|
83
|
+
### Fixed (fourth review pass)
|
|
84
|
+
|
|
85
|
+
- `chats complete` now rejects empty `--chat-id` / `--content` via `requireNonEmpty` (was missed in the third-pass rollout). Commander treats `--flag ""` as a defined string, so the empty values would otherwise reach the SDK and surface as an opaque 400.
|
|
86
|
+
- `applyWeightedAgents` now rejects empty-string agent flags (`--inbound-agent ""`, `--outbound-agent ""`, `--inbound-agents ""`, `--outbound-agents ""`, `--inbound-sms-agents ""`, `--outbound-sms-agents ""`) with a clear `VALIDATION_ERROR` instead of silently dropping the binding. Closes a hole where `phone-numbers create/update/import --inbound-agent ""` would ship with no inbound binding the user thought they'd set.
|
|
87
|
+
- `phone-numbers update --termination-uri ""` / `--sip-username ""` / `--sip-password ""` now reject (these SDK fields are not nullable). `--allowed-inbound-country-list ""` / `--allowed-outbound-country-list ""` now clear the list (map to `null`) — matching the nullable-clearing pattern applied to the other update fields in the second pass.
|
|
88
|
+
- Removed dead `parseWeightedAgents` re-export from `phone-numbers/import.ts` and the single test that only exercised the re-export (not behavior).
|
|
89
|
+
|
|
90
|
+
### Known gaps
|
|
91
|
+
|
|
92
|
+
- Knowledge-base `update` is still not exposed by the SDK (only `create/retrieve/list/delete/addSources/deleteSource`), so no CLI command was added there.
|
|
93
|
+
|
|
8
94
|
## [1.4.0] - 2026-01-27
|
|
9
95
|
|
|
10
96
|
### Added
|
package/README.md
CHANGED
|
@@ -8,10 +8,15 @@ Community-built command-line tool for Retell AI - designed to give AI assistants
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
10
|
- **Transcript Management** - List, retrieve, and analyze call transcripts
|
|
11
|
-
- **Agent Management** - Full CRUD for Retell AI agents (create, list, update, delete, versions)
|
|
12
|
-
- **
|
|
11
|
+
- **Agent Management** - Full CRUD for Retell AI agents (create, list, update, delete, versions, MCP tools)
|
|
12
|
+
- **Call Creation** - Launch phone, web, and SMS-chat calls; register custom-telephony calls; schedule batch calls
|
|
13
|
+
- **Phone Number Management** - Purchase, import, list, update, and release phone numbers (with weighted agent routing)
|
|
14
|
+
- **Chat Sessions** - Create and manage chat sessions, chat agents, SMS chats, and LLM completions
|
|
15
|
+
- **LLM + Voice Resources** - CRUD Retell LLMs; browse, search, add, and clone voice resources
|
|
13
16
|
- **Prompt Engineering** - Pull, edit, and update agent prompts
|
|
14
17
|
- **Tool Management** - Full CRUD for agent tools (webhooks, custom functions, etc.)
|
|
18
|
+
- **Flow Components** - Reusable conversation-flow components (CRUD)
|
|
19
|
+
- **Concurrency Monitoring** - Check org-wide call concurrency and limits
|
|
15
20
|
- **Multi-format Support** - Works with Retell LLM and Conversation Flows
|
|
16
21
|
- **AI-Friendly** - JSON output by default for AI coding assistants
|
|
17
22
|
- **Cross-Shell** - Works in bash, fish, zsh, and more
|
|
@@ -602,7 +607,7 @@ List all phone numbers in your account.
|
|
|
602
607
|
**Example:**
|
|
603
608
|
```bash
|
|
604
609
|
retell phone-numbers list
|
|
605
|
-
retell phone-numbers list --fields phone_number,nickname,
|
|
610
|
+
retell phone-numbers list --fields phone_number,nickname,inbound_agents,outbound_agents
|
|
606
611
|
```
|
|
607
612
|
|
|
608
613
|
#### `retell phone-numbers get <phone_number> [options]`
|
|
@@ -615,7 +620,7 @@ Get details of a specific phone number.
|
|
|
615
620
|
**Example:**
|
|
616
621
|
```bash
|
|
617
622
|
retell phone-numbers get +14157774444
|
|
618
|
-
retell phone-numbers get +14157774444 --fields phone_number,
|
|
623
|
+
retell phone-numbers get +14157774444 --fields phone_number,inbound_agents,outbound_agents
|
|
619
624
|
```
|
|
620
625
|
|
|
621
626
|
#### `retell phone-numbers import [options]`
|
|
@@ -628,6 +633,8 @@ Import a phone number from custom telephony (e.g., Twilio, Vonage).
|
|
|
628
633
|
- `--nickname <name>` - Friendly name for reference
|
|
629
634
|
- `--inbound-agent <id>` - Agent ID for inbound calls
|
|
630
635
|
- `--outbound-agent <id>` - Agent ID for outbound calls
|
|
636
|
+
- `--inbound-agents <spec>` - Weighted inbound agents, e.g. `agent_1:0.6,agent_2:0.4` (mutually exclusive with `--inbound-agent`)
|
|
637
|
+
- `--outbound-agents <spec>` - Weighted outbound agents (same spec format as `--inbound-agents`)
|
|
631
638
|
- `--sip-username <user>` - SIP trunk auth username
|
|
632
639
|
- `--sip-password <pass>` - SIP trunk auth password
|
|
633
640
|
- `--fields <fields>` - Comma-separated list of fields to return
|
|
@@ -781,6 +788,134 @@ retell transcripts analyze <call_id> --hotspots-only
|
|
|
781
788
|
# 3. No jq or grep needed - direct JSON parsing!
|
|
782
789
|
```
|
|
783
790
|
|
|
791
|
+
### Calls (create / update / delete)
|
|
792
|
+
|
|
793
|
+
Call listing and retrieval stay under `transcripts`. Use `calls` to create and mutate calls.
|
|
794
|
+
|
|
795
|
+
```bash
|
|
796
|
+
# Outbound phone call
|
|
797
|
+
retell calls create-phone --from-number +14157774444 --to-number +12137774445
|
|
798
|
+
|
|
799
|
+
# Web call (browser-based agent)
|
|
800
|
+
retell calls create-web --agent-id agent_xxx --metadata '{"session_id":"s1"}'
|
|
801
|
+
|
|
802
|
+
# Register a call for custom telephony
|
|
803
|
+
retell calls register-phone --agent-id agent_xxx --direction outbound
|
|
804
|
+
|
|
805
|
+
# Update metadata / data storage on an existing call
|
|
806
|
+
retell calls update call_abc123 --metadata '{"customer_id":"c_1"}' \
|
|
807
|
+
--data-storage-setting everything_except_pii
|
|
808
|
+
|
|
809
|
+
# Delete a call and its data
|
|
810
|
+
retell calls delete call_abc123
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
Shared on all three: `--metadata`, `--dynamic-variables`, `--fields`.
|
|
814
|
+
|
|
815
|
+
- `create-phone` also: `--override-agent-id`, `--override-agent-version`, `--custom-sip-headers`, `--agent-override <path>` (path to JSON), `--ignore-e164-validation`.
|
|
816
|
+
- `create-web` also: `--agent-version`, `--agent-override <path>`, `--current-node-id`, `--current-state`.
|
|
817
|
+
- `register-phone` also: `--agent-version`, `--direction`, `--from-number`, `--to-number`.
|
|
818
|
+
|
|
819
|
+
### Batch Calls
|
|
820
|
+
|
|
821
|
+
```bash
|
|
822
|
+
# Schedule a batch of outbound calls from a JSON tasks file
|
|
823
|
+
retell batch-calls create \
|
|
824
|
+
--from-number +14157774444 \
|
|
825
|
+
--tasks tasks.json \
|
|
826
|
+
--name "April outreach" \
|
|
827
|
+
--reserved-concurrency 10
|
|
828
|
+
|
|
829
|
+
# Optional: restrict calling windows
|
|
830
|
+
retell batch-calls create --from-number +1 --tasks tasks.json \
|
|
831
|
+
--call-time-window window.json
|
|
832
|
+
```
|
|
833
|
+
|
|
834
|
+
### LLMs
|
|
835
|
+
|
|
836
|
+
```bash
|
|
837
|
+
retell llms list --fields llm_id,is_published
|
|
838
|
+
retell llms get llm_abc
|
|
839
|
+
retell llms create --general-prompt "You are a helpful agent." --model gpt-4.1
|
|
840
|
+
retell llms create --file my-llm.json
|
|
841
|
+
retell llms update llm_abc --file updates.json
|
|
842
|
+
retell llms delete llm_abc
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
### Voices
|
|
846
|
+
|
|
847
|
+
```bash
|
|
848
|
+
retell voices list --fields voice_id,voice_name,provider
|
|
849
|
+
retell voices get voice_abc
|
|
850
|
+
retell voices search --search-query "warm female" --voice-provider elevenlabs
|
|
851
|
+
retell voices add-resource --provider-voice-id pv_1 --voice-name "Allie"
|
|
852
|
+
retell voices clone --voice-name "Dev Clone" --voice-provider elevenlabs --file sample.wav
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
### Chats
|
|
856
|
+
|
|
857
|
+
```bash
|
|
858
|
+
retell chats create --agent-id agent_xxx
|
|
859
|
+
retell chats list --limit 10 --sort-order descending
|
|
860
|
+
retell chats get chat_abc
|
|
861
|
+
retell chats complete --chat-id chat_abc --content "What's the status?"
|
|
862
|
+
retell chats sms --from-number +14157774444 --to-number +12137774445
|
|
863
|
+
retell chats update chat_abc --metadata '{"k":"v"}'
|
|
864
|
+
retell chats end chat_abc
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
### Chat Agents
|
|
868
|
+
|
|
869
|
+
```bash
|
|
870
|
+
retell chat-agents list
|
|
871
|
+
retell chat-agents create --llm-id llm_abc --name "Support Chat"
|
|
872
|
+
retell chat-agents get ca_abc --version 2
|
|
873
|
+
retell chat-agents update ca_abc --file updates.json
|
|
874
|
+
retell chat-agents versions ca_abc
|
|
875
|
+
retell chat-agents publish ca_abc
|
|
876
|
+
retell chat-agents delete ca_abc
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
### Phone Numbers (Full CRUD)
|
|
880
|
+
|
|
881
|
+
```bash
|
|
882
|
+
# Purchase a new number
|
|
883
|
+
retell phone-numbers create --area-code 415 --nickname "Frontdesk" \
|
|
884
|
+
--inbound-agent agent_xxx
|
|
885
|
+
|
|
886
|
+
# Update a purchased number (weighted agents + SIP)
|
|
887
|
+
retell phone-numbers update +14157774444 \
|
|
888
|
+
--inbound-agents "agent_1:0.6,agent_2:0.4" \
|
|
889
|
+
--nickname "Support"
|
|
890
|
+
|
|
891
|
+
# Release a number
|
|
892
|
+
retell phone-numbers delete +14157774444
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
### Flow Components
|
|
896
|
+
|
|
897
|
+
```bash
|
|
898
|
+
retell flow-components list
|
|
899
|
+
retell flow-components get comp_abc
|
|
900
|
+
retell flow-components create --file component.json
|
|
901
|
+
retell flow-components update comp_abc --file updates.json
|
|
902
|
+
retell flow-components delete comp_abc
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
### Concurrency
|
|
906
|
+
|
|
907
|
+
```bash
|
|
908
|
+
retell concurrency get
|
|
909
|
+
retell concurrency get --fields concurrency_limit,current_concurrency
|
|
910
|
+
```
|
|
911
|
+
|
|
912
|
+
### Agent MCP Tools
|
|
913
|
+
|
|
914
|
+
```bash
|
|
915
|
+
retell agents mcp-tools agent_abc --mcp-id mcp_1
|
|
916
|
+
retell agents mcp-tools agent_abc --mcp-id mcp_1 --component-id comp_1 --version 3
|
|
917
|
+
```
|
|
918
|
+
|
|
784
919
|
## Common Workflows
|
|
785
920
|
|
|
786
921
|
### Analyzing Failed Calls
|