@connxio/cli 0.1.2-beta.2 → 0.1.4

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.
package/README.md ADDED
@@ -0,0 +1,274 @@
1
+ # Connxio CLI
2
+
3
+ Connxio CLI provides the `connxio` command and an MCP server for Connxio management APIs.
4
+
5
+ The current implementation focuses on MCP usage through:
6
+
7
+ ```bash
8
+ connxio mcp serve
9
+ ```
10
+
11
+ ## Prerequisites
12
+
13
+ - Node.js 24 or newer
14
+ - Connxio OAuth client credentials
15
+ - A Connxio subscription-scoped API key for each subscription context you want to use
16
+
17
+ ## Install
18
+
19
+ Install the CLI globally from npm:
20
+
21
+ ```bash
22
+ npm i -g @connxio/cli
23
+ ```
24
+
25
+ Verify installation:
26
+
27
+ ```bash
28
+ connxio --help
29
+ ```
30
+
31
+ ## Configure OAuth
32
+
33
+ ```bash
34
+ connxio auth configure
35
+ ```
36
+
37
+ You will be prompted for:
38
+
39
+ - OAuth client id
40
+ - OAuth scope, defaulting to `api://connxio/.default`
41
+ - OAuth client secret
42
+
43
+ The OAuth token URL is always `https://api.connxio.com/oauth/token`.
44
+
45
+ Check status:
46
+
47
+ ```bash
48
+ connxio auth status
49
+ ```
50
+
51
+ Clear OAuth configuration:
52
+
53
+ ```bash
54
+ connxio auth clear
55
+ ```
56
+
57
+ You can also configure OAuth with environment variables:
58
+
59
+ ```bash
60
+ CONNXIO_OAUTH_CLIENT_ID="<client-id>"
61
+ CONNXIO_OAUTH_CLIENT_SECRET="<client-secret>"
62
+ CONNXIO_OAUTH_TOKEN_URL="https://api.connxio.com/oauth/token"
63
+ CONNXIO_OAUTH_SCOPE="api://connxio/.default"
64
+ ```
65
+
66
+ `CONNXIO_OAUTH_TOKEN_URL` and `CONNXIO_OAUTH_SCOPE` are optional overrides.
67
+
68
+ Do not commit OAuth client secrets or put them in MCP client config unless you explicitly accept that local setup tradeoff.
69
+
70
+ ## Configure Contexts
71
+
72
+ A context represents one Connxio subscription. Connxio API keys are subscription-scoped, so add one context for each subscription you want to use.
73
+
74
+ ```bash
75
+ connxio context add
76
+ ```
77
+
78
+ The CLI calls `/v2/subscriptions/current` with the provided API key and stores the subscription/company metadata locally. API keys are stored through the credential abstraction, not in `config.json`.
79
+
80
+ List contexts:
81
+
82
+ ```bash
83
+ connxio context list
84
+ ```
85
+
86
+ Set a default context:
87
+
88
+ ```bash
89
+ connxio context default <context-id>
90
+ ```
91
+
92
+ Remove a context:
93
+
94
+ ```bash
95
+ connxio context remove <context-id>
96
+ ```
97
+
98
+ ## Register With VS Code
99
+
100
+ VS Code 1.99+ supports MCP servers natively via GitHub Copilot agent mode.
101
+
102
+ **Option 1 — user settings (all projects)**
103
+
104
+ Open `settings.json` (`Cmd+Shift+P` → _Preferences: Open User Settings (JSON)_) and add:
105
+
106
+ ```json
107
+ {
108
+ "mcp": {
109
+ "servers": {
110
+ "connxio": {
111
+ "type": "stdio",
112
+ "command": "connxio",
113
+ "args": ["mcp", "serve"]
114
+ }
115
+ }
116
+ }
117
+ }
118
+ ```
119
+
120
+ **Option 2 — workspace settings (this project only)**
121
+
122
+ Create `.vscode/mcp.json` in your project root:
123
+
124
+ ```json
125
+ {
126
+ "servers": {
127
+ "connxio": {
128
+ "type": "stdio",
129
+ "command": "connxio",
130
+ "args": ["mcp", "serve"]
131
+ }
132
+ }
133
+ }
134
+ ```
135
+
136
+ After saving, open a Copilot chat in agent mode (`@workspace` or the **Agent** dropdown) and the Connxio tools will be available.
137
+
138
+ If you need to pass environment variables (e.g. for OAuth or a custom API base URL), add an `env` block:
139
+
140
+ ```json
141
+ {
142
+ "servers": {
143
+ "connxio": {
144
+ "type": "stdio",
145
+ "command": "connxio",
146
+ "args": ["mcp", "serve"],
147
+ "env": {
148
+ "CONNXIO_OAUTH_CLIENT_ID": "<client-id>",
149
+ "CONNXIO_OAUTH_CLIENT_SECRET": "<client-secret>"
150
+ }
151
+ }
152
+ }
153
+ }
154
+ ```
155
+
156
+ Do not commit files containing OAuth client secrets to source control.
157
+
158
+ ## Register With Claude Code
159
+
160
+ Register the installed MCP server:
161
+
162
+ ```bash
163
+ claude mcp add --scope user --transport stdio connxio -- connxio mcp serve
164
+ ```
165
+
166
+ Verify registration:
167
+
168
+ ```bash
169
+ claude mcp list
170
+ ```
171
+
172
+ If you need to replace an existing registration:
173
+
174
+ ```bash
175
+ claude mcp remove connxio
176
+ claude mcp add --scope user --transport stdio connxio -- connxio mcp serve
177
+ ```
178
+
179
+ ## API Base URL
180
+
181
+ The default API base URL is:
182
+
183
+ ```text
184
+ https://api.connxio.com
185
+ ```
186
+
187
+ Override it per context:
188
+
189
+ ```bash
190
+ connxio context add --base-url http://localhost:5119/api
191
+ ```
192
+
193
+ Or with an environment variable:
194
+
195
+ ```bash
196
+ CONNXIO_API_BASE_URL="http://localhost:5119/api"
197
+ ```
198
+
199
+ For localhost development with self-signed HTTPS certificates, the CLI automatically allows insecure TLS for localhost URLs. For other local development endpoints, use:
200
+
201
+ ```bash
202
+ CONNXIO_INSECURE_TLS=true
203
+ ```
204
+
205
+ Do not use insecure TLS settings in production.
206
+
207
+ ## Run Diagnostics
208
+
209
+ ```bash
210
+ connxio mcp doctor
211
+ ```
212
+
213
+ For HTTP troubleshooting, enable redacted request diagnostics:
214
+
215
+ ```bash
216
+ CONNXIO_DEBUG_HTTP=true connxio mcp doctor
217
+ ```
218
+
219
+ ## MCP Tools
220
+
221
+ The MCP server exposes non-message Connxio v2 management operations.
222
+
223
+ Context and subscription tools:
224
+
225
+ - `list_contexts`
226
+ - `get_current_context`
227
+ - `list_subscriptions`
228
+ - `get_current_subscription`
229
+
230
+ Integration tools:
231
+
232
+ - `list_integrations`
233
+ - `get_integration`
234
+ - `create_integration`
235
+ - `create_integration_no_validation`
236
+ - `update_integration`
237
+ - `delete_integration`
238
+
239
+ Code component tools:
240
+
241
+ - `list_code_components`
242
+ - `get_code_component`
243
+ - `get_code_component_versions`
244
+ - `create_code_component`
245
+ - `deprecate_code_component`
246
+ - `rename_code_component`
247
+ - `delete_code_component`
248
+
249
+ Environment variable tools:
250
+
251
+ - `list_environment_variables`
252
+ - `get_environment_variable`
253
+ - `create_environment_variable`
254
+ - `delete_environment_variable`
255
+
256
+ Security configuration tools:
257
+
258
+ - `list_security_configs`
259
+ - `get_security_config`
260
+ - `create_security_config`
261
+ - `delete_security_config`
262
+
263
+ Write tools require `contextId`. Destructive tools require `contextId` and `confirm: true`.
264
+
265
+ `/messages` operations are intentionally not exposed yet.
266
+
267
+ ## Local Config Files
268
+
269
+ Non-secret config is stored in:
270
+
271
+ - macOS/Linux: `${XDG_CONFIG_HOME:-~/.config}/connxio/config.json`
272
+ - Windows: `%APPDATA%\connxio\config.json`
273
+
274
+ Secrets are stored through the CLI credential abstraction. The current implementation uses a local credential store at the same config root so it can later move to OS keychain storage without changing context consumers.
package/dist/index.mjs CHANGED
@@ -11222,7 +11222,7 @@ function updateNotifier(options) {
11222
11222
  //#endregion
11223
11223
  //#region packages/cli/package.json
11224
11224
  var name = "@connxio/cli";
11225
- var version$1 = "0.1.2-beta.2";
11225
+ var version$1 = "0.1.4";
11226
11226
  var package_default = {
11227
11227
  name,
11228
11228
  version: version$1,
@@ -11246,6 +11246,10 @@ var package_default = {
11246
11246
  types: "./dist/index.d.mts",
11247
11247
  exports: { ".": "./dist/index.mjs" },
11248
11248
  publishConfig: { "access": "public" },
11249
+ scripts: {
11250
+ "prepack": "cp ../../README.md ./README.md",
11251
+ "postpack": "rm -f ./README.md"
11252
+ },
11249
11253
  dependencies: {
11250
11254
  "@modelcontextprotocol/sdk": "^1.29.0",
11251
11255
  "commander": "^14.0.3",
@@ -32664,7 +32668,7 @@ async function updateComponentInIntegration(client, input) {
32664
32668
  if (!isRecord(integration)) throw new Error(`Integration ${integrationId} was not found.`);
32665
32669
  const existingComponent = await findCodeComponentByName(client, componentName);
32666
32670
  const nextIntegration = JSON.parse(JSON.stringify(integration));
32667
- if (!replaceComponentVersion(nextIntegration, [existingComponent?.id, componentName].filter((value) => Boolean(value)), oldVersion, newVersion, { newSasUri: existingComponent?.sasUri ?? void 0 })) return {
32671
+ if (!replaceComponentVersion(nextIntegration, [existingComponent?.id, componentName].filter((value) => Boolean(value)), oldVersion, newVersion, existingComponent?.sasUri ? { newSasUri: existingComponent.sasUri } : {})) return {
32668
32672
  componentId: existingComponent?.id ?? null,
32669
32673
  componentName,
32670
32674
  integrationId,