@thisispamela/cli
v1.1.3
Published
Pamela Enterprise Voice API CLI
Readme
@thisispamela/cli
Command-line interface for the Pamela Enterprise Voice API. Make calls, check status, and manage your API from the terminal.
Installation
npm install -g @thisispamela/cliOr use with npx:
npx @thisispamela/cli <command>Setup
Set your API key as an environment variable: Get your API key from developer.thisispamela.com.
export PAMELA_API_KEY=pk_live_your_api_key_hereOr pass it with the --api-key flag on each command.
Commands
Create a Call
thisispamela create-call \
--to "+15551234567" \
--task "Schedule a demo for tomorrow at 2pm" \
--voice "auto" \
--agent-name "Pamela" \
--caller-name "Acme Corp"Options:
--to(required): Phone number in E.164 format--task(required): Task description for the call--country: ISO country code (optional)--locale: Locale string (optional, e.g., "en-US")--voice: Voice preference"male" | "female" | "auto"(optional)--agent-name: Agent name override (optional)--caller-name: Name of who the agent is calling on behalf of (optional)--max-duration-seconds: Maximum call duration (optional, default: 299)
Get Call Status
thisispamela get-call --call-id call_abc123def456List Calls
thisispamela list-calls \
--limit 10 \
--status completed \
--start-date 2024-01-01 \
--end-date 2024-01-31Options:
--limit: Maximum number of calls to return (default: 50)--offset: Pagination offset (default: 0)--status: Filter by status (queued,ringing,in_progress,completed,failed,cancelled)--start-date: Filter calls from this date (YYYY-MM-DD)--end-date: Filter calls until this date (YYYY-MM-DD)
Cancel a Call
thisispamela cancel-call --call-id call_abc123def456Hangup a Call
thisispamela hangup-call --call-id call_abc123def456Global Options
All commands support:
--api-key <key>: Pamela API key (falls back toPAMELA_API_KEYenv var)--base-url <url>: Custom API base URL (default:https://api.thisispamela.com)
Examples
Quick Call
export PAMELA_API_KEY=pk_live_xxx
thisispamela create-call --to "+15551234567" --task "Remind about meeting"Check Call Status
thisispamela get-call --call-id call_abc123List Today's Calls
thisispamela list-calls --start-date $(date +%Y-%m-%d) --status completedCancel In-Progress Call
thisispamela cancel-call --call-id call_xyz789Output Format
All commands output JSON for easy parsing and integration with scripts:
# Create call
thisispamela create-call --to "+15551234567" --task "Test"
# Output: {"id": "call_abc123", "status": "queued", ...}
# Get call
thisispamela get-call --call-id call_abc123
# Output: {"id": "call_abc123", "status": "completed", "transcript": [...], ...}Error Handling
Errors are output as JSON to stderr:
{
"error": {
"name": "AuthenticationError",
"message": "Invalid API key"
}
}Getting API Keys
See the JavaScript SDK README for instructions on obtaining and managing API keys.
License
MIT
