# generator-convo

> Convo agents and middlewares generator using Yeoman

Latest version **0.0.5** (published 2019-02-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install generator-convo
pnpm add generator-convo
yarn add generator-convo
bun add generator-convo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2019-02-05 |
| First published | 2018-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 5 |
| Unpacked size | 45.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | cliffano |
| Keywords | yeoman-generator, convo, dialogflow, openapi, cloudfunctions |

## Links

- npm: https://www.npmjs.com/package/generator-convo
- npm.io page: https://npm.io/package/generator-convo

## Dependencies (5)

- [voca](https://npm.io/package/voca.md) ^1.4.0
- [yaml](https://npm.io/package/yaml.md) ^1.0.0-rc.7
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [convo-node](https://npm.io/package/convo-node.md) ^0.0.3
- [yeoman-generator](https://npm.io/package/yeoman-generator.md) ^1.0.0

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [post-robot](https://npm.io/package/post-robot.md) — 93.7K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads

## Recent versions

- 0.0.5 (latest) — 2019-02-05
- 0.0.4 — 2019-02-04
- 0.0.3 — 2019-01-29
- 0.0.2 — 2019-01-24
- 0.0.1 — 2018-09-11

## README

<img align="right" src="https://raw.github.com/cliffano/convo-generator/master/avatar.jpg" alt="Avatar"/>

[![Build Status](https://img.shields.io/travis/cliffano/convo-generator.svg)](http://travis-ci.org/cliffano/convo-generator)
[![Dependencies Status](https://img.shields.io/david/cliffano/convo-generator.svg)](http://david-dm.org/cliffano/convo-generator)
[![Coverage Status](https://img.shields.io/coveralls/cliffano/convo-generator.svg)](https://coveralls.io/r/cliffano/convo-generator?branch=master)
[![Published Version](https://img.shields.io/npm/v/generator-convo.svg)](http://www.npmjs.com/package/generator-convo)
<br/>
[![npm Badge](https://nodei.co/npm/convo-generator.png)](http://npmjs.org/package/convo-generator)

Convo Generator
---------------

Convo Generator is a [Convo](http://github.com/cliffano/convo) agent and middleware generator using [Yeoman](http://yeoman.io/).

This generator reads the environment configuration, Convo specification, and OpenAPI specification, which would then be used to generate:

* A Convo agent in the form of [Dialogflow export zip](https://dialogflow.com/docs/agents/export-import-restore) which can then be imported or restored into your Dialogflow project
* A Convo middleware in the form of [Serverless app with CloudFunctions](https://github.com/serverless/serverless-google-cloudfunctions) which can then be deployed to your GCP project.

Please have a look at [Convo Thomas](http://github.com/cliffano/convo-thomas), [Convo Hacker News](http://github.com/cliffano/convo-hacker-news), and [Convo Jenkins](http://github.com/cliffano/convo-jenkins) as examples of how Convo Generator can be used.

Installation
------------

Install [Yeoman](http://yeoman.io/), [Serverless](https://serverless.com/), [dialogflow-cli](https://www.npmjs.com/package/dialogflow-cli):

    npm install -g yo serverless dialogflow-cli

Install Convo Generator itself:

    npm install -g convo-generator

Configuration
-------------

Create the following mandatory configuration files:

* [Environment configuration](https://github.com/cliffano/convo/blob/master/docs/conf-environment.md)
* [Convo specification](https://github.com/cliffano/convo/blob/master/docs/conf-convo-specification.md)

And depending on the middleware type specified in your Convo specification, you need to provide these additional configuration files:

| Middleware Type | Configuration File |
|-----------------|--------------------|
| OpenAPI-CloudFunctions | [OpenAPI specification](https://github.com/cliffano/convo/blob/master/docs/conf-openapi-specification.md) |

Usage
-----

### DialogFlow agent

Generate DialogFlow agent:

    yo convo dialogflow-agent <path/to/env-config.yaml> <path/to/convo-spec.yaml>

Deploy the generated agent:

    dialogflow-cli import --credentials <path/to/project-credentials.json> <path/to/generated-agent-dir/>

Alternatively, you can zip up the generated agent, and then [import or restore the zip file](https://dialogflow.com/docs/agents/export-import-restore) to Dialogflow.

### Freestyle-CloudFunctions middleware:

Generate Freestyle-CloudFunctions middleware:

    yo convo freestyle-cloudfunctions-middleware <path/to/env-config.yaml> <path/to/convo-spec.yaml>

Deploy the generated middleware:

    serverless deploy
    
### OpenAPI-CloudFunctions middleware:

Generate OpenAPI-CloudFunctions middleware:

    yo convo openapi-cloudfunctions-middleware <path/to/env-config.yaml> <path/to/convo-spec.yaml> <path/to/openapi-spec.yaml>

Deploy the generated middleware:

    serverless deploy

Colophon
--------

Related Projects:

* [Convo](http://github.com/cliffano/convo) - Specification-based voice and text conversation library
* [convo-node](http://github.com/cliffano/convo-node) - node.js utility module for Convo library
* [Convo Thomas](http://github.com/cliffano/convo-thomas) - Convo agent for Thomas the Tank Engine Facts
* [Convo Hacker News](http://github.com/cliffano/convo-hacker-news) - Convo agent and middleware for Hacker News
* [Convo Jenkins](http://github.com/cliffano/convo-jenkins) - Convo agent and middleware for Jenkins

---
_Source: https://npm.io/package/generator-convo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
