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

Commit fded5d2

Browse files
authored
Luis output format CI compatible (#646)
* Changing output of Luis commands to work with CI * Update Docs
1 parent da24593 commit fded5d2

File tree

21 files changed

+304
-55
lines changed

21 files changed

+304
-55
lines changed

packages/cli/README.md

Lines changed: 92 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $ npm install -g @microsoft/botframework-cli
1818
* [`bf chatdown`](#bf-chatdown)
1919
* [`bf chatdown:convert`](#bf-chatdownconvert)
2020
* [`bf config`](#bf-config)
21+
* [`bf config:set`](#bf-configset)
2122
* [`bf config:set:luis`](#bf-configsetluis)
2223
* [`bf config:set:qnamaker`](#bf-configsetqnamaker)
2324
* [`bf config:set:telemetry`](#bf-configsettelemetry)
@@ -35,6 +36,7 @@ $ npm install -g @microsoft/botframework-cli
3536
* [`bf luis:application:query`](#bf-luisapplicationquery)
3637
* [`bf luis:application:rename`](#bf-luisapplicationrename)
3738
* [`bf luis:application:show`](#bf-luisapplicationshow)
39+
* [`bf luis:build`](#bf-luisbuild)
3840
* [`bf luis:convert`](#bf-luisconvert)
3941
* [`bf luis:endpoints:list`](#bf-luisendpointslist)
4042
* [`bf luis:generate:cs`](#bf-luisgeneratecs)
@@ -139,6 +141,22 @@ OPTIONS
139141

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

144+
## `bf config:set`
145+
146+
Adds the specified key and value to the config file
147+
148+
```
149+
USAGE
150+
$ bf config:set
151+
152+
OPTIONS
153+
-h, --help config:set help
154+
-k, --key=key (required) Name of the key to add or override
155+
-v, --value=value (required) Value associated with the specified key
156+
```
157+
158+
_See code: [@microsoft/bf-cli-config](https://github.com/microsoft/botframework-cli/tree/master/packages/config/src/commands/config/set.ts)_
159+
142160
## `bf config:set:luis`
143161

144162
Stores default LUIS application values in global config.
@@ -157,7 +175,7 @@ OPTIONS
157175
EXAMPLE
158176
159177
$ bf config:set:luis --appId {APPLICATION_ID} --subscriptionKey {SUBSCRIPTION_KEY} --versionId {VERSION_ID}
160-
--region {REGION}
178+
--endpoint {ENDPOINT}
161179
```
162180

163181
_See code: [@microsoft/bf-cli-config](https://github.com/microsoft/botframework-cli/tree/master/packages/config/src/commands/config/set/luis.ts)_
@@ -214,7 +232,8 @@ USAGE
214232
$ bf config:show
215233
216234
OPTIONS
217-
-h, --help config:show help
235+
-h, --help config:show help
236+
-k, --key=key Shows specific key value
218237
```
219238

220239
_See code: [@microsoft/bf-cli-config](https://github.com/microsoft/botframework-cli/tree/master/packages/config/src/commands/config/show.ts)_
@@ -305,6 +324,7 @@ OPTIONS
305324
--culture=culture Specify culture language (default: en-us)
306325
--description=description Description of LUIS application
307326
--endpoint=endpoint LUIS endpoint hostname
327+
--json Display output as JSON
308328
--name=name (required) Name of LUIS application
309329
--save Save configuration settings from imported app (appId & endpoint)
310330
@@ -337,6 +357,8 @@ OPTIONS
337357
-h, --help show CLI help
338358
--appId=appId (required) LUIS application Id (defaults to config:LUIS:appId)
339359
--endpoint=endpoint LUIS endpoint hostname
360+
--force Force delete with no confirmation
361+
--json Display output as JSON
340362
341363
--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default:
342364
config:LUIS:subscriptionKey)
@@ -359,15 +381,19 @@ USAGE
359381
OPTIONS
360382
-h, --help show CLI help
361383
362-
-i, --in=in (required) File path containing LUIS application contents, uses STDOUT if not
384+
-i, --in=in (required) File path containing LUIS application contents, uses STDIN if not
363385
specified
364386
365-
--endpoint=endpoint LUIS endpoint hostname
387+
--endpoint=endpoint (required) LUIS endpoint hostname
388+
389+
--json Display output as JSON
366390
367391
--name=name LUIS application name (optional)
368392
369-
--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default:
370-
config:LUIS:subscriptionKey)
393+
--save Save configuration settings from imported app (appId, subscriptionKey & endpoint)
394+
395+
--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default: config
396+
subscriptionKey)
371397
372398
EXAMPLE
373399
@@ -488,6 +514,7 @@ OPTIONS
488514
--appId=appId (required) LUIS application Id (defaults to config:LUIS:appId)
489515
--description=description Description of LUIS application
490516
--endpoint=endpoint LUIS endpoint hostname
517+
--json Display output as JSON
491518
--name=name (required) (required) Name of LUIS application
492519
493520
--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default:
@@ -524,6 +551,49 @@ EXAMPLE
524551

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

554+
## `bf luis:build`
555+
556+
Build lu files to train and publish luis applications
557+
558+
```
559+
USAGE
560+
$ bf luis:build
561+
562+
OPTIONS
563+
-f, --force If --dialog flag is provided, overwirtes relevant dialog file
564+
-h, --help show CLI help
565+
-i, --in=in Lu file or folder
566+
567+
-o, --out=out Output file or folder name. If not specified, current directory will be used as
568+
output
569+
570+
--authoringKey=authoringKey (required) LUIS authoring key
571+
572+
--botName=botName Bot name
573+
574+
--defaultCulture=defaultCulture Culture code for the content. Infer from .lu if available. Defaults to en-us
575+
576+
--dialog Write out .dialog files
577+
578+
--fallbackLocale=fallbackLocale Locale to be used at the fallback if no locale specific recognizer is found. Only
579+
valid if --dialog is set
580+
581+
--log write out log messages to console
582+
583+
--luConfig=luConfig Path to config for lu build
584+
585+
--region=region [default: westus] LUIS authoring region [westus|westeurope|australiaeast]
586+
587+
--suffix=suffix Environment name as a suffix identifier to include in LUIS app name. Defaults to
588+
current logged in useralias
589+
590+
EXAMPLE
591+
592+
$ bf luis:build --in {INPUT_FILE_OR_FOLDER} --authoringKey {AUTHORING_KEY} --botName {BOT_NAME} --dialog {true}
593+
```
594+
595+
_See code: [@microsoft/bf-luis-cli](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/build.ts)_
596+
527597
## `bf luis:convert`
528598

529599
Convert .lu file(s) to a LUIS application JSON model or vice versa
@@ -547,7 +617,7 @@ OPTIONS
547617
--versionid=versionid Version ID of the LUIS application
548618
```
549619

550-
_See code: [@microsoft/bf-lu](https://github.com/microsoft/botframework-cli/tree/master/packages/lu/src/commands/luis/convert.ts)_
620+
_See code: [@microsoft/bf-luis-cli](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/convert.ts)_
551621

552622
## `bf luis:endpoints:list`
553623

@@ -595,7 +665,7 @@ OPTIONS
595665
--className=className Name of the autogenerated class (can include namespace)
596666
```
597667

598-
_See code: [@microsoft/bf-lu](https://github.com/microsoft/botframework-cli/tree/master/packages/lu/src/commands/luis/generate/cs.ts)_
668+
_See code: [@microsoft/bf-luis-cli](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/generate/cs.ts)_
599669

600670
## `bf luis:generate:ts`
601671

@@ -613,7 +683,7 @@ OPTIONS
613683
--className=className Name of the autogenerated class
614684
```
615685

616-
_See code: [@microsoft/bf-lu](https://github.com/microsoft/botframework-cli/tree/master/packages/lu/src/commands/luis/generate/ts.ts)_
686+
_See code: [@microsoft/bf-luis-cli](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/generate/ts.ts)_
617687

618688
## `bf luis:train:run`
619689

@@ -627,12 +697,15 @@ OPTIONS
627697
-h, --help show CLI help
628698
--appId=appId (required) LUIS application Id (defaults to config:LUIS:appId)
629699
--endpoint=endpoint LUIS endpoint hostname
700+
--json Display output as JSON
630701
631702
--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default:
632703
config:LUIS:subscriptionKey)
633704
634705
--versionId=versionId (required) Version to show training status (defaults to config:LUIS:versionId)
635706
707+
--wait Wait until training complete and then display status
708+
636709
EXAMPLE
637710
638711
$ bf luis:train:run --appId {APPLICATION_ID} --versionId {VERSION_ID} --endpoint {ENDPOINT} --subscriptionKey
@@ -688,7 +761,7 @@ OPTIONS
688761
--translatekey=translatekey (required) Machine translation endpoint key.
689762
```
690763

691-
_See code: [@microsoft/bf-lu](https://github.com/microsoft/botframework-cli/tree/master/packages/lu/src/commands/luis/translate.ts)_
764+
_See code: [@microsoft/bf-luis-cli](https://github.com/microsoft/botframework-cli/tree/master/packages/luis/src/commands/luis/translate.ts)_
692765

693766
## `bf luis:version:clone`
694767

@@ -702,6 +775,7 @@ OPTIONS
702775
-h, --help show CLI help
703776
--appId=appId (required) LUIS application Id (defaults to config:LUIS:appId)
704777
--endpoint=endpoint LUIS endpoint hostname
778+
--json Display output as JSON
705779
--subscriptionKey=subscriptionKey LUIS authoring (Ocp-Apim-subscription) key
706780
--targetVersionId=targetVersionId (required) Destination version to create
707781
--versionId=versionId (required) Source version to clone (defaults to config:LUIS:versionId)
@@ -726,6 +800,7 @@ OPTIONS
726800
-h, --help show CLI help
727801
--appId=appId (required) LUIS application Id (defaults to config:LUIS:appId)
728802
--endpoint=endpoint LUIS endpoint hostname
803+
--json Display output as JSON
729804
730805
--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default:
731806
config:LUIS:subscriptionKey)
@@ -792,6 +867,8 @@ OPTIONS
792867
793868
--endpoint=endpoint LUIS endpoint hostname
794869
870+
--json Display output as JSON
871+
795872
--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default:
796873
config:LUIS:subscriptionKey)
797874
@@ -854,6 +931,7 @@ OPTIONS
854931
-h, --help show CLI help
855932
--appId=appId (required) LUIS application Id (defaults to config:LUIS:appId)
856933
--endpoint=endpoint LUIS endpoint hostname
934+
--json Display output as JSON
857935
--newVersionId=newVersionId (required) New version id
858936
859937
--subscriptionKey=subscriptionKey (required) LUIS cognitive services subscription key (default:
@@ -1013,7 +1091,7 @@ _See code: [@microsoft/bf-qnamaker](https://github.com/microsoft/botframework-cl
10131091

10141092
## `bf qnamaker:convert`
10151093

1016-
Converts .lu file(s) to QnA application JSON models or vice versa.
1094+
Converts .qna file(s) to QnA application JSON models or vice versa.
10171095

10181096
```
10191097
USAGE
@@ -1031,7 +1109,7 @@ OPTIONS
10311109
--sort When set, questions collections are alphabetically sorted are alphabetically sorted in .qna files
10321110
```
10331111

1034-
_See code: [@microsoft/bf-lu](https://github.com/microsoft/botframework-cli/tree/master/packages/lu/src/commands/qnamaker/convert.ts)_
1112+
_See code: [@microsoft/bf-qnamaker](https://github.com/microsoft/botframework-cli/tree/master/packages/qnamaker/src/commands/qnamaker/convert.ts)_
10351113

10361114
## `bf qnamaker:endpointkeys`
10371115

@@ -1228,7 +1306,7 @@ USAGE
12281306
OPTIONS
12291307
-h, --help qnamaker:kb:export command help
12301308
--endpoint=endpoint Overrides public endpoint https://westus.api.cognitive.microsoft.com/qnamaker/v4.0/
1231-
--environment=environment (required) Specifies whether environment is Test or Prod.
1309+
--environment=environment [default: Prod] Specifies whether environment is Test or Prod.
12321310
12331311
--kbId=kbId Knowledgebase id to be exported. Overrides the knowledge base id present in the
12341312
config
@@ -1468,5 +1546,5 @@ OPTIONS
14681546
--translatekey=translatekey (required) Machine translation endpoint key.
14691547
```
14701548

1471-
_See code: [@microsoft/bf-lu](https://github.com/microsoft/botframework-cli/tree/master/packages/lu/src/commands/qnamaker/translate.ts)_
1549+
_See code: [@microsoft/bf-qnamaker](https://github.com/microsoft/botframework-cli/tree/master/packages/qnamaker/src/commands/qnamaker/translate.ts)_
14721550
<!-- commandsstop -->

0 commit comments

Comments
 (0)