@sinch/cli
v0.2.0
Published
Official Sinch CLI - Manage all Sinch products from your terminal
Keywords
Readme
Sinch CLI
Official command-line interface for Sinch - Manage Functions, Voice, SMS, and more from your terminal
Overview
The Sinch CLI is your unified developer tool for managing all Sinch products. Currently featuring full support for Sinch Functions - create, test, and deploy serverless voice applications. More Sinch products coming soon!
Installation
# Latest stable release (production)
npm install -g @sinch/cli
# Beta releases (pre-release testing)
npm install -g @sinch/cli@beta
# Dev channel (bleeding edge - latest from main branch)
npm install -g @sinch/cli@devInstallation Channels:
@latest(default) - Production-ready stable releases@beta- Pre-release versions for testing new features@dev- Cutting-edge builds from main branch (auto-published on every commit)
Prerequisites
- Node.js: 20.0.0 or higher (Node 20 LTS or Node 22 LTS recommended)
- npm: 9.0.0 or higher
- OS: Windows 10+, macOS 10.15+, or Ubuntu 20.04+
Quick Start
1. Authenticate with Sinch
sinch auth login2. Create a new function
# Interactive mode - choose from templates
sinch functions init
# Or specify a template directly
# package | function | command | template
sinch functions init simple-voice-ivr3. Test locally
cd my-voice-app
sinch functions dev
# With runtime tunnel for webhooks
sinch functions dev4. Deploy to production
sinch functions deploy5. Monitor your function
# List all functions
sinch functions list
# Stream logs
sinch functions logs <function-id> --follow
# Check status
sinch functions status <function-id>Available Commands
| Command | Description |
| -------------------------------------- | --------------------------------- |
| sinch auth login | Authenticate with Sinch platform |
| sinch functions init | Create new function from template |
| sinch functions dev | Start local development server |
| sinch functions deploy | Deploy function to production |
| sinch functions list | List all deployed functions |
| sinch functions logs | Stream function logs |
| sinch functions delete | Delete a deployed function |
| sinch sip trunks list | List SIP trunks |
| sinch sip trunks create | Create a new SIP trunk |
| sinch sip endpoints list <trunkId> | List endpoints for a trunk |
| sinch sip endpoints create <trunkId> | Create a SIP endpoint |
| sinch secrets add | Store secrets securely |
| sinch templates list | Browse available templates |
| sinch help | Show help for any command |
Templates
Create functions from pre-built templates:
Voice Templates
node/simple-voice-ivr- Interactive voice menu systemnode/call-forwarding- Intelligent call routingnode/number-masking- Privacy-preserving callsnode/conference-call- Multi-party conferencesnode/voicemail- Complete voicemail system
More Languages
csharp/simple-voice-ivr- IVR in C#/.NETjava/simple-voice-ivr- Q4 2025
Features
🔐 Secure Secrets Management
Secrets are stored in your OS keychain (Windows Credential Manager, macOS Keychain, Linux Secret Service):
# Add a secret
sinch secrets add STRIPE_KEY sk_test_123456
# List secrets
sinch secrets list
# Use in your function
const stripeKey = process.env.STRIPE_KEY;🔄 Hot Reload Development
Changes to your function are automatically reloaded:
sinch functions dev --watch🐛 VS Code Debugging
All templates include VS Code launch configs. Just press F5 to debug!
🌐 Tunnel Support
Test webhooks locally with runtime-integrated tunneling:
sinch functions dev
# Choose tunnel preference when prompted
# Tunnel runs inside your function runtime📞 Elastic SIP Trunking
Manage SIP trunks and endpoints for voice connectivity:
# List your SIP trunks
sinch sip trunks list
# Create a new trunk (interactive)
sinch sip trunks create
# Add an endpoint to a trunk
sinch sip endpoints create <trunk-id>
# Get JSON output for scripting
sinch sip trunks list --jsonDocumentation
- Full Documentation: /docs/README.md
- Command Reference: /docs/COMMANDS.md
- Development Guide: /docs/DEVELOPMENT.md
- Examples: /docs/examples/
Resources
- Sinch Voice API: https://www.sinch.com/products/apis/voice/
- Documentation: Full CLI reference in /docs
- Templates Gallery: Browse available templates with
sinch templates list
Troubleshooting
Authentication Issues
# Check authentication status
sinch auth status
# Re-authenticate if needed
sinch auth logout
sinch auth loginDebug Mode
# Enable debug output
DEBUG=1 sinch functions dev
# HTTP request debugging
DEBUG_HTTP=1 sinch functions deployCommon Issues
- Command not found: Reinstall globally with
npm install -g @sinch/sinch-cli@beta - Authentication failed: Check your Sinch API credentials with
sinch auth status - Deployment failed: Verify your function configuration and project access
Support
- Documentation: Full CLI Documentation
- Issues: Report a Bug
- Email: [email protected]
License
MIT License - Copyright © 2025 Sinch
