npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sinch/cli

v0.5.7

Published

Official Sinch CLI - Manage all Sinch products from your terminal

Readme

Sinch CLI

Official command-line interface for Sinch - Manage Functions, Voice, SMS, and more from your terminal

npm version License: MIT

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

# Install
npm install -g @sinch/cli

Installation Channels:

  • @latest (default) - Production-ready stable releases published to npmjs
  • @dev - Cutting-edge builds auto-published to the GitLab project registry on every push. Dev builds declare the platform packages as regular dependencies (all 5 install) because GitLab's registry strips optionalDependencies from npm metadata — the launcher still picks the host's binary

How it works — per-architecture packages:

@sinch/cli is a thin launcher. The actual binary ships in a platform-specific package that npm selects automatically at install time:

| Package | Platform | | ------------------------- | ------------------------------- | | @sinch/cli-linux-x64 | Linux x64 | | @sinch/cli-linux-arm64 | Linux ARM64 | | @sinch/cli-darwin-x64 | macOS Intel | | @sinch/cli-darwin-arm64 | macOS Apple Silicon | | @sinch/cli-win32-x64 | Windows x64 / ARM64 (emulation) |

This is the same model used by esbuild and Biome. No install scripts run — npm install --ignore-scripts works fine. Do not use --omit=optional; the platform binary is an optional dependency and the CLI will print an actionable error if it is missing.

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 login

2. 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-ivr

3. Test locally

cd my-voice-app
sinch functions dev

# With runtime tunnel for webhooks
sinch functions dev

4. Deploy to production

sinch functions deploy

5. 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 voice v2 calls list | List Voice API v2 calls | | sinch voice v2 calls create <to> | Place a Voice API v2 call | | sinch voice v2 calls patch <target> | Add a party to a live call | | sinch voice v2 services list | List Voice API v2 services | | sinch secrets add | Store secrets securely | | sinch config profile list | List credential profiles | | sinch config profile create <name> | Create a credential profile | | sinch templates list | Browse available templates | | sinch help | Show help for any command |

Global options: --profile <name> — use a specific credential profile for any command.

Templates

Create functions from pre-built templates:

Voice Templates

  • node/simple-voice-ivr - Interactive voice menu system
  • node/call-forwarding - Intelligent call routing
  • node/number-masking - Privacy-preserving calls
  • node/conference-call - Multi-party conferences
  • node/voicemail - Complete voicemail system

More Languages

  • csharp/simple-voice-ivr - IVR in C#/.NET
  • java/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 during sinch functions dev via file watching (Node.js) or dotnet watch (C#). No flags needed:

sinch functions dev

🐛 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 --json

☎️ Voice API v2 (preview)

Voice API v2 replaces the v1 voice application with a service — the container that routes inbound calls — and models a call as an ordered list of commands.

# Services: the inbound routing container
sinch voice v2 services list
sinch voice v2 services create --name "Support line" --webhook-url https://fn.example.com
sinch voice v2 services update <service-id> --webhook-url https://fn.example.com
sinch voice v2 services delete <service-id>

# Calls
sinch voice v2 calls list --call-result COMPLETED
sinch voice v2 calls get <call-id>

# Place a call
sinch voice v2 calls create +15551234567 --from +15559876543

# Bridge a WebSocket audio leg (STREAM)
sinch voice v2 calls create +15551234567 --stream wss://example.com/audio

# Bridge the Voice Relay — Sinch runs STT/TTS, you exchange text
sinch voice v2 calls create +15551234567 --relay wss://example.com/relay --tts-voice Emma

# Print the request body without placing a call
sinch voice v2 calls create +15551234567 --stream wss://example.com/audio --dry-run

# Call two parties and bridge them
sinch voice v2 calls bridge +15551110000 +15552220000 --from +15559876543

# Control a live call: end legs, or dial a third party into its bridge
sinch voice v2 calls hangup <session-id> --call-name origin
sinch voice v2 calls patch <session-id> --call-name origin --dial +15550001111 --end-leg origin

calls patch --dial is the one operation v1 has no equivalent of. v1 can end a leg and play audio into one, but it cannot add a leg to a call that is already up. v2 can, and everything already on the bridge — the other party, a media stream, the Voice Relay — stays attached through the handover.

sinch functions deploy already points a service's webhook at the deployed function when the function declares VOICE_SERVICE_ID; these commands are the same surface for use outside a deploy.

SIP addressing

Write v2 SIP destinations as a full URI, with the scheme. The v2 sip.endpoint schema constrains the field with pattern: "^sips?:", so sip:[email protected] is required and a bare [email protected] is rejected.

The scheme also picks the transport when you do not name one:

| You write | Transport | Meaning | | ---------------------------- | --------- | -------------------- | | sip:[email protected] | UDP | Unencrypted | | sips:[email protected] | TLS | Encrypted signalling |

So the one character between sip: and sips: decides whether SIP signalling is encrypted — worth a second look before a production run.

Do not carry the v1 habit over. Voice v1 wants a bare address and fails a prefixed one with CONGESTION; v2 wants the prefix and rejects a bare one. Opposite rules, different schemas. --dry-run prints the exact body if you want to confirm which shape you are sending.

Documentation

See the wiki for architecture, features, and operations docs.

To clone locally: git clone [email protected]:sinch/sinch-projects/voice/functions/sinch-cli.wiki.git wiki

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 login

Debug Levels

DEBUG=1 sinch functions dev       # Basic debug output
DEBUG=2 sinch functions deploy    # Verbose + HTTP logging
DEBUG=3 sinch functions dev       # Full debug with headers

Common Issues

  • Command not found: Reinstall globally with npm install -g @sinch/cli
  • "platform package not installed" error: Your package manager skipped optional dependencies. Reinstall without --omit=optional: npm install -g @sinch/cli
  • Authentication failed: Check your Sinch API credentials with sinch auth status
  • Deployment failed: Verify your function configuration and project access

Development

See docs/DEVELOPMENT.md for the full contributor guide.

Quick start:

npm install
npm run build
npm run setup   # copies binary to ~/.sinch/bin/ and installs completions

Escape hatch — force a specific binary:

SINCH_CLI_BINARY=/path/to/binary sinch <cmd> bypasses platform-package resolution and runs the given binary directly. Useful when testing a locally built binary or a downloaded release without installing the npm package.

Support

License

MIT License - Copyright © 2025 Sinch