shiplocal 0.1.0 → 0.1.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/README.md +114 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# ShipLocal CLI
|
|
2
|
+
|
|
3
|
+
> From localhost to client-ready.
|
|
4
|
+
|
|
5
|
+
Share your local dev server with clients via a public URL. Clients can leave visual feedback on the live preview.
|
|
6
|
+
|
|
7
|
+
**Dashboard:** https://app.shiplocal.cloud
|
|
8
|
+
**Website:** https://shiplocal.cloud
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g shiplocal
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Requires **Node.js 20+**.
|
|
17
|
+
|
|
18
|
+
## Quick start
|
|
19
|
+
|
|
20
|
+
### 1. Log in
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
export SHIPLOCAL_API_URL=https://shiplocal.cloud
|
|
24
|
+
shiplocal login
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Create an account at https://app.shiplocal.cloud if you don't have one.
|
|
28
|
+
|
|
29
|
+
### 2. Start your local app
|
|
30
|
+
|
|
31
|
+
Run your project locally (Next.js, Vite, Rails, etc.) on a port — for example **3000**:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm run dev
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 3. Open a tunnel
|
|
38
|
+
|
|
39
|
+
In a second terminal:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
export SHIPLOCAL_API_URL=https://shiplocal.cloud
|
|
43
|
+
shiplocal 3000
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
You'll get output like:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
🚀 ShipLocal running
|
|
50
|
+
|
|
51
|
+
Local: http://localhost:3000
|
|
52
|
+
Public: https://happy-lion.shiplocal.cloud
|
|
53
|
+
|
|
54
|
+
Share this with your client.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Share the **Public** URL with your client. Keep this terminal open while they view the preview.
|
|
58
|
+
|
|
59
|
+
### 4. Client feedback
|
|
60
|
+
|
|
61
|
+
Clients open the public URL, click **💬**, pick an element, and leave feedback. You see comments and screenshots on your [dashboard](https://app.shiplocal.cloud/dashboard).
|
|
62
|
+
|
|
63
|
+
## Commands
|
|
64
|
+
|
|
65
|
+
| Command | Description |
|
|
66
|
+
| ---------------------------------- | --------------------------------- |
|
|
67
|
+
| `shiplocal login` | Authenticate with ShipLocal Cloud |
|
|
68
|
+
| `shiplocal logout` | Remove saved credentials |
|
|
69
|
+
| `shiplocal 3000` | Tunnel local port 3000 |
|
|
70
|
+
| `shiplocal 3000 --password secret` | Password-protect the preview URL |
|
|
71
|
+
|
|
72
|
+
## Environment variables
|
|
73
|
+
|
|
74
|
+
| Variable | Default | Description |
|
|
75
|
+
| ------------------- | ----------------------- | ------------------------------------------------------------- |
|
|
76
|
+
| `SHIPLOCAL_API_URL` | `http://localhost:4000` | API server URL. Use `https://shiplocal.cloud` for production. |
|
|
77
|
+
| `SHIPLOCAL_TOKEN` | — | API token (alternative to `shiplocal login`) |
|
|
78
|
+
|
|
79
|
+
Credentials are saved to `~/.shiplocal/config.json`.
|
|
80
|
+
|
|
81
|
+
## Self-hosting
|
|
82
|
+
|
|
83
|
+
To run your own ShipLocal server instead of ShipLocal Cloud, point `SHIPLOCAL_API_URL` at your server:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
export SHIPLOCAL_API_URL=https://your-server.example.com
|
|
87
|
+
shiplocal login
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
See the [self-hosting guide](https://github.com/ship-local/shiplocal/blob/main/docs/self-hosting.md) in the main repo.
|
|
91
|
+
|
|
92
|
+
## Troubleshooting
|
|
93
|
+
|
|
94
|
+
**`command not found: shiplocal`**
|
|
95
|
+
Ensure npm global bin is on your PATH. Run `npm bin -g` and add that directory to your shell config.
|
|
96
|
+
|
|
97
|
+
**Blank page on public URL**
|
|
98
|
+
Make sure your local app is running on the port you passed to the CLI.
|
|
99
|
+
|
|
100
|
+
**`Not authenticated`**
|
|
101
|
+
Run `shiplocal login` first.
|
|
102
|
+
|
|
103
|
+
**Wrong server / login fails**
|
|
104
|
+
Check `SHIPLOCAL_API_URL` is set to `https://shiplocal.cloud` for production.
|
|
105
|
+
|
|
106
|
+
## Links
|
|
107
|
+
|
|
108
|
+
- [GitHub](https://github.com/ship-local/shiplocal)
|
|
109
|
+
- [Dashboard](https://app.shiplocal.cloud)
|
|
110
|
+
- [Issues](https://github.com/ship-local/shiplocal/issues)
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -4519,7 +4519,7 @@ function isLocalPortOpen(port, timeoutMs = 2e3) {
|
|
|
4519
4519
|
|
|
4520
4520
|
// src/index.ts
|
|
4521
4521
|
var program = new Command();
|
|
4522
|
-
program.name("shiplocal").description("Share localhost with clients in seconds").version("0.1.
|
|
4522
|
+
program.name("shiplocal").description("Share localhost with clients in seconds").version("0.1.1");
|
|
4523
4523
|
program.command("login").description("Authenticate with ShipLocal Cloud").action(async () => {
|
|
4524
4524
|
const rl = createInterface({ input, output });
|
|
4525
4525
|
const apiUrl = resolveApiUrl();
|