@plot-app/cli 0.0.2 → 0.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,33 @@
1
+ # Plot CLI Changelog
2
+
3
+ ## 0.0.4 - 2026-04-29
4
+
5
+ - Fix issue with URLs.
6
+
7
+ ## 0.0.3 - 2026-04-29
8
+
9
+ **Commands**
10
+
11
+ - Auth: login flow with credential storage, `whoami` (fixed)
12
+ - Tasks: full CRUD
13
+ - Read commands for projects, docs, collections, teams, statuses, labels, and
14
+ users
15
+ - `activity`, `inbox`, `search`, and `comments` commands
16
+ - Workspace commands and batch operations
17
+ - `user combined-members` command
18
+
19
+ **Workflow**
20
+
21
+ - Context defaults integrated across commands so workspace/team/project flags
22
+ can be inferred
23
+ - Daemon runtime with scope-aware activity and Zero `byIds` queries for faster
24
+ lookups
25
+
26
+ **UX**
27
+
28
+ - New Flexoki color theme
29
+ - UX polish across agent and interactive flows
30
+
31
+ **Fixes**
32
+
33
+ - `whoami` error resolved
package/README.md CHANGED
@@ -28,7 +28,9 @@ plot help identifiers
28
28
  - Prefer handles over UUIDs: task `pathId` (`ENG-042`), team `publicId` (`ENG`), project/document slug or trailing `publicId`, collection slug, and user `@username`.
29
29
  - Switch workspaces explicitly with `plot workspace use <slug>` when a copied URL contains a different workspace slug.
30
30
  - Batch dependent writes through `plot batch` or `plot task create-tree` to reduce round trips and keep outputs machine-readable.
31
- - Treat every non-zero exit as structured failure. The CLI writes errors as JSON with `error`, `code`, and `message`.
31
+ - Treat every non-zero exit as structured failure. The CLI writes errors as JSON with `error`, `code`, `message`, and (when applicable) a `hint` describing the next step an agent can take.
32
+ - Pass `--quiet` to suppress spinners and progress messages — stdout will only contain the formatted result.
33
+ - In CI or tight automation loops, set `PLOT_CLI_SKIP_UPDATE_CHECK=1` to suppress the background self-update check and keep the per-invocation overhead minimal.
32
34
 
33
35
  ## Requirements
34
36
 
@@ -66,11 +68,18 @@ plot search "launch checklist" --format json
66
68
 
67
69
  ```bash
68
70
  plot task list --team ENG --limit 20 --format json
71
+ plot task list --parent none --limit 20 --format json # only top-level (non-subtask) tasks
72
+ plot task list --parent ENG-042 --format json # subtasks of ENG-042
69
73
  plot task get ENG-042 --format json
70
74
  plot task update ENG-042 --status-id status_done --format json
75
+ plot task update ENG-042 --add-labels label_abc,label_def --format json
76
+ plot task update ENG-042 --remove-labels label_xyz --format json
77
+ plot task update ENG-042 --set-labels label_abc,label_def --format json # replace label set; pass "" to clear
71
78
  plot comment add --task-id ENG-042 --body "Implemented and verified." --format json
72
79
  ```
73
80
 
81
+ `task update` label semantics: `--add-labels` appends, `--remove-labels` detaches, `--set-labels` replaces the full set. `--add-labels`/`--remove-labels` can be combined; `--set-labels` cannot be combined with the other two. `--labels` is kept as a back-compat alias for `--add-labels`.
82
+
74
83
  ### Create A Task With Dependencies
75
84
 
76
85
  ```bash
@@ -82,6 +91,8 @@ plot task create \
82
91
  --format json
83
92
  ```
84
93
 
94
+ `task create` is all-or-nothing: if any subsequent step (label add, dependency wiring, status/priority patch) fails, the created task is rolled back so the workspace is left without orphaned partial state.
95
+
85
96
  ### Create A Parent Task Tree
86
97
 
87
98
  ```bash
@@ -195,16 +206,55 @@ Extract the workspace slug first. If it differs from the active workspace, run `
195
206
 
196
207
  Most commands accept `--format json` or `--format markdown`. JSON is the default.
197
208
 
198
- Errors are structured:
209
+ ### List Envelope
210
+
211
+ Every list command (e.g., `task list`, `project list`, `team list`, `doc list`, `collection list`, `user list`, `inbox list`, `comment list`, `activity list`, `search`) returns the same pagination envelope shape in JSON:
212
+
213
+ ```json
214
+ {
215
+ "<itemsKey>": [...],
216
+ "count": 3,
217
+ "startAt": 0,
218
+ "limit": 20,
219
+ "hasMore": false,
220
+ "nextStartAt": null
221
+ }
222
+ ```
223
+
224
+ The `<itemsKey>` is the plural entity name (`tasks`, `projects`, `teams`, `documents`, `collections`, `users`, `notifications`, `comments`, `entries`, `results`). Markdown output renders each item, then a footer line:
225
+
226
+ ```text
227
+ _count: 3, startAt: 0, limit: 20, hasMore: false_
228
+ ```
229
+
230
+ Empty lists still render the footer.
231
+
232
+ ### Quiet Mode
233
+
234
+ Pass `--quiet` (or `-q`) to suppress spinners and progress messages on any data-loading command. Stdout will only contain the formatted result, which lets agents pipe `--format json --quiet` directly into a JSON parser without filtering chrome.
235
+
236
+ Errors are structured. When the failure is recoverable, an optional `hint` field describes the concrete next step an agent should take.
199
237
 
200
238
  ```json
201
239
  {
202
240
  "error": true,
203
241
  "code": "AUTH_REQUIRED",
204
- "message": "No active workspace. Run `plot login` to authenticate."
242
+ "message": "No active workspace. Run `plot login` to authenticate.",
243
+ "hint": "Run 'plot login' to authenticate."
244
+ }
245
+ ```
246
+
247
+ ```json
248
+ {
249
+ "error": true,
250
+ "code": "NOT_FOUND",
251
+ "message": "Task \"NOPE-999\" not found.",
252
+ "hint": "Run 'plot help identifiers' for handle formats, or 'plot task list' to discover ids."
205
253
  }
206
254
  ```
207
255
 
256
+ The `hint` field is optional. Agents should prefer it when present, but fall back to `code` + `message` for branching.
257
+
208
258
  Error code groups:
209
259
 
210
260
  | Exit | Meaning |
@@ -225,6 +275,16 @@ plot logout
225
275
  plot login
226
276
  ```
227
277
 
278
+ ### Self-Update Behavior
279
+
280
+ The CLI checks for new releases at most once per day in the background, on a best-effort basis (failures are silent and never block the current command). To force an immediate check and install the latest release, run:
281
+
282
+ ```bash
283
+ plot update
284
+ ```
285
+
286
+ In CI or batch automation loops, set `PLOT_CLI_SKIP_UPDATE_CHECK=1` to suppress the background check entirely.
287
+
228
288
  ## Security Notes
229
289
 
230
290
  - Personal access tokens and OAuth credentials grant access to Plot workspace data. Do not paste them into prompts, logs, comments, or issues.
package/bin/plot.js CHANGED
@@ -2,7 +2,6 @@
2
2
  const { spawnSync } = require('node:child_process');
3
3
 
4
4
  const key = `${process.platform}-${process.arch}`;
5
- const restartAfterUpdateExitCode = 75;
6
5
  const packages = {
7
6
  'darwin-arm64': '@plot-app/cli-darwin-arm64',
8
7
  'darwin-x64': '@plot-app/cli-darwin-x64',
@@ -36,13 +35,7 @@ const runBinary = (env) =>
36
35
  env,
37
36
  });
38
37
 
39
- let result = runBinary(process.env);
40
- if (result.status === restartAfterUpdateExitCode) {
41
- result = runBinary({
42
- ...process.env,
43
- PLOT_CLI_SKIP_UPDATE_CHECK: '1',
44
- });
45
- }
38
+ const result = runBinary(process.env);
46
39
 
47
40
  if (result.error) {
48
41
  writeError(result.error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plot-app/cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Programmatic access to Plot workspaces for agents.",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -8,7 +8,8 @@
8
8
  },
9
9
  "files": [
10
10
  "bin",
11
- "README.md"
11
+ "README.md",
12
+ "CHANGELOG.md"
12
13
  ],
13
14
  "os": [
14
15
  "darwin",
@@ -22,10 +23,10 @@
22
23
  "node": ">=18"
23
24
  },
24
25
  "optionalDependencies": {
25
- "@plot-app/cli-darwin-arm64": "0.0.2",
26
- "@plot-app/cli-darwin-x64": "0.0.2",
27
- "@plot-app/cli-linux-x64": "0.0.2",
28
- "@plot-app/cli-linux-arm64": "0.0.2"
26
+ "@plot-app/cli-darwin-arm64": "0.0.4",
27
+ "@plot-app/cli-darwin-x64": "0.0.4",
28
+ "@plot-app/cli-linux-x64": "0.0.4",
29
+ "@plot-app/cli-linux-arm64": "0.0.4"
29
30
  },
30
31
  "publishConfig": {
31
32
  "access": "public",