@harborppm/cli 0.118.0 → 0.120.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 CHANGED
@@ -50,6 +50,8 @@ It runs on the same engine as the website: health, task keys, limits and undo wo
50
50
 
51
51
  It has colours for dark terminals and for light ones, and picks by asking the terminal for its background (or reading `COLORFGBG`); a terminal that doesn't say gets the dark ones. `harbor theme light` or `harbor theme dark` settles it, `harbor theme auto` goes back to asking, and `HARBOR_THEME` overrides it for one run.
52
52
 
53
+ The commands' answers are coloured on a terminal: a task's key stands out, the details in brackets step back, and late work, off track and at risk are the only warm words. They use your terminal's own colours, so they follow its theme. Piped, redirected or with `--json` the text is plain, and `--no-color` or `NO_COLOR=1` keeps it plain on a terminal too.
54
+
53
55
  `harbor help` starts with the dozen commands most people need; `harbor help all` lists every one. It shows the mark too, in a terminal with colour; piped, or with `NO_COLOR` set, it's plain text. `harbor --version` says which version you have.
54
56
 
55
57
  ## On the website
@@ -115,6 +117,8 @@ Task titles, names and notes can come from an intake form, a GitHub pull request
115
117
 
116
118
  `harbor signup` is for a first visit: the same sign-in, with the page opened on making an account. `harbor login` registers the CLI with Harbor and opens the same page Claude and other apps use: it names "Harbor CLI" and asks what to allow. Choose **Allow reading only** (or run `harbor login --read-only`) if it shouldn't change anything. The sign-in is saved in `~/.config/harbor/credentials.json`, readable only by you, and refreshes itself for 30 days.
117
119
 
120
+ A new harbor starts with First voyage, a short project of practice tasks. They tick themselves off from the terminal as they do on the website: `harbor add "Call the printer"` puts your first task there (it's the only project you have) and ticks "Add a task of your own" and "Try Harbor in your terminal", and the answer says so.
121
+
118
122
  `harbor logout` forgets it on this machine. To end its access everywhere, disconnect **Harbor CLI** under **Connected apps** in Harbor's menu.
119
123
 
120
124
  ## Commands
@@ -177,7 +181,11 @@ harbor add "TITLE" --project P [--assignee me|NAME] [--also "NAME, NAME"] [--due
177
181
  away, what it waits on, how long their similar tasks
178
182
  took); it needs an owner, and an empty queue gives
179
183
  their next working day. A date that won't hold says so
180
- harbor start TASK | submit TASK | done TASK [--confirm] [--over-limit]
184
+ harbor start TASK | submit TASK | done TASK [--confirm] [--over-limit] [--comment TEXT]
185
+ --comment leaves a note on the task as it moves;
186
+ several keys at once (harbor done RR-4 RR-7) move
187
+ each in turn; one that can't move says why and the
188
+ rest carry on
181
189
  harbor edit TASK [--title T] [--assignee me|none|NAME] [--also "NAME, NAME"|none]
182
190
  [--due DATE|pilot|none] [--starts DATE|none]
183
191
  [--priority P] [--status S] [--notes TEXT]
@@ -258,6 +266,7 @@ harbor convoy ask PROGRAM --to OTHER --by DATE "WHAT"
258
266
  harbor convoy accept|decline|deliver|undeliver|move|withdraw CONVOY [--project P] [--note WHY] [--by DATE]
259
267
  harbor salts PROJECT [--risk N|--task N|--put-away N] what finished projects like it ran into
260
268
  harbor rank PORTFOLIO [--order "A, B, C"|--clear] which ship docks first
269
+ harbor wbs NAME [--depth N] [--open] the work breakdown, numbered 1, 1.1, 1.1.2
261
270
  harbor agent [--agent NAME]
262
271
  harbor agent report TASK "WHAT YOU DID" [--start] [--agent NAME]
263
272
  ```
@@ -272,6 +281,8 @@ harbor agent report TASK "WHAT YOU DID" [--start] [--agent NAME]
272
281
 
273
282
  `harbor salts "Ridge Runner"` shows up to three old salts: what finished projects like it ran into (risks that came true, issues, voyage log lines, tasks that finished long late), with what helped. `--risk 1` puts the first on the register, `--task 1` adds it as a task, `--put-away 1` stops showing it. `harbor rank "Summit Line"` shows the order a portfolio's projects dock in, who set it and how the newest ranking link stands; `--order "Daypack, Ridge Runner"` sets one (open projects of that portfolio, first to dock first) and `--clear` takes it off. The ranking link the crew answers in pairs is made on the portfolio page.
274
283
 
284
+ `harbor wbs "Summit Line"` prints a portfolio, program or project as its work breakdown: every program, project, task and subtask under it on its own line, numbered from it (1, 1.1, 1.1.2) as the website's Breakdown view numbers them, with the owner, dates, how much is done and how many are late. `--depth 2` stays two levels down, `--open` leaves finished work out without renumbering the rest, and `--kind program` settles a name a project and a program share.
285
+
275
286
  `harbor lifeboats` lists the work only one person has touched (a project, their corner of one, a task others wait on, their serious risks), numbered, each with someone who has room this week and already works nearby. `harbor lifeboats 2` puts that person on line 2 as a second pair of hands (`--person NAME` for someone else); `harbor follow RR-4 --person Sam` does it for one task. Following doesn't take the work over. `harbor raid "DECISION" --still-stands "WHY"` says a decision that came back for a look still stands.
276
287
 
277
288
  Agents on the crew: put an AI app on People with Add an agent and assign it tasks like anyone else. An agent working through the CLI (Claude Code, say) runs `harbor agent` for its tasks, in progress first, with their notes, checklists and latest comments. When it's done, `harbor agent report RR-4 "Drafted 12 questions; two need Dana"` adds its note as the agent's comment and moves the task to In review and asks whoever gave it the task to check it. They approve it, or send it back with a note, which `harbor agent` shows first. An agent never marks its own work Done.
package/bin/harbor.mjs CHANGED
@@ -2,10 +2,17 @@
2
2
  import { VERSION, run } from "../lib/cli.mjs";
3
3
  import { exitWhenWritten } from "../lib/exit.mjs";
4
4
  import { HarborError } from "../lib/mcp.mjs";
5
+ import { paint, wantsColour, withoutColourFlags } from "../lib/paint.mjs";
5
6
  import { jsonText, plain } from "../lib/plain.mjs";
6
7
  import { updateNotice } from "../lib/update.mjs";
7
8
 
8
- const argv = process.argv.slice(2);
9
+ const typed = process.argv.slice(2);
10
+ // Colour on a terminal only, and never in what a script reads (paint.mjs).
11
+ const colour = wantsColour({ argv: typed });
12
+ const argv = withoutColourFlags(typed);
13
+ const help =
14
+ argv[0] === "help" || argv.includes("--help") || argv.includes("-h") || argv.length === 0;
15
+ const io = colour ? { out: (s) => process.stdout.write(`${paint(s, { help })}\n`) } : {};
9
16
  // Asked alongside the command, so it costs nothing extra (see update.mjs).
10
17
  // Not for the shell prompt, which draws on every Enter and must never wait.
11
18
  const notice =
@@ -17,7 +24,7 @@ const tell = async () => {
17
24
  if (line) process.stderr.write(`\n${line}\n`);
18
25
  };
19
26
 
20
- run(argv).then(
27
+ run(argv, io).then(
21
28
  async (code) => {
22
29
  await tell();
23
30
  await exitWhenWritten(code);