@harborppm/cli 0.38.0 → 0.39.0

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 (3) hide show
  1. package/README.md +2 -2
  2. package/lib/cli.mjs +41 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -57,7 +57,7 @@ Your harbor is the same one at [harborppm.com](https://harborppm.com/today?utm_s
57
57
  - **GitHub**: a pull request that names a task's key (RR-42) shows on the task and moves it along.
58
58
  - **Claude and other AI apps**, connected over MCP from [harborppm.com/ai](https://harborppm.com/ai?utm_source=npm&utm_medium=readme&utm_campaign=cli).
59
59
 
60
- `harbor open RR-42` opens a task on the website (in the right harbor, even when the browser had another one open), `harbor open Ridge` a project, and `harbor open` on its own opens Today. `harbor invite sam@example.com` sends Sam the same invite letter the People page does (`--viewer` to let them look but not change anything); only a harbor's owner can invite. `harbor calendar` prints your private calendar link, to add to Google, Apple or Outlook calendar: your due dates, milestones and sign-offs beside your meetings, kept up to date (`--program NAME` for everything dated in one program, `--new` to swap the link for a fresh one, `--off` to turn it off). `harbor roadmap "Next steps"` publishes a project as a public roadmap page (Now, Next and Shipped, task titles only) and prints its link; `--dates` adds the day each thing shipped and `--off` takes it down. Only a harbor's owner can publish.
60
+ `harbor open RR-42` opens a task on the website (in the right harbor, even when the browser had another one open), `harbor open Ridge` a project, and `harbor open` on its own opens Today. `harbor invite sam@example.com` sends Sam the same invite letter the People page does (`--viewer` to let them look but not change anything); only a harbor's owner can invite. `harbor calendar` prints your private calendar link, to add to Google, Apple or Outlook calendar: your due dates, milestones and sign-offs beside your meetings, kept up to date (`--program NAME` for everything dated in one program, `--new` to swap the link for a fresh one, `--off` to turn it off). `harbor roadmap "Next steps"` says whether a project is a public roadmap page and prints its link; `--publish` publishes it (Now, Next and Shipped, task titles only, on a link that can't be guessed, which stays the same while it's live), `--publish --dates` adds the day each thing shipped (titles only is the default), and `--off` takes it down at once. Only a harbor's owner can publish. `harbor projects --json` gives each project's `public` and `url`.
61
61
 
62
62
  The website has the commands too: turn on **Command line at the bottom** in your menu, press `/`, and type `mine`, `add "Call the mill" #ridge @sam --due fri` or `done RR-12`.
63
63
 
@@ -129,7 +129,7 @@ harbor show TASK one task in full, with its web link
129
129
  harbor open [TASK|PROJECT] open it on the website (or Today)
130
130
  harbor invite EMAIL [--viewer] invite someone to your harbor by email
131
131
  harbor calendar [--program P] [--new|--off] your private calendar link (.ics)
132
- harbor roadmap PROJECT [--dates] [--off] publish a project's public roadmap
132
+ harbor roadmap PROJECT [--publish] [--off] a project's public roadmap: read, publish or take it down
133
133
 
134
134
  harbor program "NAME" [--portfolio P] [--lead me|NAME] [--starts DATE]
135
135
  [--ends DATE]
package/lib/cli.mjs CHANGED
@@ -85,8 +85,10 @@ export const HELP = `harbor: Harbor from the terminal
85
85
  harbor prompt --init SHELL how to add it: zsh, bash, fish
86
86
  or starship
87
87
  harbor calendar [--program P] [--new|--off] your private calendar link (.ics)
88
- harbor roadmap PROJECT [--dates|--no-dates] [--off]
89
- publish a project's public roadmap
88
+ harbor roadmap PROJECT [--publish [--dates|--no-dates] [--site|--no-site]]
89
+ [--off]
90
+ a project's public roadmap: read,
91
+ publish or take it down
90
92
 
91
93
  harbor init [PROJECT] [--hook] keep a project's tasks as files in
92
94
  this repository (.harbor/), one
@@ -450,6 +452,29 @@ const DETAIL = {
450
452
  " PROJECT is a name, a key like RR, or an id. When two projects share a",
451
453
  " name, give the key.",
452
454
  ],
455
+ roadmap: [
456
+ " harbor roadmap PROJECT reads whether it's public, and its link",
457
+ " harbor roadmap PROJECT --publish writes: publishes it, or keeps it live",
458
+ " with any change below; the link stays",
459
+ " the same while it's live",
460
+ " harbor roadmap PROJECT --publish --dates",
461
+ " writes: also shows the day each thing",
462
+ " shipped (--no-dates: titles only, the",
463
+ " default)",
464
+ " harbor roadmap PROJECT --publish --site",
465
+ " writes: also shows it at",
466
+ " harborppm.com/roadmap, in place of any",
467
+ " other (Harbor's own team only;",
468
+ " --no-site, the default, takes it off)",
469
+ " harbor roadmap PROJECT --off writes: takes it down at once; the link",
470
+ " then says it isn't published, and",
471
+ " publishing again makes a new link",
472
+ "",
473
+ " A visitor sees Now, Next and Shipped: task titles only, with no people,",
474
+ " keys, notes, comments or due dates. Anyone with the link can open it; the",
475
+ " link is long and random, so it can't be guessed. Only the harbor's owner",
476
+ " can publish.",
477
+ ],
453
478
  forecast: [
454
479
  " harbor forecast [--program P] reads when each open project will",
455
480
  " likely finish",
@@ -1349,20 +1374,28 @@ export async function run(argv, io = {}) {
1349
1374
  }
1350
1375
  case "roadmap": {
1351
1376
  const { positionals, values, harbor } = parse(
1352
- spec(["dates", "no-dates", "site", "no-site", "off"]),
1377
+ spec(["publish", "dates", "no-dates", "site", "no-site", "off"]),
1353
1378
  );
1354
1379
  const project = text(positionals, "which project");
1355
1380
  if (values.dates && values["no-dates"])
1356
1381
  throw new HarborError("Say --dates or --no-dates, not both.");
1357
1382
  if (values.site && values["no-site"])
1358
1383
  throw new HarborError("Say --site or --no-site, not both.");
1384
+ if (values.off && values.publish) throw new HarborError("Say --publish or --off, not both.");
1385
+ const changes = ["dates", "no-dates", "site", "no-site"].filter((f) => values[f]);
1386
+ if (changes.length && !values.publish) {
1387
+ throw new HarborError(
1388
+ `Nothing changed. Add --publish to change what the page shows: harbor roadmap "${project}" --publish ${changes.map((f) => `--${f}`).join(" ")}`,
1389
+ );
1390
+ }
1359
1391
  if (!hasFullAccess(creds)) {
1360
- throw new HarborError("Publishing needs full access. Run harbor login, then try again.");
1392
+ throw new HarborError("Roadmaps need full access. Run harbor login, then try again.");
1361
1393
  }
1362
1394
  const r = await client.app({
1363
1395
  op: "roadmap",
1364
1396
  ...(harbor ? { harbor } : {}),
1365
1397
  project,
1398
+ ...(values.publish ? { publish: true } : {}),
1366
1399
  ...(values.off ? { off: true } : {}),
1367
1400
  ...(values.dates || values["no-dates"] ? { showDates: Boolean(values.dates) } : {}),
1368
1401
  ...(values.site || values["no-site"] ? { onSite: Boolean(values.site) } : {}),
@@ -1374,7 +1407,9 @@ export async function run(argv, io = {}) {
1374
1407
  if (!r.url) {
1375
1408
  out(
1376
1409
  plain(
1377
- `${r.project} isn't published any more. Its link says the roadmap isn't published.`,
1410
+ values.off
1411
+ ? `${r.project} isn't published any more. Its link now says the roadmap isn't published.`
1412
+ : `${r.project} isn't public. harbor roadmap "${r.project}" --publish publishes it.`,
1378
1413
  ),
1379
1414
  );
1380
1415
  return 0;
@@ -1382,7 +1417,7 @@ export async function run(argv, io = {}) {
1382
1417
  const shows = r.showDates ? "titles and the day each shipped" : "titles only";
1383
1418
  out(
1384
1419
  plain(
1385
- `${r.project}'s public roadmap (Now, Next and Shipped; ${shows}, no people):\n\n ${r.url}${r.siteUrl ? `\n\nIt's also Harbor's own roadmap at ${r.siteUrl}.` : ""}\n\nharbor roadmap "${r.project}" --off takes it down.`,
1420
+ `${r.project}${values.publish ? " is public" : "'s public roadmap"} (Now, Next and Shipped; ${shows}, no people):\n\n ${r.url}${r.siteUrl ? `\n\nIt's also Harbor's own roadmap at ${r.siteUrl}.` : ""}\n\nharbor roadmap "${r.project}" --off takes it down.`,
1386
1421
  ),
1387
1422
  );
1388
1423
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harborppm/cli",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "description": "Harbor from the terminal: a full-screen app with everything, plus commands for scripts and agents.",
5
5
  "keywords": [
6
6
  "harbor",