@higherdev/cli 0.1.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 +137 -0
  2. package/dist/index.js +5951 -0
  3. package/package.json +52 -0
package/README.md ADDED
@@ -0,0 +1,137 @@
1
+ # hd
2
+
3
+ HigherDEV in your terminal. Full control of the board, and live views of agents,
4
+ tickets, runs, and spend without a browser.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ pnpm --filter @higherdev/cli build
10
+ cd apps/cli && npm link # puts `hd` on your PATH
11
+ hd login # six-digit code, emailed
12
+ hd connect # connect Codex to your ChatGPT subscription
13
+ hd use test # pick a workspace
14
+ hd # the live dashboard
15
+ ```
16
+
17
+ Or from the registry: `npm i -g @higherdev/cli`, then the same commands.
18
+ `hd upgrade` updates it, `hd upgrade --check` only reports.
19
+
20
+ ## Which HigherDEV
21
+
22
+ `hd` is not tied to one deployment. On first sign-in it fetches the Supabase
23
+ settings from the app's `/api/config` and caches them in
24
+ `~/.config/higherdev/config.json`.
25
+
26
+ ```bash
27
+ hd login --app-url https://dev.yourcompany.com
28
+ ```
29
+
30
+ Switching deployments clears the previous one's session, cached settings, and
31
+ selected workspace, so two never mix. `HIGHERDEV_APP_URL` overrides per command,
32
+ and `HIGHERDEV_SUPABASE_URL` plus `HIGHERDEV_PUBLISHABLE_KEY` skip the fetch
33
+ entirely. `HIGHERDEV_CONFIG_DIR` keeps a second deployment in its own directory
34
+ if you work across two.
35
+
36
+ Who may sign in is the deployment's decision, not the CLI's: `hd` asks the
37
+ server's own `is_allowlisted()`, the same function RLS enforces with, so a
38
+ published binary carries no list of names.
39
+
40
+ ## How it talks to the platform
41
+
42
+ It signs in as you, with the same emailed six-digit code the web app uses, and
43
+ talks to Supabase directly under RLS. No service key lives on your laptop, and
44
+ every write records an audit event naming you, so a CLI change reads the same as
45
+ a click. Live views are Realtime subscriptions, not polling.
46
+
47
+ ## Two ways to talk to it
48
+
49
+ `hd ask` reaches the **orchestrator**, which runs on the box and is in charge of
50
+ getting work in flight to finish. Ask it why something is stuck or tell it to
51
+ reshuffle a workstream. It cannot change agent settings, and that is enforced by
52
+ its action schema rather than by its prompt.
53
+
54
+ ```bash
55
+ hd ask "why is HD-12 stuck?"
56
+ hd msg HD-12 --to builder "also rename the old column" --interrupt
57
+ ```
58
+
59
+ `hd plan` runs the **architect** here on your machine, on Codex against your
60
+ ChatGPT subscription. It reads the repo, decides what should be built, files an
61
+ epic, and can tune the platform itself: models, effort, routing notes, prompt
62
+ addenda, conventions, budgets. Creating an epic fires `epic.created`, which the
63
+ orchestrator already triggers on, so the handoff needs no glue.
64
+
65
+ ```bash
66
+ hd connect # ChatGPT OAuth, once per machine
67
+ hd doctor # what a run would cost, before it runs
68
+ hd plan "assess the call-intel code and plan what is missing"
69
+ hd plan --read-only "what would you change about the agent lineup?"
70
+ hd plan --resume "split the third ticket, it is too big"
71
+ ```
72
+
73
+ ### The subscription is checked, not assumed
74
+
75
+ The platform runs on subscriptions, never per-token APIs, so `hd plan` **refuses
76
+ to start** unless Codex is signed in through the ChatGPT OAuth flow. It reads
77
+ `~/.codex/auth.json` and distinguishes four states: connected, signed in with an
78
+ API key (which bills per token), signed out, and not installed. `hd connect`
79
+ runs `codex login` for you, which opens the browser and writes the token itself.
80
+ `hd` never sees or stores a Codex credential.
81
+
82
+ `--allow-api-billing` overrides the refusal when you actually mean to spend.
83
+
84
+ `hd mcp` is the same platform as MCP tools on stdio. `hd plan` attaches it to
85
+ Codex for the invocation, with no global config edit. Attach it to Claude Code or
86
+ give Mel the read-only half:
87
+
88
+ ```bash
89
+ hd mcp --list # the 24 tools, with what each does
90
+ hd mcp --read-only # safe to hand to anything
91
+ ```
92
+
93
+ ## Everything else
94
+
95
+ ```
96
+ hd live dashboard hd new "title" --area web/auth
97
+ hd status one-screen summary hd set HD-12 --agent Codex
98
+ hd board kanban by status hd block HD-12 HD-9
99
+ hd ls --stuck why nothing is moving hd take HD-12 / hd handback HD-12
100
+ hd show HD-12 one ticket in full hd cancel HD-12 / hd kill HD-12
101
+ hd watch HD-12 live run transcript hd epic new "title" spec.md
102
+ hd logs <run> -f one run, following hd epic replan <id>
103
+ hd agents live agent state hd orchestrate
104
+ hd feed live activity hd decide <id> "answer"
105
+ hd inbox decisions and messages hd pause / hd resume [--all|-p claude]
106
+ hd cost spend, by day and more hd agent set Codex --model gpt-5.6-sol
107
+ hd hosts runner health hd conventions --edit
108
+ hd connect --check Codex connection hd upgrade [--check]
109
+ hd epic show <id> dependency waves hd attach HD-12 shot.png
110
+ ```
111
+
112
+ Every read takes `--json` and every write is non-interactive when given flags, so
113
+ Claude Code and Mel can drive the board over SSH. Colour follows `NO_COLOR` and
114
+ turns itself off when stdout is not a terminal.
115
+
116
+ ## Onboarding a new host
117
+
118
+ `hd init` still does host onboarding: it writes the runner env file, registers
119
+ the host, installs the launchd plist, and checks each provider CLI is authed. It
120
+ delegates to the runner package, so the box's systemd service never pulls in the
121
+ CLI's UI dependencies.
122
+
123
+ ```bash
124
+ hd init --host seb-mac --owner-email sebastian@higherops.io --install-launchd
125
+ hd login
126
+ ```
127
+
128
+ ## Development
129
+
130
+ ```bash
131
+ pnpm --filter @higherdev/cli dev -- status # run from source
132
+ pnpm --filter @higherdev/cli test
133
+ pnpm --filter @higherdev/cli typecheck
134
+ ```
135
+
136
+ `HIGHERDEV_CONFIG_DIR` points the config and session somewhere else, which is
137
+ how to keep a scratch login separate from your real one.