The Sinch CLI handles the full lifecycle: create from template, develop locally, deploy to production, and manage running functions.
The CLI is two things in one binary:
A Sinch developer tool — rent numbers, send SMS and fax, configure voice apps, manage SIP trunks, handle number porting. No Function required.
A Functions toolchain — scaffold from templates, run locally, deploy to production, stream logs, inspect deployed state.
- Functions — create, deploy, develop locally, stream logs, download, delete
- Templates — browse and initialize from pre-built templates (Node.js, C#)
- Voice — manage voice applications and callback URLs, make outbound calls (TTS, conference, custom SVAML), control in-progress calls, manage conferences
- Numbers — search, rent, and manage phone numbers
- Porting — port existing phone numbers in and out of Sinch
- Conversation — send messages (SMS, WhatsApp, Messenger, etc.), manage apps, contacts, webhooks
- Fax — send faxes, check status
- SIP Trunking — manage trunks, endpoints, ACLs, credential lists
- Secrets — store API keys and credentials in the OS keychain
- Function utilities — inspect deployed function database, storage, status; generate docs; manage developer skills
npm install -g @sinch/cliConfiguration is stored in ~/.sinch/config.json. Use sinch config set or sinch auth login to update values.
| Field | Description |
|---|---|
projectId | Your Sinch project ID |
apiUrl | SinchFunctions API URL (defaults to production) |
keyId | Public key identifier (non-secret) |
defaultApplicationKey | Voice application key (non-secret) |
Authentication uses your Sinch API key credentials (Key ID + Key Secret from the Sinch Dashboard under Project > Access Keys).
On login, the CLI:
- Accepts your Key ID and Key Secret
- Exchanges them for an OAuth 2.0 access token
- Stores credentials securely in the OS keychain
- Automatically refreshes the OAuth token on expiry
Voice application credentials (Application Key + Application Secret) are optional and only required for voice callback commands.
For CI/CD pipelines, bypass the keychain with environment variables:
SINCH_PROJECT_ID=...
SINCH_KEY_ID=...
SINCH_KEY_SECRET=...Profiles let you switch between multiple Sinch projects without re-authenticating.
sinch config profile create staging # create a new profile
sinch config profile use staging # switch to it
sinch config profile list # show all profiles
sinch config profile delete staging # remove a profileUse --profile <name> on any command to override the active profile for that invocation.
| Flag | Description |
|---|---|
-h, --help | Show help for the current command |
-V, --version | Print CLI version |
--profile <name> | Use a specific credential profile |
| Variable | Effect |
|---|---|
DEBUG=1 | Enable verbose debug logging |
DEBUG_HTTP=1 | Log HTTP requests and responses |
SINCH_DEBUG=1 | Print stack traces on uncaught errors |
sinch auth login # authenticate
sinch templates list # browse available templates
sinch functions init # create a function
sinch functions dev # start local dev server
sinch voice applications callbacks set <url> # point your Voice app at your function
sinch functions deploy # deploy to production
sinch functions logs --follow # stream live logs