@haakco/hostingctl 1.0.765 → 1.0.807
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 +53 -35
- package/dist/main.js +6822 -2864
- package/dist/main.js.map +1 -1
- package/package.json +11 -11
- package/platform/darwin-arm64/hostingctl +0 -0
- package/platform/darwin-x64/hostingctl +0 -0
- package/platform/linux-arm64/hostingctl +0 -0
- package/platform/linux-x64/hostingctl +0 -0
- package/platform/windows-x64/hostingctl.exe +0 -0
package/README.md
CHANGED
|
@@ -25,13 +25,13 @@ npx @haakco/hostingctl --version # no install at all
|
|
|
25
25
|
npm i -g @haakco/hostingctl # install, once
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
npm installs it and Node starts a small launcher — no checkout, no database, no cluster credentials. The
|
|
29
29
|
package also carries a self-contained executable for each of the five platforms under `platform/<id>/`, and
|
|
30
30
|
its `bin` is a small JavaScript launcher: it runs the executable built for the machine it was installed on,
|
|
31
31
|
and falls back to the JavaScript bundle in `dist/` when that machine has none or `HOSTINGCTL_FORCE_JS=1` is
|
|
32
|
-
set.
|
|
33
|
-
only the one it will run. `hostingctl --version`
|
|
34
|
-
`Launch path: native executable (linux-x64)` or the bundle and its reason.
|
|
32
|
+
set. Node 22 or newer is needed only where that bundle answers. One package carrying all five is the
|
|
33
|
+
trade — an install downloads every platform's executable, not only the one it will run. `hostingctl --version`
|
|
34
|
+
names which path answered it, either `Launch path: native executable (linux-x64)` or the bundle and its reason.
|
|
35
35
|
|
|
36
36
|
### Running this checkout's CLI
|
|
37
37
|
|
|
@@ -100,16 +100,26 @@ them.
|
|
|
100
100
|
[test users](../docs/development/test_users.md): they exist only in local, `DevelopmentSeeder` creates
|
|
101
101
|
them, and their password is public development data rather than a credential.
|
|
102
102
|
|
|
103
|
-
Sign in
|
|
103
|
+
Sign in:
|
|
104
104
|
|
|
105
105
|
```text
|
|
106
|
-
hostingctl login
|
|
106
|
+
hostingctl login
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
With no flags it signs in to `https://hosting.haak.co/api/v1`. The first-party public client of each known
|
|
110
|
+
installation (production and staging) ships with the CLI, in `cli/src/auth/installations.ts` and
|
|
111
|
+
`crates/hostingctl/src/config.rs`, which a test keeps identical. Any other installation, such as the local
|
|
112
|
+
stack, needs its client: `hostingctl login --api-url http://localhost:8000/api/v1 --client-id <id>`, where the
|
|
113
|
+
id is the API's `PASSPORT_FIRST_PARTY_CLIENT_IDS` (or `HOSTINGCTL_CLIENT_ID`).
|
|
114
|
+
|
|
109
115
|
The browser completes sign-in and consent. Before the session is written, the API is asked who the new token
|
|
110
116
|
is (`GET /me`): a token Passport minted but the API will not act on is a failed sign-in, and the working session
|
|
111
117
|
it would have replaced is left alone.
|
|
112
118
|
|
|
119
|
+
`login --company <slug>` also stores the company the session is for. A company command then reads
|
|
120
|
+
`--company`, else `HOSTINGCTL_COMPANY`, else that stored company, else the account's only company; an account in
|
|
121
|
+
several companies with none named is refused with the list.
|
|
122
|
+
|
|
113
123
|
Without `--token`, subsequent commands use that saved session. For automation, set `HOSTINGCTL_API_URL` and
|
|
114
124
|
`HOSTINGCTL_TOKEN` instead. The isolated local acceptance proved real browser consent and refresh-token
|
|
115
125
|
rotation on 2026-10-08.
|
|
@@ -119,7 +129,7 @@ rotation on 2026-10-08.
|
|
|
119
129
|
One credential file holds several sessions. Each is a profile:
|
|
120
130
|
|
|
121
131
|
```text
|
|
122
|
-
hostingctl login --profile staging --api-url https://
|
|
132
|
+
hostingctl login --profile staging --api-url https://hosting-staging.haakdev.com/api/v1
|
|
123
133
|
hostingctl whoami --profile staging # or HOSTINGCTL_PROFILE=staging
|
|
124
134
|
hostingctl auth status # the session a command would use, and its expiry
|
|
125
135
|
hostingctl auth logout --profile staging # revoke at the API, then remove it here
|
|
@@ -212,8 +222,8 @@ The command prints a `--page` hint when older entries remain.
|
|
|
212
222
|
|
|
213
223
|
`hostingctl --help` lists every top-level command, and `<command> --help` prints that command's own groups,
|
|
214
224
|
its flags and what each one does. The whole surface, with every flag, is in the
|
|
215
|
-
[command reference](https://hosting.haak.co/docs/cli-reference), which is generated from the
|
|
216
|
-
|
|
225
|
+
[command reference](https://hosting.haak.co/docs/cli-reference), which is generated from the Rust binary's
|
|
226
|
+
own parser (`hostingctl reference`) and compared against it in CI. The groups, in one line each:
|
|
217
227
|
|
|
218
228
|
| Command | Covers |
|
|
219
229
|
| --- | --- |
|
|
@@ -227,7 +237,7 @@ metadata and compared against it in CI. The groups, in one line each:
|
|
|
227
237
|
| `registry-connections` | A company's container-registry connections: the account, the repository scope, one verified manifest check, credential rotation and revocation. It stores no customer image and starts no workload |
|
|
228
238
|
| `storage` | Purchased object storage: a capacity's price, the purchase, an increase or a resize at that price, which basis the bucket is billed on, the bucket's connection facts, its keys, objects and bindings, the downloads measured for a month, the ceiling that caps the overage bill, and the optional stored-byte maximum that limits growth without buying capacity |
|
|
229
239
|
| `company` | The company itself, its members and roles, its activity, its logo and favicon, and the invitation journey |
|
|
230
|
-
| `environment` | Create, read, scale, retry; profile coverage, domains and redirects, databases and exports, configuration and secrets, services, site access,
|
|
240
|
+
| `environment` | Create, read, scale, retry; profile coverage, domains and redirects, databases and exports, configuration and secrets, services, site access, tools, tuning, retention, portable export, and the release bundle |
|
|
231
241
|
| `application` | Create, rename, remove; build and deploy, build logs, runs and run logs, process schedules; recovery review and confirm; the HTTP cache and path routes; source binding; site access; the WordPress import and URL repair; the administrator credential; the component's publishable anonymous key |
|
|
232
242
|
| `access` | Who may reach one environment: settings, grants, SSH keys, the shared password, and the per-user view |
|
|
233
243
|
| `alerts` | A company's disk alerts: what is breached now, the disks the platform reads, and the rules that email members about them |
|
|
@@ -268,7 +278,8 @@ The Hosting GUI's **Speed check** task uses the same result. No `--confirm` is n
|
|
|
268
278
|
This is not a browser audit: no bodies/assets or redirects are fetched, public DNS/CDN paths are
|
|
269
279
|
not measured, and failed timings are null rather than zero. A fast HTTP error is not a fast page.
|
|
270
280
|
The [API contract](../docs/development/api_features.md#on-demand-application-speed-check) owns the
|
|
271
|
-
bounds and interpretation.
|
|
281
|
+
bounds and interpretation. Ongoing uptime, TLS and site audits come from Custd through
|
|
282
|
+
`hostingctl environment site-insights` ([site insights](../docs/development/hosting_site_insights.md)).
|
|
272
283
|
|
|
273
284
|
## One command from a document to a serving environment
|
|
274
285
|
|
|
@@ -419,7 +430,7 @@ hostingctl realm adopt <environment-uuid> --custd-company <uuid> --owning-user <
|
|
|
419
430
|
--registration-policy <invite_only|open> --expected-revision <n> [--login-paused] \
|
|
420
431
|
[--audiences <path>] --dry-run
|
|
421
432
|
hostingctl realm retry <environment-uuid> --company acme --confirm
|
|
422
|
-
hostingctl realm audience <environment-uuid> <
|
|
433
|
+
hostingctl realm audience <environment-uuid> <application-uuid> --company acme --audience acme --confirm
|
|
423
434
|
```
|
|
424
435
|
|
|
425
436
|
`show` prints what Hosting has recorded for that environment's realm — its state, expected and observed
|
|
@@ -639,7 +650,7 @@ hostingctl environment databases <environment-uuid> --company acme
|
|
|
639
650
|
hostingctl environment database create <environment-uuid> --company acme \
|
|
640
651
|
--key shop --engine mariadb --dry-run
|
|
641
652
|
hostingctl environment database bind <environment-uuid> <database-uuid> --company acme \
|
|
642
|
-
--bind <
|
|
653
|
+
--bind <application-uuid>[,<application-uuid>] --confirm
|
|
643
654
|
hostingctl environment database bind <environment-uuid> <database-uuid> --company acme --clear-bindings --confirm
|
|
644
655
|
hostingctl environment database review <environment-uuid> <database-uuid> --company acme
|
|
645
656
|
hostingctl environment database retire <environment-uuid> <database-uuid> --company acme --dry-run
|
|
@@ -750,26 +761,32 @@ One application's build, deployment, process runs, rename and removal:
|
|
|
750
761
|
|
|
751
762
|
```text
|
|
752
763
|
hostingctl application list <environment-uuid> --company acme
|
|
753
|
-
hostingctl application show <environment-uuid> <
|
|
754
|
-
hostingctl application deployment <environment-uuid> <
|
|
755
|
-
hostingctl application build <environment-uuid> <
|
|
756
|
-
hostingctl application
|
|
757
|
-
hostingctl application
|
|
758
|
-
hostingctl application
|
|
759
|
-
hostingctl application
|
|
760
|
-
hostingctl application
|
|
761
|
-
hostingctl application
|
|
762
|
-
hostingctl application
|
|
763
|
-
hostingctl application
|
|
764
|
+
hostingctl application show <environment-uuid> <application-uuid> --company acme
|
|
765
|
+
hostingctl application deployment <environment-uuid> <application-uuid> --company acme
|
|
766
|
+
hostingctl application build <environment-uuid> <application-uuid> --company acme --source <selection-uuid> --confirm
|
|
767
|
+
hostingctl application build <environment-uuid> <application-uuid> --company acme --wait --confirm
|
|
768
|
+
hostingctl application build-log <environment-uuid> <application-uuid> <build-uuid> --company acme
|
|
769
|
+
hostingctl application deploy <environment-uuid> <application-uuid> <release-uuid> --company acme --confirm
|
|
770
|
+
hostingctl application runs <environment-uuid> <application-uuid> --company acme
|
|
771
|
+
hostingctl application run-log <environment-uuid> <application-uuid> <run-name> --company acme
|
|
772
|
+
hostingctl application schedule-run <environment-uuid> <application-uuid> <schedule-key> --company acme --confirm
|
|
773
|
+
hostingctl application runtime <environment-uuid> <application-uuid> --company acme --mode stop --confirm
|
|
774
|
+
hostingctl application update <environment-uuid> <application-uuid> --company acme --label "Shop" --confirm
|
|
775
|
+
hostingctl application removal <environment-uuid> <application-uuid> --company acme
|
|
776
|
+
hostingctl application remove <environment-uuid> <application-uuid> --company acme --confirm
|
|
764
777
|
```
|
|
765
778
|
|
|
766
779
|
`deployment` reports the running, requested and interrupted builds and releases, the bound source and whether
|
|
767
780
|
a push would deploy. `build` queues a build of the application's applied configuration from exactly one of
|
|
768
781
|
`--source <selection-uuid>`, `--source-upload <upload-uuid>` or `--ssh-source <connection-uuid>` (or the
|
|
769
782
|
recorded binding when none is named), resolved to an exact commit or measured archive digest by the source
|
|
770
|
-
service rather than named here. `
|
|
771
|
-
|
|
772
|
-
|
|
783
|
+
service rather than named here. `build --wait` then follows the build's stages, deploys the release it made
|
|
784
|
+
once it succeeds and waits until it serves; a failed build exits 1 with the line it failed on first, which
|
|
785
|
+
`build-log` also leads with. `deploy` makes an
|
|
786
|
+
existing release the one the application runs. `runs` lists the application's schedules first — your own and
|
|
787
|
+
the platform's recipe crons (WordPress, Moodle) — with when each runs, whether it is paused, when it last succeeded
|
|
788
|
+
and what a run uses while it runs (a run takes no room between runs), then the process run history; `run-log` reads
|
|
789
|
+
one run's own output. Either may report `unavailable` when the cluster cannot answer rather than an empty body.
|
|
773
790
|
`schedule-run` runs a **declared** schedule once, now, beside the schedule's own runs; it does not execute an
|
|
774
791
|
arbitrary command, for which the API has no route. `update` renames the label only, never the immutable name.
|
|
775
792
|
`runtime` records one application's desired runtime from `--mode stop|start|restart`: it reads the
|
|
@@ -791,11 +808,11 @@ Both the Rust binary and the TypeScript CLI support these commands. All writes n
|
|
|
791
808
|
`--dry-run` sends nothing, and a dry-run upload does not open the file.
|
|
792
809
|
|
|
793
810
|
```text
|
|
794
|
-
hostingctl application source-upload <environment-uuid> <
|
|
795
|
-
hostingctl application source-uploads <environment-uuid> <
|
|
796
|
-
hostingctl application source-upload-show <environment-uuid> <
|
|
797
|
-
hostingctl application source-upload-discard <environment-uuid> <
|
|
798
|
-
hostingctl application build <environment-uuid> <
|
|
811
|
+
hostingctl application source-upload <environment-uuid> <application-uuid> --company acme --file project.zip --confirm
|
|
812
|
+
hostingctl application source-uploads <environment-uuid> <application-uuid> --company acme
|
|
813
|
+
hostingctl application source-upload-show <environment-uuid> <application-uuid> <upload-uuid> --company acme
|
|
814
|
+
hostingctl application source-upload-discard <environment-uuid> <application-uuid> <upload-uuid> --company acme --confirm
|
|
815
|
+
hostingctl application build <environment-uuid> <application-uuid> --company acme --source-upload <upload-uuid> --confirm
|
|
799
816
|
hostingctl application source-ssh-list --company acme
|
|
800
817
|
hostingctl application source-ssh-show <connection-uuid> --company acme
|
|
801
818
|
hostingctl application source-ssh-create --company acme --name Project \
|
|
@@ -806,8 +823,8 @@ hostingctl application source-ssh-verify <connection-uuid> --company acme --conf
|
|
|
806
823
|
hostingctl application source-ssh-update <connection-uuid> --company acme --ref v1.2.0 --ref-kind tag --confirm
|
|
807
824
|
hostingctl application source-ssh-rotate-key <connection-uuid> --company acme --confirm
|
|
808
825
|
hostingctl application source-ssh-revoke <connection-uuid> --company acme --confirm
|
|
809
|
-
hostingctl application source-bind <environment-uuid> <
|
|
810
|
-
hostingctl application build <environment-uuid> <
|
|
826
|
+
hostingctl application source-bind <environment-uuid> <application-uuid> --company acme --ssh-source <connection-uuid> --confirm
|
|
827
|
+
hostingctl application build <environment-uuid> <application-uuid> --company acme --ssh-source <connection-uuid> --confirm
|
|
811
828
|
```
|
|
812
829
|
|
|
813
830
|
An upload is staged and reviewed, not built or deployed. ZIP bytes are streamed with their original filename;
|
|
@@ -843,7 +860,8 @@ A `source` of `unavailable` means the platform could not read the retained histo
|
|
|
843
860
|
reader, an active ownership interval that cannot be proven, or a boundary failure for an authorized
|
|
844
861
|
resource. An out-of-company UUID is refused before reading history. Unavailable is not the empty
|
|
845
862
|
result of a successful read that matched nothing; the human output distinguishes these states. The
|
|
846
|
-
environment family reads
|
|
863
|
+
environment family reads your applications' own container output, and `--application <uuid>` narrows it
|
|
864
|
+
(and `logs live`) to one application; DNS reports zone-transfer initiation, not full
|
|
847
865
|
query history; and mail reports a Postfix delivery attempt, which is transport acceptance rather than
|
|
848
866
|
proof of mailbox receipt.
|
|
849
867
|
|