@nlxai/cli 1.2.3-alpha.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +34 -3
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,13 +1,22 @@
1
1
  # `@nlxai/cli`
2
2
 
3
- > Tools for integrating with NLX apps
3
+ Tools for automating certain development tasks for integrating with NLX:
4
4
 
5
- **Warning:** This is an alpha package and will likely not work for you. Keep an eye on this space for a more feature complete release later.
5
+ - Syncing OpenAPI/Swagger/Postman API specifications as collections of Data requests inside NLX. This can speed up exposing an internal API to conversation builders as well as keep the data requests inside NLX in sync as your API evolves.
6
+
7
+ - Keeping **Modality** definitions in sync between a custom modality implementation in your front-end and what builders see inside NLX.
8
+
9
+ - Running conversation tests for an application.
10
+
11
+ and more.
12
+
13
+ > [!WARNING]
14
+ > This is an pre-release package and will likely not work for your use case. Keep an eye on this space for a more feature complete release later.
6
15
 
7
16
  ## Usage
8
17
 
9
18
  ```
10
- > npm -g i cli
19
+ > npm -g i @nlxai/cli
11
20
 
12
21
  > nlx
13
22
 
@@ -86,3 +95,25 @@ Transcript:
86
95
 
87
96
  Debug at: https://dev.platform.nlx.ai/flows/SimpleCarousel
88
97
  ```
98
+
99
+ ## Running in CI
100
+
101
+ Many of the tasks outline above can be quite profitably run on CI servers during development as an additional check to make sure that developers of custom software components stay compatible with what builders are doing inside NLX (as often these can be separate teams).
102
+
103
+ For example:
104
+
105
+ - API endpoint developers may wish to sync their API description to NLX as part of their deployment process
106
+ - Front-end developers will want their CI server to typecheck their modality typescript definitions against the source of truth inside NLX.
107
+ - Backend systems may wish to run conversations tests that rely on said systems as part of their regression testing.
108
+
109
+ To run securely on CI, a CI only user should be created in NLX with only the appropriate permissions set up. Then running `nlx auth login --print-token` and following the instructions will result in a token. This token should be setup as an secret environment variable named `NLX_ACCESS_TOKEN`.
110
+
111
+ For instance in Github Actions, one can configure repository secrets, and then in the job will do:
112
+
113
+ ```yaml
114
+ - name: Run example conversation test
115
+ env:
116
+ NLX_ACCESS_TOKEN: ${{ secrets.NLX_ACCESS_TOKEN }}
117
+ # For example:
118
+ run: nlx test 9bf7404f-8636-4cf6-a33f-cb72b36a062d
119
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nlxai/cli",
3
- "version": "1.2.3-alpha.2",
3
+ "version": "1.2.3",
4
4
  "description": "Tools for integrating with NLX apps",
5
5
  "keywords": [
6
6
  "NLX",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@inquirer/prompts": "^7.8.4",
37
- "@nlxai/core": "^1.2.3-alpha.2",
37
+ "@nlxai/core": "^1.2.3",
38
38
  "boxen": "^8.0.1",
39
39
  "chalk": "^4.1.0",
40
40
  "commander": "^14.0",
@@ -58,5 +58,5 @@
58
58
  "@vitest/ui": "^3.2.4",
59
59
  "vitest": "^3.2.4"
60
60
  },
61
- "gitHead": "7b3f2bffccf925bf674d8fef42af177dc17c367c"
61
+ "gitHead": "3902161e95745dd4a9cfb68bb469755a62b421f5"
62
62
  }