SIGNAL Behind the Scenes: Twilio's Ashley Roach

August 22, 2019
Written by


In this interview, Ashley Roach, a Product Manager on Twilio's X Developer Experiences team sat down with Lizzie Siegle, a Developer Evangelist at Twilio to discuss Twilio's new CLI tool which is now in Beta. We hope you enjoy this interview transcript.

The following interview took place August 6th, 2019 at Twilio's SIGNAL conference at Moscone West in San Francisco, California. It previously aired on our SIGNAL TV broadcast over on

You can also find this interview on Youtube on Twilio's channel.

Meet Ashley Roach

Lizzie: Hi everyone, I'm Lizzie, a Developer Evangelist at Twilio, and we are back with Ashley Roach, a Product Manger on Twilio X.

Ashley: Hey, everybody. What's going on Lizzie?

Lizzie: Very excited to have you on.

Ashley: Yeah, cool.

Demoing the new Twilio CLI

Also see our Command Line Interface launch blog post.

Lizzie: You have a CLI demo for us?

Ashley: I do. One of the things that we at Twilio for a long time, the experience for developers has been either the console or the APIs, and the console's great for a lot of things, for doing things like purchasing phone numbers, viewing your message logs, and so on. You have to go to the website, log in, sometimes click around a lot. That's great for some situations, but sometimes that's not as convenient for a Developer, for example. *Or maybe a System Administrator. On the flip side, we've had the API, and the API is great because it's super powerful and you can do lots of great things in many different languages because it's quite simple. The problem with that is then you need to know a fair amount of coding in order to actually make the API calls and format the output and do whatever your manager, or whoever it is that asked you to do this thing. Maybe a Product Manager like me. Hey, I need that data. Then you got to write some code. There's a spot in between that we thought... and we've heard from customers, that is a command line interface. The command line, if you're not totally familiar with what a command line is, this is the command line if you can see this. This is intimidating to some people, but I think for a developer, in a way this is like bread and butter stuff. So now we have the ability to twilio at the command line. It's pretty cool. You're going to unleash the power of Twilio from your control prompt.

Lizzie: I love that line.

Ashley: You're unleashing, so that's amazing.

Lizzie: That's what we do at Twilio.

Ashley: The cool thing is... I'm running on a Mac. You guys can totally install this right now if you wanted to. Those of you online, you can go to That will take you to the quick start guide. I'm looking at the chats. It's entertaining. You can go to that quick start. That'll help you get started in the Mac OS. We have a home brew installer that makes it really easy to get installed. On Windows and Lynx, you can use npm. Npm install twilio-cli-g. That's how you get it installed. You log in to create a profile, is the first thing you have to do when you start. These are profiles. twilio... You don't have to type profiles, you can just type login and hit enter, and we give a name to your profile. I'm not going to fully go through this thing. Let's call it that. It's a good name. Maybe it's Dutch or something.

Lizzie: Very memorable I think it reminds me of Frozen.

Ashley: Yeah.

Lizzie: Crossing the Fjord like fjord.

Ashley: Yeah, yeah, exactly. You put in your Account SID and then you put in your Account Token, and that will create a profile. Once you've created a profile, you can say show me the profiles. I haven't updated my... We used to call them projects until not too long ago, but they're profiles, trust me. I haven't updated my autocomplete, which is a great feature. Let me do this manually, twilio profiles: list.

Lizzie: Yes, Roberta Boles, naming things is very hard.

Ashley: It is. The people that can name things excellently are awesome.

Lizzie: I saw a good meme that was like, naming variables is like the most challenging thing ever, but naming Iterables is like "I" like it's always "I".

Ashley: Yeah. Exactly. What you can see here then, at the bottom of the screen, actually looks like it might be a little cut off... Let me do this again up here. I have three profiles. What that means is if I'm doing a download, I can use this profile with a different phone number, for example. Or I can just have this default one. I can switch them to be active, depending on what you want to do. That's pretty sweet and useful I think, for the multiple environments that customers will use. Let's show some little more interesting things like... What do I want to show? We'll do something more basic at first. Let me clear this out. twilio api... Nope, don't want to see all those. So like core... For those of you that might be familiar with Twilio, we have a original API, that's the V2010 API. We've put that under core because V2010 is a little tricky to type and remember, we thought a little strange. Here's all that API set, just directly mirrored in the CLI. We'll talk about messages. We like messages. So twilio api:core:messages. I got the colon. And now we have messages:create, do the customer feedback thing, so list of messages. Let's do like a list of messages. twilio api:core:messages:list

Lizzie: Anyone in the chats have any ideas of what messages could be listed here? Any predictions? Maybe? What wakes you up? Some kind of programming, yes.

Ashley: You can see I'm struggling with what the flag is. The cool thing is I can say help, and I get... Oh, it's --date-sent. I have a lot of messages in my history, so I'm going to say --date-sent and we'll do 2018-10-17. That goes out to the API and grabs all these different messages that we've got. So that's pretty slick.

Lizzie: Very handy.

Ashley: The other thing is you can actually output this stuff in different ways. If you wanted to put this into a batch script and use jq in order to pipe maybe data from this to another command, or something like that, you can do this, and output it as JSON. Now you can see here's all the actual JSON representation. That's kind of cool from a basic interaction with the product. These are all the rest of the APIs. We have core. All the different products that are under these different domains, they're all available here within the Twilio CLI. Pretty broad scope of capabilities, and we're super excited about having it here.

Lizzie: Does anyone...

Ashley: Do we have any other questions?

Lizzie: Questions or thoughts? Anything you're excited for about the building with the CLI?

Ashley: Hello, SiliconANGLE. How's it going?

Lizzie: Yes, Roberta Boles. You could hope to take you on the CLI.

Ashley: Yes, you can. I can actually show you an example of that if you give me one moment. Where's my browser? Another browser, give me a browser. Hey, a browser. GET Lab I have an example of this where I built a CI/CD Pipeline with the actual Twilio CLI being scripted. Within here, we have a manifest that's building a Node 8 app, we're installing the CLI, and then we're running the script. Let's take a quick look at that script.

Lizzie: The CLI is open sourced.

Ashley: The CLI is open source. It's on get-apt.

Lizzie: Here we get that url in the chat, please.

Ashley: You can see here, for example... I'm going through, I'm finding an available phone number. So twilio:api:core blah, blah, blah. Piping it through jq. I'm pulling out the first item in that array of phone numbers that would come back. Then I'm creating a sub account. Then I'm provisioning this phone number that I found here in the first one as the last item, or the last step here in the CI build. You could do this process and then actually maybe text the user say, hey, this user we just bought you a phone number and it's in this sub account, or whatever. Kind of take a quick look at what that build looks like. Here's an example that we just did. We're doing a demo, so here's an example. We're installing the whole thing and then this last little bit is that part where we're running the script and creating the phone number and sub account and then purchasing it. This could be useful in contacts for like your business might want to operationalize this purchasing without writing a whole bunch of code and have a kind of trackable environment. Where I have my comments, you could go back and say like oh well which user, like who was authorized to create this phone number and provision it? You can just see this is that full history that we get through Get.

Work and Life at Twilio

Lizzie: As an aside, we have SiliconANGLE was wondering what it's like at Twilio.

Ashley: Yeah, what's it like at Twilio? Twilio is great. We have so much going on, incredible growth. It's definitely a very innovative culture and just having a good time getting to know everybody over the last year or so. If you didn't know, I came from SendGrid. I was at SendGrid for a little bit. I was at Cisco prior to that, which is how I know this whole SiliconANGLE folks. It was good to transition through that group in developer experience, and now be in the developer experience team at Twilio.

Lizzie: Has anything changed a lot since the move?

Ashley: Yeah, for me, my team we moved over fully to Twilio. The processes are a bit different, and so that's an interesting thing to adjust to. In general, it's pretty similar. People are all really nice and welcoming. We're definitely happy about it.

Lizzie: Same here. I think that position really made sense.

Ashley: Speaking of SendGrid, I have an example here I could probably do. I'm not going to run the full thing because... Here's a fun one, which is... I'll just explain what this does. I'll run it, but it will error out. I can go and show you something later. Basically, we're getting the message list. Instead of it outputting the format as JSON, we're outputting it as tab-separated value. You might think, why the heck am I outputting as tab-separated value? There's a certain circumstance where let's say you have an auditor, or you have someone in finance or accounting that wants to look at the message logs. How many did we actually send and reconcile that with their Trilio bill, or something like that. Tab-separate's great because they can import it into Excel and do what they need to do. You could do that, you could save it, and then you could go and send it via email, but if you have a SendGrid account, and you put in your SendGrid API key, then you can use this email:send command, send it to the person that wants to grab it, send it from your account, a message log, and it will show up as an attachment. I can show you what that looks like on the other side if you give me a second to jump back into my browser here.

Lizzie: Back to the browser.

Ashley: There's always dangerous... Let me do it this way. A new private window.

Lizzie: Private, that is very handy.

Ashley:, does that work? I don't know, maybe it's mail.

Lizzie: It's usually.

Ashley: What's the password? 1Password. Anyone use 1Password? Any other preferred password managers in the chats?

Lizzie: Software Computer Science student from Colorado. Hi KA OneStream.

Ashley: Hey, Colorado.

Lizzie: YokoZOko321 is wondering, they just joined, what we're doing. We're showing a demo of the new CLI.

Ashley: Exactly. We're showing one part of it... I might have sent it to my trash already. Let's see if it's in there. Here you go. Here's an example. This is the data that got piped in in Excel, basically Excel format of all that stuff in just one line of code. Pretty handy way to get your stuff published out to another user. How much time do we have left?

Lizzie: We have six minutes left.

Ashley Demos the CLI and Serverless API

Ashley: Six minutes, all right. Let's run this thing out in an awesome way. One of the really neat things that we announced today was the serverless API.

Lizzie: Yes!

Ashley: What we've done is we kind of restructured some of our branding and reinforced the fact that you can build on Twilio, and not just with Twilio. The serverless platform we've known as Twilio Functions is still called Twilio Functions, but if you log into the console, you'll see things have gotten reorganized under a runtime heading. What's cool, is serverless, it used to be on Twilio Functions, you coded in the console, maybe that's a little cumbersome, so you did it in code, you know Visual Studio Code, or whatever your editor is. Copy, paste, doing some of that back and forth. Now with Twilio serverless... I'm going to go to my scratch directory. I can say twilio serverless:init and we'll just call this Twitch. What is this? This is SIGNAL TV, let's call it that.

Lizzie: SIGNAL TV.

Ashley: SIGNAL TV. Now let's say I want to start a new project. That's all I need to do. This will scaffold an entire Twilio Functions project right within your directory there called SIGNAL TV. It takes a little bit to install the dependencies, but that's just no JS, that's not anything we have a lot of control over. Now we have this project we can go into SIGNAL TV and you can see there's this full project here, no modules have been downloaded, and two directories called functions and assets.

Lizzie: Whoa!

Ashley: If we just say code and bring this up, now we have this in here, and we have functions, there's like a hello-world. We can say Hello SIGNAL TV! Save it up. So that's cool. I just did a ton of really advanced coding just then. Now we can say twilio serverless, and let's just look at the commands that we have real quick. We've got activate, deploy, and so on, and start. When we do start, that will actually run this project in a local Twilio CLI kind of hosted environment. We're running it localhost hello-world. Where's my browser? Go back to my browser. Run this... WoooWhooo Windows. Hello SIGNAL TV. If we did a phone call and tied this up to a phone number, then we would be able to hear that read back to us. You might wonder how do I do this thing publicly? How do I expose this and test it to my world out there?

Lizzie: Silicon Orchid likes how the CLI output includes Unicode check marks and end marks. I agree.

Ashley: Heck yeah. Let me do this real quick.

Lizzie: We have two minutes.

Ashley: I'm good. I'm rocking. Twilio phone-numbers:list, I got to get my phone number. We're going to use this phone number, for example. Now what we can do is say update and we can update it, update the phone number, and if you've ever used Twilio, you have to set an sms-url that is publicly available to get the webhooks back. You might think right now I'm crazy because I'm typing in a localhost environment, so hello-world, but what we're doing behind the scenes here is we have embedded ngrok within the project. We automatically updated it with a publicly available url. Anybody crazy out there want to try to hit this url right now?

Lizzie: We have one minute left. Someone about to hit it. Thank you Roberta Boles.

Ashley: I'll just show you here, boom! So now we got the same thing but through a publicly addressable environment. Cool.

Lizzie: There you go.

Ashley: There you go. Lots of cool stuff.

Lizzie: A lot happened in 20 minutes.

Ashley: Thanks everybody, appreciate it

Lizzie: Thank you for tuning in.

Lizzie's talk with Ashley

Hope you enjoyed the transcipt of Ashley and Lizzie's stream session! You can find our CLI quickstart here. Be sure to check out our Twitch and YouTube channel for more great content.

Join 4,000+ of your peers for at SIGNAL 2020 for 2 days filled with 185+ talks. Transform your business and level-up your development skills. At SIGNAL, the world’s best companies join thousands of developers, business leaders, and innovators for learning, networking, and fun. Experience new product releases and in depth sessions led by innovative companies.

Limited time: register now for SIGNAL 2020 for the best pricing