pockethost 4.1.0 → 4.2.1
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/CHANGELOG.md +23 -0
- package/README.md +54 -18
- package/dist/cli.js +7114 -6235
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Formerly published as `phio`. Versions below 3.0.0 are phio's history.
|
|
4
4
|
|
|
5
|
+
## 4.2.1
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- Removing a package (even the last one) now removes it from the instance. With a `package.json`, `deploy` and `dev`
|
|
10
|
+
tell PocketHost that the deploy owns `node_modules`, so whatever isn't shipped is cleaned up.
|
|
11
|
+
`--no-node-modules` still leaves the instance's `node_modules` alone.
|
|
12
|
+
|
|
13
|
+
## 4.2.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- Manage instances from the CLI, with the same token you deploy with: `show`, `power on|off`, `rename`, `version`,
|
|
18
|
+
`versions`, `domain set|clear`, `dev-mode`, `admin-sync`, `auto-vacuum`, `secrets list|set|unset`,
|
|
19
|
+
`webhooks list|add|rm`, `create` and `delete`. Settings that need the instance off take `--cycle` to power it off,
|
|
20
|
+
apply the change and power it back on. The token needs write access, and `create` needs a token for all instances.
|
|
21
|
+
- `deploy` and `dev` ship your production `node_modules` when `package.json` has `dependencies`: the packages in
|
|
22
|
+
`dependencies` and what they need, never `devDependencies`. Works with npm, pnpm, Bun and workspaces, and follows
|
|
23
|
+
symlinks so the instance gets plain files. `--no-node-modules` turns it off.
|
|
24
|
+
- `deploy --dry-run` lists what would be deployed, and `deploy --out <dir>` writes it to a local folder.
|
|
25
|
+
- Links to API tokens and SSH keys point at `pockethost.io/account/…` (the old `app.pockethost.io` links landed on the
|
|
26
|
+
home page).
|
|
27
|
+
|
|
5
28
|
## 4.1.0
|
|
6
29
|
|
|
7
30
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# pockethost: the PocketHost CLI
|
|
2
2
|
|
|
3
|
-
Deploy, sync,
|
|
3
|
+
Deploy, sync, tail logs and manage your [PocketHost](https://pockethost.io) instances.
|
|
4
4
|
|
|
5
5
|
Install globally (Node.js 20+):
|
|
6
6
|
|
|
@@ -37,6 +37,22 @@ pockethost upload <local> [remote]
|
|
|
37
37
|
pockethost rm <paths...>
|
|
38
38
|
pockethost sftp [instance] # shuts down Feb 6, 2027
|
|
39
39
|
pockethost logs [instance]
|
|
40
|
+
|
|
41
|
+
# Instances (same as the dashboard)
|
|
42
|
+
pockethost show [instance]
|
|
43
|
+
pockethost power on|off [instance]
|
|
44
|
+
pockethost rename <new-name> [instance]
|
|
45
|
+
pockethost version <version> [instance]
|
|
46
|
+
pockethost versions
|
|
47
|
+
pockethost domain set <host> [instance]
|
|
48
|
+
pockethost domain clear [instance]
|
|
49
|
+
pockethost dev-mode on|off [instance]
|
|
50
|
+
pockethost admin-sync on|off [instance]
|
|
51
|
+
pockethost auto-vacuum on|off [instance]
|
|
52
|
+
pockethost secrets list|set|unset
|
|
53
|
+
pockethost webhooks list|add|rm
|
|
54
|
+
pockethost create [name]
|
|
55
|
+
pockethost delete <instance>
|
|
40
56
|
```
|
|
41
57
|
|
|
42
58
|
- **`pockethost dev`**: watch local changes and deploy them
|
|
@@ -50,13 +66,29 @@ pockethost logs [instance]
|
|
|
50
66
|
- **`pockethost sftp`**: interactive SFTP session. SFTP shuts down on February 6, 2027
|
|
51
67
|
- **`pockethost logs`**: tail instance logs
|
|
52
68
|
|
|
53
|
-
`dev` and `deploy` accept `-v/--verbose`, `-i/--include`, `-e/--exclude`, and `--sftp` (sync
|
|
54
|
-
HTTPS). `deploy` also takes `--commit <sha
|
|
69
|
+
`dev` and `deploy` accept `-v/--verbose`, `-i/--include`, `-e/--exclude`, `--no-node-modules`, and `--sftp` (sync
|
|
70
|
+
over SFTP instead of HTTPS). `deploy` also takes `--commit <sha>`, `-m/--message <note>`, `--dry-run` (list what would
|
|
71
|
+
be deployed) and `--out <dir>` (write the deploy set to a local folder instead of deploying).
|
|
55
72
|
|
|
56
73
|
Default includes: `pb_*`, `package.json`, `bun.lock`, `bun.lockb`, `patches/**`.
|
|
57
74
|
|
|
58
75
|
Default excludes: `pb_data/**`.
|
|
59
76
|
|
|
77
|
+
## Managing instances
|
|
78
|
+
|
|
79
|
+
Everything the dashboard does to an instance has a command. They use the linked instance unless you name one
|
|
80
|
+
(`secrets` and `webhooks` take `-I <instance>`).
|
|
81
|
+
|
|
82
|
+
- **`show`**: power, URLs, domain, version, settings, secret names and webhooks (`--json` for scripts)
|
|
83
|
+
- **`power on|off`**: `off --wait` waits until the instance has stopped
|
|
84
|
+
- **`rename`**, **`version`**, **`domain set|clear`**, **`dev-mode`**, **`admin-sync`**, **`auto-vacuum`**: these need
|
|
85
|
+
the instance powered off. Add `--cycle` to power it off, apply the change and power it back on in one step
|
|
86
|
+
- **`secrets set KEY=value…`**: changes only the secrets you name. Give just `KEY` to type the value at a prompt so it
|
|
87
|
+
stays out of your shell history. `secrets list` shows names only, never values
|
|
88
|
+
- **`webhooks add <endpoint> "<cron>"`**, **`webhooks rm <endpoint>`**, **`webhooks list`**
|
|
89
|
+
- **`create [name]`**: a random available name if you don't give one. `--link` links this folder to it
|
|
90
|
+
- **`delete <instance>`**: the instance must be powered off. Asks you to type its name unless you pass `--yes`
|
|
91
|
+
|
|
60
92
|
## Configuration
|
|
61
93
|
|
|
62
94
|
Link a project directory to an instance:
|
|
@@ -85,11 +117,15 @@ Older project files (`.phioconfig`, `package.json` → `pockethost.instanceName`
|
|
|
85
117
|
3. Commit: the server swaps the file set in atomically (stopping the instance when anything outside `pb_public`
|
|
86
118
|
changes) and starts the instance again.
|
|
87
119
|
|
|
88
|
-
PocketHost doesn't
|
|
89
|
-
|
|
120
|
+
PocketHost doesn't run `npm install`. Instead, when your project has a `package.json`, the CLI ships your production
|
|
121
|
+
`node_modules` with the deploy: the packages in `dependencies` and everything they need, never `devDependencies`.
|
|
122
|
+
It works with npm, pnpm, Bun and workspaces, and follows symlinks, so the instance gets plain files. Install first
|
|
123
|
+
(`npm install` or similar), then deploy. The instance's `node_modules` ends up matching what you shipped, so packages
|
|
124
|
+
you remove (even the last one) are removed there too. `--no-node-modules` leaves the instance's `node_modules` alone.
|
|
90
125
|
|
|
91
|
-
Only `pb_*` folders (never `pb_data`), `package.json`, `bun.lock(b)
|
|
92
|
-
on the instance that aren't in your project are removed.
|
|
126
|
+
Only `pb_*` folders (never `pb_data`), `package.json`, `bun.lock(b)`, `patches/` and the production `node_modules` are
|
|
127
|
+
deployed. Files in those folders on the instance that aren't in your project are removed. `.git*` files are never
|
|
128
|
+
touched.
|
|
93
129
|
|
|
94
130
|
## Authentication
|
|
95
131
|
|
|
@@ -98,9 +134,9 @@ The CLI signs in with a personal access token (`ph_pat_…`) only. Every command
|
|
|
98
134
|
1. `POCKETHOST_TOKEN`
|
|
99
135
|
2. the token saved by `pockethost login` (or `pockethost token set`)
|
|
100
136
|
|
|
101
|
-
Create tokens under [Account → API Tokens](https://
|
|
102
|
-
you give it
|
|
103
|
-
was removed in 4.0.
|
|
137
|
+
Create tokens under [Account → API Tokens](https://pockethost.io/account/tokens). A token sees only the instances
|
|
138
|
+
you give it. `list`, `link`, `show` and `logs` work with any token. `deploy`, `dev` and the instance commands need
|
|
139
|
+
write access, and `create` needs a token for all instances. Email/password login was removed in 4.0.
|
|
104
140
|
|
|
105
141
|
Deploy from GitHub Actions:
|
|
106
142
|
|
|
@@ -117,7 +153,7 @@ Docs: https://pockethost.io/docs/deploy-from-ci
|
|
|
117
153
|
`pockethost dev --sftp`, `pockethost deploy --sftp` and `pockethost sftp` use **SFTP** (`ftp.pockethost.io:2222`)
|
|
118
154
|
with an Ed25519 key stored under `POCKETHOST_HOME` (default `~/.config/pockethost/`), created on first use. Tokens
|
|
119
155
|
can't add SSH keys, so add the public key (`pockethost_deploy_ed25519.pub`) under
|
|
120
|
-
[Account → Keys](https://
|
|
156
|
+
[Account → Keys](https://pockethost.io/account/keys) once; the CLI prints it if it's missing. Keys you registered
|
|
121
157
|
with an earlier version (`PocketHost CLI` or `Phio`) keep working. `pockethost info` shows whether the key is on your
|
|
122
158
|
account.
|
|
123
159
|
|
|
@@ -125,13 +161,13 @@ Customer docs: https://pockethost.io/docs/cli
|
|
|
125
161
|
|
|
126
162
|
## Environment variables
|
|
127
163
|
|
|
128
|
-
| Variable
|
|
129
|
-
|
|
|
130
|
-
| `POCKETHOST_TOKEN`
|
|
131
|
-
| `POCKETHOST_INSTANCE_NAME`
|
|
132
|
-
| `POCKETHOST_MOTHERSHIP_URL` | Override mothership API URL
|
|
133
|
-
| `POCKETHOST_HOME`
|
|
134
|
-
| `POCKETHOST_PROJECT_DIR`
|
|
164
|
+
| Variable | Purpose |
|
|
165
|
+
| --------------------------- | --------------------------------------------------- |
|
|
166
|
+
| `POCKETHOST_TOKEN` | Personal access token (CI); overrides the saved one |
|
|
167
|
+
| `POCKETHOST_INSTANCE_NAME` | Override linked instance name |
|
|
168
|
+
| `POCKETHOST_MOTHERSHIP_URL` | Override mothership API URL |
|
|
169
|
+
| `POCKETHOST_HOME` | Override config directory |
|
|
170
|
+
| `POCKETHOST_PROJECT_DIR` | Override project root detection |
|
|
135
171
|
|
|
136
172
|
Environment variables take precedence over `.pockethostconfig`. The old `PHIO_*` names still work (with a deprecation
|
|
137
173
|
warning) and will be removed in a future major version.
|