Skip to main content

Command Palette

Search for a command to run...

Actions SDK installation in Ubuntu

Updated
3 min read

Overview

Google Assistant team has introduced a suite of new and improved developer tools to create conversational actions. Today we will see how to install the new gactions CLI in Ubuntu

Objectives

  1. What is Google Assistant

  2. What’s new in developer tools

  3. Features of Actions SDK

  4. Installing gactions CLI for Ubuntu

  5. CLI commands for Actions SDK

1. What is Google Assistant

Google Assistant is a personal voice assistant that offers a host of actions and integrations. From sending texts and setting reminders, to ordering coffee and playing music, the 1 million+ actions available suit a wide range of voice command needs.

2. What’s new in developer tools

The assistant team has introduced the two new developer tools

  • Actions Builder

  • Actions SDK

Actions Builder

Actions Builder is a web-based IDE that lets you develop, test, and deploy actions directly in the Actions console. The new builder lets you visualize the conversational flow, manage Natural Language Understanding (NLU) training data.

Actions SDK

For those of you who prefer local IDEs, the updated Actions SDK provides a file-based representation of your Actions project. This lets you author NLU training data and conversational flows locally as well as bulk import and export training data.

3. Features of Actions SDK

The new Actions SDK contains the following features

  • An open file-based representation of an Actions project

  • A command-line interface (CLI) — gactions

  • Webhooks and a Node.js fulfillment library

Open file-based representation of an Actions project

We can build our action invocation and conversation models with intents, types, scenes, and prompts.

Command-line interface (CLI)-gactions

The gactions tool provides a CLI to bootstrap and automates the development of your Actions. It lets you initialize standard Action project files, push updates to the Actions console, deploy projects.

Using the CLI we can perform the common workflows like importing existing projects or starting work on a feature branch using the source control system.

Webhooks and a Node.js fulfillment library

We can write our business logic to our business service using the webhooks. Some of the use cases of the fulfillment library are extracting parameters from a user query and generating a multimodal experience (voice only and voice and visuals) for Google Assistant.

4. Installing gactions CLI for ubuntu

Now we will install the gactions CLI for ubuntu. Download the installation package for gactions from here.

gactions installation package

Once the package is downloaded extract the files from the package and then open a terminal to check the file permission

file permission check

Now we will enable the execute permission in Linux like below

sudo chmod +x gactions

After entering the password permission will be enabled. Now we will move this file from the downloads folder to /usr/local/bin

To move the gactions file from the downloads folder to /usr/local/bin directory use the below command

sudo mv /download-folder-path/aog-cli/gactions /usr/local/bin

once the file is moved you can check whether the gactions is installed or not using the command

gactions help or gactions version

5. CLI commands for Actions SDK

For example, to pull a project from the web IDE to your local machine we would use the pull command like below

gactions pull --project-id my-project-id

To push or pull a project you should enable the Actions API

Note: You cannot create an actions project from your CLI

To know more about Actions SDK use the below links

Congratulations

You have learned how to install the new Actions SDK CLI in your local machine. I am excited to see what you are going to build on.

Happy Learning :)

More from this blog

Nidhin's blog

168 posts

✨Crafting Code with a Smile for 8 Years:) Merging the Formal Dance of Angular, the Playful Rhythms of React, and the Next-level Moves of Next.js 🚀