@m8t-stack/cli 0.2.0 → 0.2.1

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 CHANGED
@@ -1,6 +1,14 @@
1
- # `@m8t-stack/cli`
1
+ # `@m8t-stack/cli` — the `m8t` CLI
2
2
 
3
- The `m8t` CLI for managing m8t-stack deployments.
3
+ > 📖 Reference for the `m8t` command-line tool that manages m8t-stack deployments.
4
+
5
+ ## What it is
6
+
7
+ The `m8t` CLI manages a deployed m8t-stack platform: identity (`whoami`, `status`, `doctor`), config (`config`, `switch`), team membership (`team`), channel bindings (`bind`), the gateway stack (`deploy`), hosted coders (`coder`), and brains (`brain`). It's published to npm, Homebrew, and Scoop.
8
+
9
+ ## Why / how it fits
10
+
11
+ It's the operator's day-2 tool for the cloud platform — the successor to the old `deploy/setup.mjs`. It shares `@m8t-stack/api-contract` types with the gateway at build time and authenticates with your `az` session (`DefaultAzureCredential`).
4
12
 
5
13
  ## Install
6
14
 
@@ -148,7 +156,7 @@ m8t bind cleanup --all-orphaned
148
156
 
149
157
  `m8t bind add telegram ...` currently fails with:
150
158
 
151
- ```
159
+ ```text
152
160
  error: no adapter for channel 'telegram'. This is expected for F4 alone;
153
161
  the channel-specific adapter ships in a later feature.
154
162
  ```
@@ -190,10 +198,13 @@ Granular error info in stderr's structured JSON envelope.
190
198
  ## Troubleshooting
191
199
 
192
200
  ### `error: You are not signed in to Azure.`
201
+
193
202
  Run `az login` first. The CLI uses your active `az` session to acquire a token for the gateway.
194
203
 
195
204
  ### `error: No m8t-stack deployment found in subscription <name>.`
205
+
196
206
  The deployment is in a different subscription. Switch with:
207
+
197
208
  ```bash
198
209
  az account set --subscription <other-sub>
199
210
  m8t config reset
@@ -201,13 +212,17 @@ m8t team list
201
212
  ```
202
213
 
203
214
  ### `error: Multiple m8t-stack deployments found ...`
215
+
204
216
  You have more than one gateway in this subscription. The CLI prompts you to pick one when running interactively (e.g. `m8t whoami`). The choice is cached at `~/.m8t-stack/cli-config.yaml`. Or pass `--subscription <id>` to target a specific subscription and skip the picker entirely.
205
217
 
206
218
  ### `(gateway is starting up...)`
219
+
207
220
  The deployed gateway is configured with `min-replicas=0` (scale-to-zero). First request after idle pays ~10–20s cold start. The CLI retries once on 502/503/504.
208
221
 
209
222
  ### `error: partial write — <channel-A> succeeded, <channel-B> failed.`
223
+
210
224
  A multi-identity `m8t team add` partially succeeded. Run `m8t team show <handle>` to verify the current state, then `m8t team add-identity <handle> --<channel-B> <id>` to fill in the missing identity.
211
225
 
212
226
  ### CLI version vs gateway version drift
227
+
213
228
  The CLI and the gateway share `@m8t-stack/api-contract` types at compile time (the CLI bundles them at build). If the gateway is on an older version and returns a response in an unknown shape, the CLI surfaces `BAD_RESPONSE` with a "this may be a gateway version mismatch" hint.