@harborppm/cli 0.14.1 → 0.15.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.
- package/README.md +2 -1
- package/lib/cli.mjs +29 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ Your harbor is the same one at [harborppm.com](https://harborppm.com/today?utm_s
|
|
|
55
55
|
- **GitHub**: a pull request that names a task's key (RR-42) shows on the task and moves it along.
|
|
56
56
|
- **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).
|
|
57
57
|
|
|
58
|
-
`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.
|
|
58
|
+
`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).
|
|
59
59
|
|
|
60
60
|
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`.
|
|
61
61
|
|
|
@@ -95,6 +95,7 @@ harbor tasks [words] [--project P] [--assignee me|none|NAME] [--late] [--status
|
|
|
95
95
|
harbor show TASK one task in full, with its web link
|
|
96
96
|
harbor open [TASK|PROJECT] open it on the website (or Today)
|
|
97
97
|
harbor invite EMAIL [--viewer] invite someone to your harbor by email
|
|
98
|
+
harbor calendar [--program P] [--new|--off] your private calendar link (.ics)
|
|
98
99
|
|
|
99
100
|
harbor program "NAME" [--portfolio P] [--lead me|NAME] [--starts DATE]
|
|
100
101
|
[--ends DATE]
|
package/lib/cli.mjs
CHANGED
|
@@ -66,6 +66,7 @@ export const HELP = `harbor: Harbor from the terminal
|
|
|
66
66
|
shell prompt (never waits)
|
|
67
67
|
harbor prompt --init SHELL how to add it: zsh, bash, fish
|
|
68
68
|
or starship
|
|
69
|
+
harbor calendar [--program P] [--new|--off] your private calendar link (.ics)
|
|
69
70
|
|
|
70
71
|
harbor program "NAME" [--portfolio P] [--lead me|NAME] [--starts DATE]
|
|
71
72
|
[--ends DATE]
|
|
@@ -821,6 +822,34 @@ export async function run(argv, io = {}) {
|
|
|
821
822
|
);
|
|
822
823
|
return 0;
|
|
823
824
|
}
|
|
825
|
+
case "calendar": {
|
|
826
|
+
const { values, harbor } = parse(spec(["new", "off"], ["program"]));
|
|
827
|
+
if (values.new && values.off) throw new HarborError("Say --new or --off, not both.");
|
|
828
|
+
if (!hasFullAccess(creds)) {
|
|
829
|
+
throw new HarborError("Calendar links need full access. Run harbor login, then try again.");
|
|
830
|
+
}
|
|
831
|
+
const r = await client.app({
|
|
832
|
+
op: "calendar",
|
|
833
|
+
...(harbor ? { harbor } : {}),
|
|
834
|
+
...(values.program ? { program: values.program } : {}),
|
|
835
|
+
action: values.off ? "off" : values.new ? "fresh" : "show",
|
|
836
|
+
});
|
|
837
|
+
if (asJson) {
|
|
838
|
+
out(jsonText(r));
|
|
839
|
+
return 0;
|
|
840
|
+
}
|
|
841
|
+
const what = r.program ? `everything dated in ${r.program}` : `your work in ${r.harbor}`;
|
|
842
|
+
if (!r.url) {
|
|
843
|
+
out(plain(`Turned off the calendar link for ${what}. Calendars using it stop updating.`));
|
|
844
|
+
return 0;
|
|
845
|
+
}
|
|
846
|
+
out(
|
|
847
|
+
plain(
|
|
848
|
+
`${values.new ? "A new calendar link" : "Your calendar link"} for ${what}${values.new ? " (the old one has stopped working)" : ""}:\n\n ${r.url}\n\nAdd it to Google, Apple or Outlook calendar as a calendar from a URL. Anyone with the link can see these dates; harbor calendar --new swaps it for a fresh one.`,
|
|
849
|
+
),
|
|
850
|
+
);
|
|
851
|
+
return 0;
|
|
852
|
+
}
|
|
824
853
|
case "add": {
|
|
825
854
|
const { positionals, values, harbor } = parse(
|
|
826
855
|
spec(["over-limit"], ["project", "assignee", "due", "priority", "status"]),
|