Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

How to Use TypeScript and Deno to Build a CLI

Blog post from Twilio

Post Details
Company
Date Published
Author
Maciej Treder
Word Count
2,951
Language
English
Hacker News Points
-
Summary

This tutorial demonstrates how to build a CLI application using Deno, a new runtime environment for JavaScript that provides capabilities similar to Node.js without the heavyweight package deployment and complex package management. The application uses Twilio's Programmable SMS API to send messages and reports on delivery status. The tutorial shows how to read command line arguments in Deno using the yargs library, register alias shortcuts, and fallback to environment variables when necessary. It also covers how to use the TwilioSMS helper method to send SMS messages with a predefined message request object. By following this tutorial, developers can create a simple CLI application that sends SMS messages using Twilio's API.