Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
333 changes: 324 additions & 9 deletions packages/cli/README.md

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"@microsoft/bf-cli-config",
"@microsoft/bf-qnamaker",
"@microsoft/bf-luis-cli",
"@microsoft/bf-cli-plugins"
"@microsoft/bf-cli-plugins",
"@microsoft/bf-lg-cli",
"@microsoft/bf-dialog"
],
"hooks": {
"init": "./lib/hooks/init/inithook"
Expand Down Expand Up @@ -59,6 +61,8 @@
"@microsoft/bf-luis-cli": "1.0.0",
"@microsoft/bf-qnamaker": "1.0.0",
"@microsoft/bf-cli-plugins": "1.0.0",
"@microsoft/bf-lg-cli": "1.0.0",
"@microsoft/bf-dialog": "1.0.0",
"@oclif/command": "~1.5.19",
"@oclif/config": "~1.13.3",
"@oclif/errors": "~1.2.2",
Expand Down
24 changes: 11 additions & 13 deletions packages/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ This package is intended for Microsoft use only and should be consumed through @

# Commands
<!-- commands -->
- [@microsoft/bf-cli-config](#microsoftbf-cli-config)
- [Commands](#commands)
- [`bf config`](#bf-config)
- [`bf config:set`](#bf-configset)
- [`bf config:set:luis`](#bf-configsetluis)
- [`bf config:set:qnamaker`](#bf-configsetqnamaker)
- [`bf config:set:telemetry`](#bf-configsettelemetry)
- [`bf config:show`](#bf-configshow)
- [`bf config:show:luis`](#bf-configshowluis)
- [`bf config:show:qnamaker`](#bf-configshowqnamaker)
- [`bf config:show:telemetry`](#bf-configshowtelemetry)
* [`bf config`](#bf-config)
* [`bf config:set`](#bf-configset)
* [`bf config:set:luis`](#bf-configsetluis)
* [`bf config:set:qnamaker`](#bf-configsetqnamaker)
* [`bf config:set:telemetry`](#bf-configsettelemetry)
* [`bf config:show`](#bf-configshow)
* [`bf config:show:luis`](#bf-configshowluis)
* [`bf config:show:qnamaker`](#bf-configshowqnamaker)
* [`bf config:show:telemetry`](#bf-configshowtelemetry)

## `bf config`

Expand Down Expand Up @@ -68,8 +66,8 @@ OPTIONS

EXAMPLE

$ bf config:set:luis --appId {APPLICATION_ID} --authoringKey {AUTHORING_KEY} --subscriptionKey {SUBSCRIPTION_KEY} --versionId {VERSION_ID}
--endpoint {ENDPOINT}
$ bf config:set:luis --appId {APPLICATION_ID} --authoringKey {AUTHORING_KEY} --subscriptionKey {SUBSCRIPTION_KEY}
--versionId {VERSION_ID} --endpoint {ENDPOINT}
```

_See code: [src/commands/config/set/luis.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/config/src/commands/config/set/luis.ts)_
Expand Down
27 changes: 5 additions & 22 deletions packages/dialog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,9 @@ This package is intended for Microsoft use only and should be consumed through @

# Commands
<!-- commands -->
- [@microsoft/bf-dialog](#microsoftbf-dialog)
- [Commands](#commands)
- [`bf `](#bf)
- [`bf dialog`](#bf-dialog)
- [`bf dialog:merge PATTERNS`](#bf-dialogmerge-patterns)
- [`bf dialog:verify PATTERNS`](#bf-dialogverify-patterns)

## `bf `

The dialog commands allow you to work with dialog schema.

```
USAGE
$ bf

OPTIONS
-h, --help show CLI help
```

_See code: [src/commands/index.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/dialog/src/commands/index.ts)_
* [`bf dialog`](#bf-dialog)
* [`bf dialog:merge PATTERNS`](#bf-dialogmerge-patterns)
* [`bf dialog:verify PATTERNS`](#bf-dialogverify-patterns)

## `bf dialog`

Expand Down Expand Up @@ -80,8 +63,8 @@ ARGUMENTS
PATTERNS Any number of glob regex patterns to match .dialog files.

OPTIONS
-h, --help show CLI help
--verbose Show verbose output
-h, --help show CLI help
-v, --verbose Show verbose output
```

_See code: [src/commands/dialog/verify.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/dialog/src/commands/dialog/verify.ts)_
Expand Down
18 changes: 0 additions & 18 deletions packages/dialog/src/commands/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/dialog/src/library/schemaMerger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ export default class SchemaMerger {
if (val.$schema && path) {
return true
}
if (val.properties && !path?.endsWith('properties')) {
if (val.properties && (!path || !path.endsWith('properties'))) {
for (let propName in val.properties) {
verifyProperty(val.properties[propName], pathName(path, propName))
}
Expand Down
181 changes: 112 additions & 69 deletions packages/luis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,32 @@ This package is intended for Microsoft use only and should be consumed through @

# Commands
<!-- commands -->
- [@microsoft/bf-luis-cli](#microsoftbf-luis-cli)
- [Relevant docs](#relevant-docs)
- [Commands](#commands)
- [`bf luis`](#bf-luis)
- [`bf luis:application:create`](#bf-luisapplicationcreate)
- [`bf luis:application:delete`](#bf-luisapplicationdelete)
- [`bf luis:application:import`](#bf-luisapplicationimport)
- [`bf luis:application:list`](#bf-luisapplicationlist)
- [`bf luis:application:publish`](#bf-luisapplicationpublish)
- [`bf luis:application:query`](#bf-luisapplicationquery)
- [`bf luis:application:rename`](#bf-luisapplicationrename)
- [`bf luis:application:show`](#bf-luisapplicationshow)
- [`bf luis:build`](#bf-luisbuild)
- [`bf luis:convert`](#bf-luisconvert)
- [`bf luis:cross-train`](#bf-luiscross-train)
- [`bf luis:endpoints:list`](#bf-luisendpointslist)
- [`bf luis:test`](#bf-luistest)
- [`bf luis:generate:cs`](#bf-luisgeneratecs)
- [`bf luis:generate:ts`](#bf-luisgeneratets)
- [`bf luis:train:run`](#bf-luistrainrun)
- [`bf luis:train:show`](#bf-luistrainshow)
- [`bf luis:translate`](#bf-luistranslate)
- [`bf luis:version:clone`](#bf-luisversionclone)
- [`bf luis:version:delete`](#bf-luisversiondelete)
- [`bf luis:version:export`](#bf-luisversionexport)
- [`bf luis:version:import`](#bf-luisversionimport)
- [`bf luis:version:list`](#bf-luisversionlist)
- [`bf luis:version:rename`](#bf-luisversionrename)
* [`bf luis`](#bf-luis)
* [`bf luis:application:assignazureaccount`](#bf-luisapplicationassignazureaccount)
* [`bf luis:application:create`](#bf-luisapplicationcreate)
* [`bf luis:application:delete`](#bf-luisapplicationdelete)
* [`bf luis:application:import`](#bf-luisapplicationimport)
* [`bf luis:application:list`](#bf-luisapplicationlist)
* [`bf luis:application:publish`](#bf-luisapplicationpublish)
* [`bf luis:application:query`](#bf-luisapplicationquery)
* [`bf luis:application:rename`](#bf-luisapplicationrename)
* [`bf luis:application:show`](#bf-luisapplicationshow)
* [`bf luis:build`](#bf-luisbuild)
* [`bf luis:convert`](#bf-luisconvert)
* [`bf luis:cross-train`](#bf-luiscross-train)
* [`bf luis:endpoints:list`](#bf-luisendpointslist)
* [`bf luis:generate:cs`](#bf-luisgeneratecs)
* [`bf luis:generate:ts`](#bf-luisgeneratets)
* [`bf luis:test`](#bf-luistest)
* [`bf luis:train:run`](#bf-luistrainrun)
* [`bf luis:train:show`](#bf-luistrainshow)
* [`bf luis:translate`](#bf-luistranslate)
* [`bf luis:version:clone`](#bf-luisversionclone)
* [`bf luis:version:delete`](#bf-luisversiondelete)
* [`bf luis:version:export`](#bf-luisversionexport)
* [`bf luis:version:import`](#bf-luisversionimport)
* [`bf luis:version:list`](#bf-luisversionlist)
* [`bf luis:version:rename`](#bf-luisversionrename)

## `bf luis`

Expand All @@ -62,6 +60,36 @@ OPTIONS

_See code: [src/commands/luis/index.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/index.ts)_

## `bf luis:application:assignazureaccount`

Assign a LUIS azure accounts to an application

```
USAGE
$ bf luis:application:assignazureaccount

OPTIONS
-h, --help show CLI help
--accountName=accountName (required) Account name
--appId=appId (required) LUIS application Id (defaults to config:LUIS:appId)

--armToken=armToken (required) The bearer authorization header to use; containing the user`s
ARM token used to validate azure accounts information

--azureSubscriptionId=azureSubscriptionId (required) Azure Subscription Id

--endpoint=endpoint LUIS endpoint hostname

--json Display output as JSON

--resourceGroup=resourceGroup (required) Resource Group

--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default:
config:LUIS:subscriptionKey)
```

_See code: [src/commands/luis/application/assignazureaccount.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/application/assignazureaccount.ts)_

## `bf luis:application:create`

Creates a new LUIS application
Expand Down Expand Up @@ -311,38 +339,40 @@ USAGE
$ bf luis:build

OPTIONS
-f, --force If --dialog flag is provided, overwirtes relevant dialog file
-f, --force If --dialog flag is provided, overwrites relevant dialog file
-h, --help show CLI help
-i, --in=in Lu file or folder

-o, --out=out Output file or folder name. If not specified, current directory will be used as
output

--authoringKey=authoringKey (required) LUIS authoring key
--authoringKey=authoringKey LUIS authoring key

--botName=botName Bot name

--defaultCulture=defaultCulture Culture code for the content. Infer from .lu if available. Defaults to en-us

--deleteOldVersion Delete old version of LUIS application after building new one.

--dialog [default: multiLanguage]Write out .dialog files whose recognizer type [multiLanguage|crosstrained] is specified by --dialog
--deleteOldVersion Delete old version of LUIS application after building new one.

--dialog=dialog [default: multiLanguage] Write out .dialog files whose recognizer type
[multiLanguage|crosstrained] is specified by --dialog

--fallbackLocale=fallbackLocale Locale to be used at the fallback if no locale specific recognizer is found. Only
valid if --dialog is set

--log write out log messages to console

--luConfig=luConfig Path to config for lu build
--luConfig=luConfig Path to config for lu build which can contain switches for arguments

--region=region [default: westus] LUIS authoring region [westus|westeurope|australiaeast]

--suffix=suffix Environment name as a suffix identifier to include in LUIS app name. Defaults to
current logged in useralias
current logged in user alias

EXAMPLE

$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME} --dialog multiLanguage
$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME} --dialog
multiLanguage
```

_See code: [src/commands/luis/build.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/build.ts)_
Expand Down Expand Up @@ -381,14 +411,23 @@ USAGE
$ bf luis:cross-train

OPTIONS
-h, --help cross-train command help
-i, --in source lu and qna files folder
-o, --out output folder name. If not specified, the cross trained files will be wrote to cross-trained folder under folder of current command
--config path to config file of mapping rules which is relative to folder specified by --in. If not specified, it will read default config.json from the folder specified by --in
--intentName Interruption intent name. Default: _Interruption
-h, --help luis:cross-train help
-i, --in=in source lu and qna files folder

-o, --out=out output folder name. If not specified, the cross trained files will be wrote to cross-trained
folder under folder of current command

--config=config path to config file of mapping rules which is relative to folder specified by --in. If not
specified, it will read default config.json from the folder specified by --in

--intentName=intentName [default: _Interruption] Interruption intent name

--rootDialog=rootDialog rootDialog file path which is relative to folder specified by --in. If --config not
specified, cross-trian will automatically construct the config from file system based on root
dialog file
```

_See code: [src/commands/luis/cross-train.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/qnamaker/src/commands/luis/cross-train.ts)_
_See code: [src/commands/luis/cross-train.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/cross-train.ts)_

## `bf luis:endpoints:list`

Expand Down Expand Up @@ -420,33 +459,6 @@ EXAMPLE

_See code: [src/commands/luis/endpoints/list.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/endpoints/list.ts)_

## `bf luis:test`

Test a .lu file or LUIS application JSON model against a published LUIS model

```
USAGE
$ bf luis:test

OPTIONS
-a, --appId=appId (required) LUIS application Id
-h, --help luis:test help
-i, --in=in Source .lu file or LUIS application JSON model for testing
-o, --out=out Output file or folder name. If not specified stdout will be used as output
-s, --subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key
--allowIntentsCount=allowIntentsCount [default: 1] Top-scoring intent or top n Intent with score to show in the result
--endpoint=endpoint [default: https://westus.api.cognitive.microsoft.com] LUIS endpoint hostname
--force If --out flag is provided with the path to an existing file, overwrites that file
--intentOnly Only test intent
--staging Presence of flag targets the staging app, if no flag passed defaults to production

EXAMPLE

$ bf luis:test -i {TESTDATA.lu} -o {RESULT.lu} --endpoint {ENDPOINT} --subscriptionKey {SUBSCRIPTION_KEY} --appId {APP_ID}
```

_See code: [src/commands/luis/test.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/test.ts)_

## `bf luis:generate:cs`

Generate:cs generates a strongly typed C# source code from an exported (json) LUIS model.
Expand Down Expand Up @@ -483,6 +495,37 @@ OPTIONS

_See code: [src/commands/luis/generate/ts.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/generate/ts.ts)_

## `bf luis:test`

Test a .lu file or LUIS application JSON model against a published LUIS model

```
USAGE
$ bf luis:test

OPTIONS
-a, --appId=appId (required) LUIS application Id
-h, --help luis:test help
-i, --in=in Source .lu file or LUIS application JSON model for testing
-o, --out=out Output file or folder name. If not specified stdout will be used as output
-s, --subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key

--allowIntentsCount=allowIntentsCount [default: 1] Top-scoring intent or top n Intent with score to show in the
result

--endpoint=endpoint [default: https://westus.api.cognitive.microsoft.com] LUIS endpoint hostname

--force If --out flag is provided with the path to an existing file, overwrites that
file

--intentOnly Only test intent

--staging Presence of flag targets the staging app, if no flag passed defaults to
production
```

_See code: [src/commands/luis/test.ts](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/test.ts)_

## `bf luis:train:run`

Issues asynchronous training request for LUIS application
Expand Down
Loading