@hamedb89/localghost 0.1.13 → 0.2.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
@@ -79,6 +79,8 @@ Localghost detects the package manager, prefers a non-recursive `dev:raw` script
79
79
  npm exec localghost -- --dry-run
80
80
  ```
81
81
 
82
+ Supported runtime flags such as `--https`, `--clean-caddy`, `--auto-repair`, and `--dynamic-port` are forwarded by the bare command to the underlying run lifecycle.
83
+
82
84
  Create the repo-local hostname contract:
83
85
 
84
86
  ```sh
@@ -91,6 +93,8 @@ Check whether the machine is ready:
91
93
  localghost doctor
92
94
  ```
93
95
 
96
+ Doctor also reports occupied configured ports, stale registry leases, and port allocations shared by multiple Localghost instances. Use `--json` for agent-readable output.
97
+
94
98
  Prepare `/etc/hosts` and the local Caddyfile:
95
99
 
96
100
  ```sh
@@ -109,6 +113,14 @@ Repair stale hosts, Caddy configuration, or setup state:
109
113
  localghost repair
110
114
  ```
111
115
 
116
+ If an existing project port is occupied or was allocated incorrectly, ask Localghost to choose and remember the next available port:
117
+
118
+ ```sh
119
+ localghost repair --reallocate-port
120
+ ```
121
+
122
+ This does not edit `.localghost`; it records a stable runtime allocation in `~/.localghost` and regenerates the managed hosts and Caddy state from that allocation. To remove expired or dead leases as part of the repair, add `--prune-registry`.
123
+
112
124
  Run only the local proxy:
113
125
 
114
126
  ```sh
@@ -140,6 +152,15 @@ localghost ps
140
152
  localghost ps --json
141
153
  ```
142
154
 
155
+ Give coding agents the supported workflow and repository conventions:
156
+
157
+ ```sh
158
+ localghost guide --agent
159
+ localghost guide --agent --json
160
+ ```
161
+
162
+ Localghost remembers project and instance port assignments in user-level state under `~/.localghost`. The registry is used only for Localghost-managed processes; the operating-system port check remains authoritative for unrelated processes.
163
+
143
164
  Check for updates:
144
165
 
145
166
  ```sh
@@ -417,7 +438,10 @@ export default defineLocalghostConfig({
417
438
  });
418
439
  ```
419
440
 
420
- ### Public Ghost Tunnel
441
+ ### Public Ghost Tunnel (Experimental)
442
+
443
+ > [!WARNING]
444
+ > Ghost Tunnel is experimental. Its configuration, transport protocol, and public APIs may change between releases. Do not rely on it for production-critical access, and review its authentication and network exposure before sharing a tunnel.
421
445
 
422
446
  `ghostTunnel` is an opt-in production URL shape for deployed wildcard endpoints. It does not change local Caddy or `/etc/hosts` setup.
423
447
 
@@ -570,15 +594,16 @@ The app bundle is written to `dist/LocalghostWidget.app`.
570
594
  ```sh
571
595
  localghost [--cwd path] [--dry-run]
572
596
  localghost init [--write-scripts] [--config file] [--host host] [--port port]
573
- localghost doctor
597
+ localghost doctor [--cwd path] [--config file] [--config-pattern regex] [--json]
574
598
  localghost setup [--project name] [--config file] [--config-pattern regex] [--https|--ssl]
575
- localghost repair [--project name] [--config file] [--config-pattern regex] [--https|--ssl] [--trust]
599
+ localghost repair [--project name] [--config file] [--config-pattern regex] [--https|--ssl] [--trust] [--reallocate-port] [--prune-registry]
576
600
  localghost trust [--project name] [--config file] [--config-pattern regex] [--https|--ssl]
577
601
  localghost reset [--project name]
578
602
  localghost teardown [--project name] [--remove-caddyfile]
579
603
  localghost status [--ready] [--json]
580
604
  localghost ps [--json]
581
605
  localghost update [--json]
606
+ localghost release <patch|minor|major>
582
607
  localghost dev [--config file] [--config-pattern regex] [--https|--ssl] [--auto-repair yes|no] [--trust]
583
608
  localghost run [--config file] [--config-pattern regex] [--https|--ssl] [--auto-repair yes|no] [--trust] [--dynamic-port] -- command
584
609
  localghost routes [--https|--ssl]
@@ -614,6 +639,7 @@ import { localGhostPlugin } from "@hamedb89/localghost/vite";
614
639
  - GitHub Pages is deployed by Actions from the checked-in `site/`, `docs/`, and `assets/` sources.
615
640
  - Preview the exact Pages artifact locally with `npm run site:serve`, then open `http://127.0.0.1:4173/`.
616
641
  - npm publish is guarded by `prepublishOnly` and the release workflow publishes with npm provenance.
642
+ - To release the CLI, run `localghost release patch`, `localghost release minor`, or `localghost release major`. The command dispatches the **Release** workflow from `main`; it synchronizes version metadata, verifies the package and runtime matrix, commits and tags the bump, publishes npm, and creates a GitHub Release with generated notes. GitHub CLI must be installed and authenticated.
617
643
  - Runtime dependencies are intentionally small: `commander` and `execa`. Vite is an optional peer dependency.
618
644
  - No postinstall scripts, hidden Homebrew installs, surprise browser tabs, or broad hosts-file rewrites.
619
645
  - Update checks are best-effort, cached for 24 hours, and can be disabled with `LOCALGHOST_NO_UPDATE_CHECK=1` or `--no-update-check`.
@@ -624,7 +650,7 @@ import { localGhostPlugin } from "@hamedb89/localghost/vite";
624
650
  - [Rendered docs](https://hamedb89.github.io/localghost/docs/)
625
651
  - [User flows](./docs/flows.md)
626
652
  - [CLI reference](./docs/localghost.1.md)
627
- - [Ghost Tunnel guide](./docs/ghost-tunnel.md)
653
+ - [Ghost Tunnel guide (experimental)](./docs/ghost-tunnel.md)
628
654
  - [macOS widget notes](./docs/macos-widget.md)
629
655
  - [Brand guidelines](./docs/brand.md)
630
656