Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 093f030

Browse files
author
Eyal
authored
Upgraded readme.md (#265)
* bf cli doc header * updated readme.md * update readme.md
1 parent 9c19e26 commit 093f030

File tree

2 files changed

+134
-13
lines changed

2 files changed

+134
-13
lines changed

AzureCli.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Azure CLI
2+
3+
Botservice Extension is an Azure CLI extension that provides support for managing bots and channels on the Azure Bot Service.</br>
4+
5+
## Prerequisites
6+
7+
Get a [valid Azure subscription](https://azure.microsoft.com/en-us/free/).
8+
Install the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).
9+
10+
## Installation
11+
Remove the azure bot extension if it's already installed.
12+
`az extension list`
13+
`az extension remove -n <extensionname>`
14+
Install the bot service extension as follows -
15+
`az extension add -n botservice`
16+
17+
**NOTE:** Please ensure you have Azure CLI version >= 2.0.45 installed to get the latest botservice extension. You can verify your AZ CLI version via `az -v`.
18+
19+
# Managing a Bot
20+
21+
## Creating a Bot
22+
Login into your Azure account via CLI:
23+
24+
`az login`
25+
26+
Ensure that you are using the right subscription for creating your bot:
27+
28+
`az account show`
29+
30+
If needed, change your subscription:
31+
`az account set --subscription <your-subscription-name>`
32+
33+
You need a resource group (existing or new) to create your bot and related assets. If needed, create a new resource group:
34+
`az group create -l <resource-group-location> -n <resource-group-name>`
35+
36+
Now create your bot:
37+
`az bot create -k webapp -g myResourceGroup -n myBot`
38+
39+
If you did not specify Microsoft app credentials during creation, you will be asked to login again so that we can create those credentials on your behalf.
40+
> Tip: To avoid specifying the resource group, use `az configure --defaults group=myResourceGroup`.
41+
42+
You can get your bot credentials and information using the `--msbot` option:
43+
`az bot show --msbot -n myBot -g myResourceGroup`
44+
45+
Pro Tips:
46+
1) To avoid having to type your bot name and resource group name every time, use
47+
`az configure --defaults botname=myBot group=myResourceGroup`
48+
49+
2) If you are stuck at any point, add a `-h` to the command to help you out. For example:
50+
`az bot create -h`
51+
52+
## Modifying a Bot
53+
The following workflow assumes that you have your bot name and resource group name configured by default using
54+
`az configure`.
55+
56+
A typical bot workflow is connecting your bot to msbot, downloading the source code, and then publishing back to Azure with changes.
57+
58+
First, connect your bot to msbot. You can get the MsBot CLI at [here](https://github.com/Microsoft/botbuilder-tools/tree/master/MSBot).
59+
`az bot show --msbot | msbot connect Azure --stdin`
60+
61+
This will update your .bot file with all the information needed by other botbuilder tools to access it. Now download the source code:
62+
`az bot download`
63+
64+
This creates a folder with your bot name in the current directory (use `--file-save-path` to override the target folder), and downloads the bot source code into that folder. If you created your bot using `az bot create`, then the source code will be an echo bot project. It contains post-deploy scripts and build scripts to help deploy it back to Azure. Modify this template code as needed.
65+
66+
To publish your code back to azure, from within the bot directory (use `--code-dir` to override the source folder) run:
67+
`az bot publish`
68+
69+
## Updating Bot Properties
70+
Use the `az update` command to update your bot's description, message endpoint, etc.
71+
For this, the command expects you to supply the right property and value that needs to be updated. To update your bot's description:
72+
73+
`az bot update --set properties.description="my new bot description"`
74+
75+
## Deleting a Bot
76+
`az bot delete` deletes your bot.
77+
78+
Please note that deleting your bot only deletes the bot resource. It does not clean up other resources provisioned during the creation of your bot like storage account, web site, etc.
79+
80+
# Managing Bot Channels
81+
The Azure bot extension supports addition, removal and display of properties for all kinds of channels supported by the Azure Bot Service. Refer to [Bot Service Channel Management](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-channels) for the necessary parameters needed to configure each channel.
82+
83+
The CLI supports various commands for each channel. Type `az bot <ChannelName> -h` to learn more. For example,
84+
`az bot webchat show -n myBot -g myResourceGroup` shows the parameters in the webchat channel for the bot. If you used `az configure` to set bot name and ResourceGroup, you can call `az bot webchat show`.
85+
86+
To remove a channel from a bot, use `az bot directline delete`.
87+
88+
# Known Issues and Limitations
89+
These are the known issues and limitations that the CLI has right now.
90+
1) Creation of msa app id and password is not supported for hotmail.com accounts.
91+
2) `az bot publish` fails for a c# solution , when the project is open in visual studio. To work around this for now, please close the solution before doing a publish.

README.md

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,67 @@
1+
2+
3+
![Bot Framework CLI](./media/BFCLI-header.png)
4+
15
# BF Command Line Interface
26

37
[![Build Status](https://fuselabs.visualstudio.com/SDK_v4/_apis/build/status/CLI/Botframework-CLI-CI-PR?branchName=master)](https://fuselabs.visualstudio.com/SDK_v4/_build/latest?definitionId=537&branchName=master)
48
[![Coverage Status](https://img.shields.io/coveralls/github/microsoft/botframework-cli/master)](https://coveralls.io/github/microsoft/botframework-cli?branch=master)
59

610
The new BF Command Line Interface (CLI) tool replaces the collection of standalone tools used to manage Bot Framework bots and related services. We have ported most tools and are in process of porting the rest. The new BF CLI aggregates the collection of cross-platform tools into one cohesive and consistent interface.
711

8-
The old tools will be deprecated in subsequent releases. All new investments, bug fixes, and new features will be implemented in the new consolided BF CLI alone.
12+
The old tools will be deprecated in subsequent releases. All new investments, bug fixes, and new features will be implemented in the new consolidated BF CLI alone.
13+
14+
## Installation
15+
16+
BF is based on the Node.js platform and the [OClif](https://github.com/oclif/oclif) framework where it inherits its command line parsing style, and plugin architecture platform.
17+
18+
You must download the following prerequisites:
19+
20+
* [Node.js](https://nodejs.org/) version 10.14.1 or higher
21+
22+
Install the tool using the following command:
23+
24+
~~~
25+
$ npm i -g @microsoft/botframework-cli
26+
$ bf
27+
~~~
928

1029
## Available Commands
1130
The following commands are currently available:
1231
* [Chatdown](https://github.com/microsoft/botframework-cli/tree/master/packages/cli#bf-chatdown)
1332
* [QnAMaker](https://github.com/microsoft/botframework-cli/tree/master/packages/cli#bf-qnamaker)
1433
* [Config](https://github.com/microsoft/botframework-cli/tree/master/packages/cli#bf-config)
15-
* [Luis](https://github.com/microsoft/botframework-cli/tree/master/packages/cli#bf-luis)
34+
* [Luis](https://github.com/microsoft/botframework-cli/tree/emimunoz/luis/packages/cli#bf-luis)
1635

17-
### Future Commands
36+
#### Future Commands
1837
The following commands will be ported in upcoming releases:
1938
* LUIS (API)
2039
* Dispatch
2140

2241
See [Porting Map](https://github.com/microsoft/botframework-cli/blob/master/PortingMap.md) for a mapping reference between old and new tools
2342

43+
## Overview
2444

25-
## Plugin Architecture
26-
BF CLI is based on [OClif](https://github.com/oclif/oclif) Framework and inherits its command line parsing style, and plugin architecture.
45+
The Bot Framework Command Line Interface (BF CLI) cross-platform tool is used to manage Bot Framework bots and related services. It is part the [Microsoft Bot Framework](https://github.com/Microsoft/botframework), a comprehensive framework for building enterprise-grade conversational AI experiences. In particular, BF CLI provides fundamental functionality when used in conjunction with Continuous Integration, and Continuous Deployment (CI/CD) pipelines.
2746

28-
## Installation
47+
As you build your bot, you may also need to integrate AI services like [LUIS.ai](http://luis.ai) for language understanding, [QnAMaker.ai](http://qnamaker.ai) for your bot to respond to simple questions in a Q&A format, and more. The _[bf luis](./packages/cli#bf-luis)_ command is used to convert, and translate language definition _.lu_ files or generate corresponding source (C# or JavaScript) code. Then, use the [Luis Tool](https://github.com/microsoft/botbuilder-tools/tree/master/packages/LUIS) to deploy the local files, train, test, and publish them as Language Understanding models within the LUIS service. If used to define QnAMaker question/answer Knowledgebase, use the _[bf qnamaker](./packages/cli#bf-qnamaker)_ command to create and manage QnAMaker assets both locally, and on the QnAMaker service. Please refer to the[ _lu_ library documentation](./packages/Ludown) for extended discussion on how to work with .lu file formats. _Note: You may be familiar with the Luis command if you used the legacy [LuDown](https://github.com/microsoft/botbuilder-tools/tree/master/packages/Ludown) and [LuisGen](https://github.com/microsoft/botbuilder-tools/tree/master/packages/LUISGen) tools._
2948

30-
BF is based on the Node.js platform. You must download the following __prerequisties__:
49+
As your bot grows in sophistication, use [Dispatch](https://github.com/Microsoft/botbuilder-tools/tree/master/packages/Dispatch) CLI to create and evaluate LUIS models used to dispatch intent across multiple bot modules such as LUIS models, QnA knowledgebases, and assist in routing messages to backend bot skills.
3150

32-
* [Node.js](https://nodejs.org/) version 10.14.1 or higher
51+
To test and refine your bot, you can use the new [V4 Bot Framework Emulator](https://github.com/Microsoft/BotFramework-Emulator/releases). The Bot Framework Emulator is a cross-platform [Electron](https://electronjs.org/) application that enables you to test and debug your bots on local machine or in the cloud.
3352

34-
Install the tool using the following command:
53+
Also, during early designs stages you may want to create mockup of conversations between the user and the bot for the specific scenarios your bot will support. Use [bf chatdown](./packages/Chatdown) command to author conversation mockup .chat files and convert them into rich transcripts and view the conversations in the the Emulator.
54+
55+
Lastly, with the [Azure CLI Bot extension](./AzureCli.md) (_az bot_ command), you can create, download, publish, configure channels with the [Azure Bot Service](https://azure.microsoft.com/en-us/services/bot-service/). It is a plugin that extends the functionality of Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) to manage your Azure Bot Service assets.
3556

36-
~~~
37-
npm i -g @microsoft/botframework-cli
38-
~~~
3957

40-
To view detailed usage information see the [CLI ReadMe page](https://github.com/microsoft/botframework-cli/tree/master/packages/cli)
58+
### See Also
59+
* [Detailed Usage Information](https://github.com/microsoft/botframework-cli/tree/master/packages/cli)
60+
* [Bot Framework Homepage](https://dev.botframework.com/)
61+
* [Azure Bot Service](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
62+
* [LUIS](https://docs.microsoft.com/en-us/azure/cognitive-services/luis/index)
63+
* [QnAMaker](https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/)
64+
* [Bot Design Guidelines](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-design-principles)
4165

4266
## Issues and Feature Requests
4367
Please file issues and feature requests [here](https://github.com/microsoft/botframework-cli/issues).
@@ -68,3 +92,9 @@ provided by the bot. You will only need to do this once across all repos using o
6892
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
6993
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
7094
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
95+
96+
## Reporting Security Issues
97+
98+
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at [[email protected]](mailto:[email protected]). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the [MSRC PGP](https://technet.microsoft.com/en-us/security/dn606155) key, can be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/default).
99+
100+
Copyright (c) Microsoft Corporation. All rights reserved.

0 commit comments

Comments
 (0)