gohere 0.5.0 → 0.7.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
@@ -3,7 +3,7 @@
3
3
  Tiny local dev URL launcher for `.localhost` projects.
4
4
 
5
5
  ```text
6
- http://myproject.localhost
6
+ https://myproject.localhost
7
7
  ```
8
8
 
9
9
  Run `gohere` inside a package project, workspace root, or static folder. It starts or serves the project on a hidden local port, routes a clean `.localhost` hostname to it, and prints the URL.
@@ -34,13 +34,15 @@ Run the default command:
34
34
  gohere
35
35
  ```
36
36
 
37
- In a package project, this runs the nearest `package.json` `dev` script. In a workspace root, this discovers workspace packages from `pnpm-workspace.yaml` or `package.json` workspaces, starts each package with a `dev` script, and gives each package its own route:
37
+ In a package project, this runs the nearest `package.json` `dev` script. In a workspace root with child packages that have `dev` scripts, this starts each matching package and gives each package its own route:
38
38
 
39
39
  ```text
40
- gohere web -> http://web.myrepo.localhost
41
- gohere worker -> http://worker.myrepo.localhost
40
+ gohere web -> https://web.myrepo.localhost
41
+ gohere worker -> https://worker.myrepo.localhost
42
42
  ```
43
43
 
44
+ If workspace metadata exists but no child package has a `dev` script, `gohere` falls back to the current package's `dev` script. If there is no package script and the folder has `index.html`, `gohere` serves it as a static site.
45
+
44
46
  Run a named package script:
45
47
 
46
48
  ```bash
@@ -53,6 +55,14 @@ Run multiple server scripts:
53
55
  gohere dev:web dev:api
54
56
  ```
55
57
 
58
+ When one `gohere` run starts multiple services, each service can discover the others through env vars. For example, a web dev server can proxy API requests to a worker without hardcoding a port:
59
+
60
+ ```ts
61
+ target: process.env.GOHERE_WORKER_URL
62
+ ```
63
+
64
+ Use `GOHERE_<NAME>_URL` for app config. `GOHERE_<NAME>_PORT`, `GOHERE_<NAME>_TARGET`, and `GOHERE_SERVICES_JSON` are also available when multiple managed services start together. `PORT` and `TARGET` are advanced values and are only set when `gohere` controls that service port.
65
+
56
66
  Run any current package script exactly as written by naming it explicitly:
57
67
 
58
68
  ```bash
@@ -61,6 +71,19 @@ gohere build
61
71
  gohere preview
62
72
  ```
63
73
 
74
+ Run an explicit filesystem target:
75
+
76
+ ```bash
77
+ gohere ./dist
78
+ gohere ./apps/web
79
+ ```
80
+
81
+ Auto-refresh static pages while editing:
82
+
83
+ ```bash
84
+ gohere --live
85
+ ```
86
+
64
87
  Run a raw command:
65
88
 
66
89
  ```bash
@@ -79,23 +102,30 @@ Route to a known target port:
79
102
  gohere --target 5173 -- npm run dev
80
103
  ```
81
104
 
105
+ Use a custom port flag for tools that do not use `--port`:
106
+
107
+ ```bash
108
+ gohere --port-flag --local-port dev
109
+ ```
110
+
82
111
  Open the project URL in your browser:
83
112
 
84
113
  ```bash
85
114
  gohere --open
86
115
  ```
87
116
 
88
- For static folders, `gohere` serves `index.html`. You can also open a specific file, for example `gohere about.html`, which routes to `http://myproject.localhost/about.html`.
117
+ For static folders, `gohere` serves `index.html`. You can also open a specific file, for example `gohere about.html`, which routes to `https://myproject.localhost/about.html`.
89
118
 
90
119
  CSS, images, and scripts are served normally.
91
120
 
92
121
  ## Examples
93
122
 
94
123
  ```text
95
- myproject -> http://myproject.localhost
96
- @scope/web -> http://web.localhost
97
- repo/apps/web -> http://web.repo.localhost
98
- about.html -> http://myproject.localhost/about.html
124
+ myproject -> https://myproject.localhost
125
+ @scope/web -> https://web.localhost
126
+ ./apps/web -> https://web.repo.localhost
127
+ ./dist -> https://dist.localhost
128
+ about.html -> https://myproject.localhost/about.html
99
129
  ```
100
130
 
101
131
  ## Route management
@@ -103,7 +133,10 @@ about.html -> http://myproject.localhost/about.html
103
133
  ```bash
104
134
  gohere list
105
135
  gohere list --verbose
136
+ gohere list --json
106
137
  gohere stop
138
+ gohere stop web
139
+ gohere stop --all
107
140
  gohere prune
108
141
  gohere doctor
109
142
  gohere service stop
@@ -112,6 +145,10 @@ gohere uninstall
112
145
 
113
146
  `gohere list --verbose` shows host, target, status, PID, and working directory.
114
147
 
148
+ `gohere list --json` returns the same route information in a stable machine-readable format.
149
+
150
+ `gohere stop` stops routes for the current folder. `gohere stop <target>` stops a listed route by host, short host label, route name, or project name. `gohere stop --all` stops safely controllable routes and skips unverified live routes.
151
+
115
152
  Route status can be `ready`, `dead`, or `unknown`. `prune` removes only routes that are confidently dead.
116
153
 
117
154
  ## Service And Uninstall
@@ -133,35 +170,37 @@ npm uninstall -g gohere
133
170
 
134
171
  ## How it works
135
172
 
136
- `gohere` runs a local service on HTTP port `80`.
173
+ `gohere` runs one local service on HTTP port `80` and HTTPS port `443`.
137
174
 
138
175
  Each project gets a hidden local port. The service maps the clean `.localhost` hostname to that port using the request `Host` header.
139
176
 
177
+ First-time setup installs the local service in `~/.gohere/`, installs a local trusted certificate authority, and starts the service in the background. After that, `gohere` only starts your project and registers its route.
178
+
179
+ The service only serves local machine traffic. On macOS, gohere uses a port `80` listener that rejects non-loopback connections before requests reach the router.
180
+
140
181
  State is stored in:
141
182
 
142
183
  ```text
143
184
  ~/.gohere/
144
185
  ```
145
186
 
146
- On Linux/WSL, first-time setup may ask for permission so the service can bind to local port `80`.
147
-
148
- On Windows, first-time setup starts the local service directly on `127.0.0.1:80`.
187
+ Linux may ask for one-time permission to bind local ports and trust the local certificate authority.
149
188
 
150
189
  When used from WSL, `gohere` reuses a running Windows service automatically.
151
190
 
152
191
  ## Platform support
153
192
 
154
- Current target: Linux / WSL and Windows.
155
-
156
- Planned: macOS.
193
+ - Linux / WSL
194
+ - Windows
195
+ - macOS (experimental)
157
196
 
158
- The npm package currently targets Linux x64 and Windows x64.
197
+ The npm package includes x64 and arm64 binaries for these platforms.
159
198
 
160
199
  ## Limits
161
200
 
162
- - HTTP only
163
201
  - `.localhost` only
164
- - no HTTPS
202
+ - HTTPS uses a local trusted certificate authority
203
+ - HTTP remains available with `--http`
165
204
  - no LAN sharing
166
205
  - no custom TLDs
167
206
  - no project config files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gohere",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Tiny local dev URL launcher for .localhost projects.",
5
5
  "bin": {
6
6
  "gohere": "bin/gohere.js"
@@ -25,9 +25,11 @@
25
25
  ],
26
26
  "os": [
27
27
  "linux",
28
- "win32"
28
+ "win32",
29
+ "darwin"
29
30
  ],
30
31
  "cpu": [
31
- "x64"
32
+ "x64",
33
+ "arm64"
32
34
  ]
33
35
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file