@specset/cli 0.3.0 → 0.3.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
@@ -21,7 +21,7 @@ Then ask something like *"What mechanical equipment is scheduled on level 2 of m
21
21
  ## Manual install
22
22
 
23
23
  ```bash
24
- npm install -g @specset/cli
24
+ npm install -g @specset/cli@latest
25
25
  ```
26
26
 
27
27
  Requires Node.js 20 or newer.
@@ -29,9 +29,12 @@ Requires Node.js 20 or newer.
29
29
  ## Quickstart
30
30
 
31
31
  ```bash
32
- # Log in (opens your browser)
32
+ # Log in with a visible local browser
33
33
  specset login
34
34
 
35
+ # Or use a code when the browser is remote, headless, or not visible
36
+ specset login --device
37
+
35
38
  # Pick your organization
36
39
  specset org list
37
40
  specset org use <slug>
@@ -74,7 +77,7 @@ specset skill print
74
77
  specset skill print specset-submittals
75
78
  ```
76
79
 
77
- Re-run `specset skill install --target <agent>` after upgrading the CLI to refresh the installed copies.
80
+ Updating an agent plugin does not upgrade an existing global CLI. Run `npm install -g @specset/cli@latest`, then re-run `specset skill install --target <agent>` to refresh direct-installed skill copies.
78
81
 
79
82
  ## Configuration
80
83
 
package/dist/main.js CHANGED
@@ -30347,7 +30347,7 @@ var login = buildCommand({
30347
30347
  }
30348
30348
  },
30349
30349
  docs: {
30350
- brief: "Authenticate with Specset in your browser"
30350
+ brief: "Authenticate with Specset using a browser or device code"
30351
30351
  }
30352
30352
  });
30353
30353
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specset/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Command-line interface for Specset — authenticate, run GraphQL queries, and chat with Specset project agents.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://specset.com",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: specset
3
- description: Core CLI for Specset — install, authenticate, switch organizations, and run GraphQL with `specset api`. Start here for any Specset task, and whenever a specset command fails with auth or org errors.
3
+ description: Core CLI for Specset — install or update the CLI, authenticate with a browser or device code, switch organizations, and run GraphQL with `specset api`. Start here for any Specset task, and whenever a specset command fails with auth or org errors.
4
4
  allowed-tools: Bash Read AskUserQuestion
5
5
  ---
6
6
 
@@ -28,25 +28,27 @@ This is the core skill — setup and mechanics only. Domain workflows live in si
28
28
 
29
29
  ## First-Run Setup
30
30
 
31
- Perform this setup yourself when the user asks to get started with Specset (or when a command fails because the CLI is missing or unauthenticated). Every step is idempotent — skip any that's already satisfied.
31
+ Perform this setup yourself when the user installs or updates the skill/plugin, asks to get started with Specset, or when a command fails because the CLI is missing or unauthenticated. Every step is idempotent — skip any that's already satisfied.
32
32
 
33
- 1. Ensure the CLI is installed:
33
+ 1. Ensure the CLI is installed and current. Installing or updating an agent skill/plugin does not upgrade an existing global npm package. Check the installed and published versions:
34
34
 
35
35
  ```bash
36
- which specset || npm install -g @specset/cli
36
+ specset --version 2>/dev/null || true
37
+ npm view @specset/cli version
37
38
  ```
38
39
 
39
- Requires Node.js 20+ with npm. If `npm` itself is missing, stop and ask the user to install Node.js (https://nodejs.org) first.
40
-
41
- 2. Check authentication with `specset auth status`. If not logged in, start the login flow — it opens the user's browser; tell them to complete sign-in there while the command waits:
40
+ If `specset` is missing or its version is older than the published version, update it and verify the result:
42
41
 
43
42
  ```bash
44
- specset login
43
+ npm install -g @specset/cli@latest
44
+ specset --version
45
45
  ```
46
46
 
47
- Login is interactive by design — never try to bypass it or handle credentials directly. Don't launch a login mid-task without telling the user what's happening.
47
+ Requires Node.js 20+ with npm. If `npm` itself is missing, stop and ask the user to install Node.js (https://nodejs.org) first. Do not replace a source-linked development CLI when its version is newer than npm.
48
48
 
49
- **On a headless machine** (container, SSH, CI — anywhere the browser isn't on this machine), use the device flow instead:
49
+ 2. Check authentication with `specset auth status`. If not logged in, choose the login mode based on whether the user can see a browser opened by this environment.
50
+
51
+ **If a visible browser is unavailable** — including remote or in-app agent sessions, SSH, containers, and CI — use device authentication from the outset:
50
52
 
51
53
  ```bash
52
54
  specset login --device
@@ -54,6 +56,14 @@ specset login --device
54
56
 
55
57
  It prints a short code and a link (`https://<host>/device?code=XXXX-XXXX`). Show both to the user and ask them to open the link on any device and approve; the command completes on its own once they do. The code expires after 15 minutes — if it does, run the command again for a fresh one.
56
58
 
59
+ When a visible browser is available on the same machine, use the browser flow and tell the user to complete sign-in there while the command waits:
60
+
61
+ ```bash
62
+ specset login
63
+ ```
64
+
65
+ Login is interactive by design — never try to bypass it or handle credentials directly. Don't launch a login mid-task without telling the user what's happening.
66
+
57
67
  3. Pick the active organization (required for org-scoped queries):
58
68
 
59
69
  ```bash
@@ -176,4 +186,5 @@ Processing large PDF sets takes minutes; poll every 15–30 seconds and tell the
176
186
  - `No active organization selected` — run `specset org list`, then `specset org use <slug>`.
177
187
  - A lookup by id returns `null` without an error — the record usually belongs to a different org than the active one; check `specset auth status` and switch with `specset org use <slug>`.
178
188
  - Login hangs or the browser can't reach this machine (SSH, container, CI) — use `specset login --device`: it prints a code + link the user approves from any device.
189
+ - `specset --version` is older than `npm view @specset/cli version`, or a documented flag is missing — run `npm install -g @specset/cli@latest`, then verify with `specset --version`.
179
190
  - After upgrading the CLI (`npm i -g @specset/cli@latest`), refresh the skills with `specset skill install --target <claude|codex|chatgpt>`.