Jovo CLI

Other pages in this category: Workflows.

The Jovo Command Line Tools offer the ability to create, prototype, test, and deploy your voice app quickly.

Introduction

The Jovo CLI (GitHub Repository: jovotech/jovo-cli) is the center of voice app development with the Jovo Framework. With it, you can quickly create new Jovo projects, create language models and deploy them to the voice platforms, and run your voice apps locally for easy prototyping and testing.

Installation

To make best use of the Jovo CLI, install it globally via npm:

After successful installation, you should be able to see the jovo menu by just typing the following into your command line:

You can check the version number (and compare it to the jovo-cli npm package version) with this command:

Troubleshooting

Find out more about technical requirements here: Getting Started > Installation.

If you had the CLI installed before the release of v1.0, and are running into problems after updating it to the newest version, please try to uninstall it globally before you install it again:

If you run into other problems, please submit an issue here: jovotech/jovo-cli. Thank you!

Commands

Jovo CLI commands can be divided into basic commands (to create and run projects) and platform commands (to interact with a voice platform).

Command Description
Basic Commands jovo new Creates a new Jovo project
jovo run Runs a local development server (webhook)
jovo run Runs a local development server (webhook)
Platform Commands jovo init Initializes platform-specific projects in app.json
jovo build Builds platform-specific language model files into /platforms based on /models folder
jovo get Downloads an existing platform project into the /platforms folder
jovo deploy Deploys the /platforms project files to the voice platforms

Basic Commands

These are the basic commands that help you develop Jovo voice apps faster, without interacting with the voice platforms (see platform commands for features that are language model specific).

jovo new

jovo new command

You can create a Jovo project into a new directory with the following command:

Options

--template, -t: Used to specify which template should be used. Get a list of all the templates below, or on GitHub: jovotech/jovo-templates. Default: helloworld.

--locale, -l: Choose the language of the interaction models in the /models folder. Default: en-US.

--init, -i: This is a shortcut to the jovo init command. Speed up the creation of your voice application by creating the app.json file right at the beginning. Requires either alexaSkill or googleAction as argument.

--build, -b: This is a shortcut to the jovo build command. Speed up the creation of your voice application by building the platform specific files into the /platforms folder right at the beginning. Requires --init before.

--deploy, -d: This is a shortcut to the jovo deploy command. Deploy the platform files to their respective developer console. It will deploy to the platform you specified with the --init and --build options.

Templates

Below is a list of templates that can currently be used with the jovo new command.

You can find the complete repository on GitHub: jovotech/jovo-templates.

Name Description
helloworld Default. Jovo Sample Voice App with a simple "Hello World!" + asking for the user's name
trivia-game Trivia game voice app that makes use of states, helper functions, and i18n
alexa/audioplayer Sample Alexa Audioplayer Skill that plays a longform audio file with the Audioplayer directive
alexa/dialoginterface Sample implementation of the Alexa Dialog Interface
alexa/skillevents Sample implementation of the Alexa Skill Events.
google/mediaresponse Sample Google Action media response app that plays longform audio file

jovo run

jovo run command

You can use the jovo run command to start the development server in your index.js file, and then add the Jovo Webhook as an endpoint to the respective developer consoles.

Learn more here: App Configuration > Server Configuration.

You can also specify the file you want to run:

You can also use other tools like bst proxy to tunnel to your local server.

Options

--port, -p: Defines the port that will be used to run the local development server. Default: 3000.

--inspect: Run debugging mode.

Integrations

If you want to see another integration, please feel free to submit an issue. Thanks!

Here is a list of integrations that work with jovo run:

Command Description
--bst-proxy Creates a webhook URL for local testing and integrates with Bespoken Analytics
--watch Uses nodemon to monitor changes and automatically restart the server
bst proxy

You can use the bst proxy to create a webhook URL easily:

The result should look like this:

Jovo and bst proxy

The URL also comes with logging and analytics capabilities for prototyping and testing.

watch

With this integration, you don't have to manually restart your server with every change you make to the application:

For this, we're using nodemon, a neat package that monitors your app files and automatically restarts the server.

Platform Commands

Platform commands are used to interact with the voice platforms (Amazon Alexa or Google Assistant/Dialogflow). You don't have to use these commands if you just want to maintain the language/interaction models on the respective developer platforms.

See the following tutorials for alternative ways to create language models on the respective developer platforms:

jovo init

jovo init command

jovo init is the command to initialize a voice platform project to use with the Jovo Framework. This will create or update a file app.json with all the information needed to later build the language models.

To create it, use the following command:

The resulting app.json file looks like this:

Currently, the platform nlu (natural language understanding) services are:

  • Amazon Alexa: The built-in alexa interaction model
  • Google Assistant: dialogflow API versions 1 or 2 (Jovo supports boths)

The default endpoint uri is automatically generated and provides a simple solution to run a local webserver for easy debugging. Learn more here: App Configuration > Server Configuration > Webhook. For more options, see below.

Options

--enpoint, -e: This specifies which endpoint you want to include in the app.json file. Options: jovo-framework (default), bst-proxy (see jovo run), and ngrok (will extract the url if ngrok is running in the background on port 3000).

jovo build

jovo build command

jovo build is the command to create and update the platform specific interaction models using the Jovo model. Using the files in the /models folder and converting them into files in the /platforms folder.

To learn more about Jovo Language Models, take a look at App Configuration > Models.

After the initial init process, you can either run build separately for each platform, or just let the CLI fetch the right information from the app.json file.

Options

--platform, -p: If you want to update your platform folders, you can leave it out and it will update the ones listed in app.json. You can still use it, if you want to only update a specific platform. If you haven't initialized a platform yet, this will trigger the jovo init command.

--locale, -l: Specify the locale, which should be created/updated. Default: en-US.

--deploy, -d: This is a shortcut to the jovo deploy command. Deploy the platform files to their respective developer console.

--reverse, -r: In this reverse process, you can create a Jovo Language Model from an existing /platforms folder, e.g. after you fetched the files with jovo get.

jovo build reverse converter

jovo get

jovo get command

jovo get will import an existing Alexa Skill (Skill Information and Interaction Model) or Dialogflow agent (work in progress) into the /platforms folder.

To get the Skill from the Amazon developer console, you have to set up ASK CLI first.

Options

--locale, -l: Specify the locale, which should be created/updated. Default: all languages available for the Skill.

--list-skills: Shows a list of all available Skill projects for the specific ASK Profile.

--skill-id, -s: Get specific Alexa Skill using the Skill ID.

--project-id: Get a specific Dialogflow agent using the Project ID.

--ask-profile: Specifies which profile set up in ASK CLI should be used to get the information. Default: default.

--target, -t: Specifies which information should be fetched from the Skill. Arguments: info (Skill Information), model (Interaction Model), all. Default: all.

jovo deploy

jovo deploy command

jovo deploy is used to upload the platform folders to their respective developer site.

To deploy to the Amazon developer console, you have to set up ASK CLI first.

To deploy a Dialogflow agent you have 2 options:

  • Import the dialogflow_agent.zip file into your Dialogflow agent (we recommend using the option RESTORE)
  • If you're using the Dialogflow v2 API (default since April 17, 2018), you can also deploy the agent directly to the platform. First, you need to go through the following auth setup guide.

Options:

--platform, -p: Specify the platform that should be deployed. Default: Every platform found in the /platforms folder.

--project-id: Determine, which project to deploy to.

--locale, -l: Specify the locale that should be deployed. Default: Every locale found for each platform.

--target, -t: Specify, what type of information to deploy. Arguments: info (for Skill or Agent information), model (for language models), lambda (for AWS Lambda deployment), all. Default: all.

Stay Up to Date

Subscribe to our free newsletter to receive updates and tutorials on Jovo and voice interfaces in general.

Comments and Questions

Any specific questions? Just drop them below. Alternatively, you can also fill out this feedback form. Thank you!