@hamedb89/localghost 0.1.13 → 0.1.15

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/docs/flows.md CHANGED
@@ -120,7 +120,9 @@ The plugin defaults to HTTP. Pass `https: true` only when Vite is expected to si
120
120
 
121
121
  If `.localghost` is missing, an interactive development run asks whether to create it, asks for the primary `.localhost` domain, allows extra domains, explains the `/etc/hosts` password prompt, and runs setup when confirmed. Non-interactive runs fail with the exact setup command instead of guessing.
122
122
 
123
- ## Ghost Tunnel
123
+ ## Ghost Tunnel (Experimental)
124
+
125
+ Ghost Tunnel is an experimental opt-in feature. Its configuration, transports, CLI behavior, and public APIs may change between releases and should not be used for production-critical access.
124
126
 
125
127
  As a production app, I want one opt-in flag that makes `<route>-<project>-<owner>.ghost.<domain>` a known product entrypoint on top of the deployed Vite app, without running local Caddy or requiring the local `.localghost` file.
126
128
 
@@ -1,4 +1,7 @@
1
- # Ghost Tunnel
1
+ # Ghost Tunnel (Experimental)
2
+
3
+ > [!WARNING]
4
+ > Ghost Tunnel is experimental. Its configuration, transport protocol, CLI behavior, and public APIs may change between releases. Do not rely on it for production-critical access. Review authentication, exposed routes, Redis credentials, and network reachability before sharing a tunnel.
2
5
 
3
6
  Ghost Tunnel is the production-facing Localghost entrypoint for apps that want a stable wildcard route on top of their existing Vite product:
4
7
 
@@ -16,14 +16,16 @@ localghost reset [--project name]
16
16
  localghost teardown [--project name] [--remove-caddyfile]
17
17
  localghost status [--ready] [--json]
18
18
  localghost ps [--json]
19
+ localghost guide [--agent] [--json]
19
20
  localghost tunnel [--cwd path] [--config file] [--config-pattern regex] [--ghost-config file] [--target-host host]
21
+ localghost release <patch|minor|major>
20
22
  localghost update [--json]
21
23
  localghost dev [--config file] [--config-pattern regex] [--https|--ssl] [--auto-repair yes|no] [--trust]
22
24
  localghost run [--config file] [--config-pattern regex] [--https|--ssl] [--auto-repair yes|no] [--trust] [--dynamic-port] -- command
23
25
  localghost print [--config file] [--config-pattern regex]
24
26
  ```
25
27
 
26
- With no subcommand, Localghost detects npm, pnpm, Yarn, or Bun from `packageManager` or a lockfile, prefers a non-recursive `dev:raw` script, falls back to `dev`, and runs the result through the normal Caddy lifecycle. `--dry-run` prints the detected command without checking or changing machine setup. Set `command: ["<package-manager>", "dev:web"]` in `localghost.config.mjs` when inference should be explicit.
28
+ With no subcommand, Localghost detects npm, pnpm, Yarn, or Bun from `packageManager` or a lockfile, prefers a non-recursive `dev:raw` script, falls back to `dev`, and runs the result through the normal Caddy lifecycle. Supported runtime flags such as `--https`, `--clean-caddy`, `--auto-repair`, and `--dynamic-port` are forwarded to that lifecycle. `--dry-run` prints the detected command without checking or changing machine setup. Set `command: ["<package-manager>", "dev:web"]` in `localghost.config.mjs` when inference should be explicit.
27
29
 
28
30
  For multiple independently started applications, configure `services` in `localghost.config.mjs`. Each service declares a unique name and host plus its project-relative working directory, requested port, and optional command. Bare `localghost` starts one Caddy process and all service commands, passes service-specific `LOCALGHOST_PORT`, `VITE_PORT`, and `LOCALGHOST_SERVICE` variables, and stops the group when any process exits.
29
31
 
@@ -136,7 +138,20 @@ localghost ps
136
138
  localghost ps --json
137
139
  ```
138
140
 
139
- ### tunnel
141
+ ### guide
142
+
143
+ Prints the recommended repository integration and command workflow. Use `--agent` for the coding-agent-oriented guide and `--json` for machine-readable integration hints.
144
+
145
+ ```sh
146
+ localghost guide --agent
147
+ localghost guide --agent --json
148
+ ```
149
+
150
+ Localghost stores remembered project and instance port assignments in `~/.localghost`. Only Localghost-managed processes are represented there; unrelated processes are still checked by the operating system when a port is selected.
151
+
152
+ ### tunnel (experimental)
153
+
154
+ Ghost Tunnel is experimental. Its configuration, transport protocol, CLI behavior, and public APIs may change between releases; do not rely on it for production-critical access.
140
155
 
141
156
  Runs the local Ghost Tunnel agent for `ghostTunnel.transport: "tunnel"`. The command reads the Localghost project config, reads exact public hosts from `.ghosttunnel`, sends route heartbeats to the configured Redis REST store, polls for queued requests, and serves them from the matching local port.
142
157
 
@@ -154,6 +169,18 @@ Checks npm for a newer Localghost release. Pass `--json` for scripts and agents.
154
169
  localghost update
155
170
  ```
156
171
 
172
+ ### release
173
+
174
+ Dispatches the repository's guarded GitHub Actions release pipeline from `main`. The command requires an installed and authenticated GitHub CLI.
175
+
176
+ ```sh
177
+ localghost release patch
178
+ localghost release minor
179
+ localghost release major
180
+ ```
181
+
182
+ The pipeline synchronizes version metadata, runs package and runtime verification, creates the version commit and tag, publishes npm with provenance, and creates generated GitHub release notes.
183
+
157
184
  ### routes
158
185
 
159
186
  Prints the local domain layer as `domain -> upstream` routes. HTTP is the default. Pass `--https` or `--ssl` if the browser-facing domain should be shown as HTTPS.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hamedb89/localghost",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "description": "Friendly local hostnames for app repos with .localghost, Caddy, /etc/hosts, and Vite.",
5
5
  "type": "module",
6
6
  "bin": {