Skip to content
A CLI tool to generate a new Twilio Functions project that can be run locally with twilio-run.
JavaScript HTML CSS
Branch: master
Clone or download


A command line tool to setup a new Twilio Function with local testing using twilio-run.

Build Status Maintainability


There are a number of ways to use this tool. The quickest and easiest is with npm init:

npm init twilio-function function-name
cd function-name
npm start

This will create a new directory named "function-name" and include all the files you need to write and run a Twilio Function locally. Starting the application will host the example function at localhost:3000/example.


You can also use npx to run create-twilio-function:

npx create-twilio-function function-name

Or you can install the module globally:

npm install create-twilio-function -g
create-twilio-function function-name

Command line arguments

create-twilio-function <name>

Creates a new Twilio Function project

  create-twilio-function <name>          Creates a new Twilio Function
                                         project                    [default]
  create-twilio-function list-templates  List the available templates you can
                                         create a project with.

  name  Name of your project.                                        [string]

  --account-sid, -a     The Account SID for your Twilio account      [string]
  --auth-token, -t      Your Twilio account Auth Token               [string]
  --skip-credentials    Don't ask for Twilio account credentials or import
                        them from the environment  [boolean] [default: false]
  --import-credentials  Import credentials from the environment variables
                        TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN
                                                   [boolean] [default: false]
  --template            Initialize your new project with a template from
  -h, --help            Show help                                   [boolean]
  -v, --version         Show version number                         [boolean]
  --path                                                     [default: (cwd)]


Any help contributing to this project is welcomed. Make sure you read and agree with the code of conduct.

  1. Fork the project
  2. Clone the fork like so:
git clone
  1. Install the dependencies
cd create-twilio-function
npm install
  1. Make your changes
  2. Test your changes with
npm test
  1. Commit your changes and open a pull request



You can’t perform that action at this time.