dew 0.7.30 → 0.7.31
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 +166 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Dew
|
|
2
|
+
|
|
3
|
+
[](https://github.com/solcreek/dew/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/solcreek/dew/releases/latest)
|
|
5
|
+
[](https://www.npmjs.com/package/dew)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
Sandboxed Linux compute, agent-native and human-friendly.
|
|
9
|
+
|
|
10
|
+
Boot a real Linux environment locally. Drive it from a shell, a script,
|
|
11
|
+
or an agent.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
$ dew up
|
|
15
|
+
detected: vite (npm)
|
|
16
|
+
✓ http://localhost:5173
|
|
17
|
+
|
|
18
|
+
$ dew exec --json "go test ./..."
|
|
19
|
+
{"stdout":"PASS\nok ./...","exitCode":0}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# macOS / Linux
|
|
26
|
+
curl -fsSL https://dewvm.dev/install.sh | sh
|
|
27
|
+
|
|
28
|
+
# macOS Homebrew
|
|
29
|
+
brew install solcreek/tap/dew
|
|
30
|
+
|
|
31
|
+
# npm (all platforms)
|
|
32
|
+
npm install -g dew
|
|
33
|
+
|
|
34
|
+
# Windows (PowerShell)
|
|
35
|
+
irm https://github.com/solcreek/dew/releases/latest/download/install.ps1 | iex
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then try:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
dew run -- uname -a
|
|
42
|
+
# (first time: downloads kernel + minimal initramfs, ~15s; then boots a
|
|
43
|
+
# real Linux VM and prints its uname)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## What it does
|
|
47
|
+
|
|
48
|
+
### Dev environments
|
|
49
|
+
|
|
50
|
+
Auto-detects your project and starts a dev environment with hot reload.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd my-vite-app
|
|
54
|
+
dew up # detect, boot, install, start
|
|
55
|
+
dew up --with postgres,redis # dev with services
|
|
56
|
+
dew down # stop
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Supports: Vite, Next.js, Astro, Nuxt, SvelteKit, Django, Flask, FastAPI, static HTML.
|
|
60
|
+
|
|
61
|
+
### Share instantly
|
|
62
|
+
|
|
63
|
+
Temporary public HTTPS URL for any local port. Zero config, zero account.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
dew share 3000
|
|
67
|
+
✓ https://random-words.trycloudflare.com
|
|
68
|
+
Press Ctrl+C to stop
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Deploy to a VPS
|
|
72
|
+
|
|
73
|
+
Build locally, deploy to any VPS. No extra runtime on the server.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
dew build # package app (421KB tarball)
|
|
77
|
+
dew server create --provider hetzner # provision VPS ($5/mo)
|
|
78
|
+
dew deploy 5.161.53.168 # deploy with SSE progress
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The server runs `dew serve` (7.1MB Linux binary) — containerd for isolation, self-signed TLS, health checks.
|
|
82
|
+
|
|
83
|
+
## Agent integration
|
|
84
|
+
|
|
85
|
+
Every command supports `--json` for machine-readable output and `--dry-run` for validation without execution.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
dew up --dry-run --json
|
|
89
|
+
# {"type":"dry-run","framework":"vite","profile":"node",...}
|
|
90
|
+
|
|
91
|
+
dew deploy prod --dry-run
|
|
92
|
+
# Would deploy my-app.tar.gz to https://prod:9080
|
|
93
|
+
# No changes made.
|
|
94
|
+
|
|
95
|
+
dew run --json -- npm test
|
|
96
|
+
# {"exit_code":0,"stdout":"5 passing\n"}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Input hardening: rejects path traversal, query injection, control characters. `--events` for NDJSON lifecycle streaming.
|
|
100
|
+
|
|
101
|
+
## Architecture
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Local Linux server
|
|
105
|
+
───── ────────────
|
|
106
|
+
dew dew (deploy receiver)
|
|
107
|
+
├── dew up ├── HTTP deploy API
|
|
108
|
+
├── dew run ├── containers
|
|
109
|
+
├── dew exec ├── TLS
|
|
110
|
+
├── dew build ├── process management
|
|
111
|
+
├── dew deploy ──────────→ └── health check
|
|
112
|
+
└── Linux VM
|
|
113
|
+
└── containers inside
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Profiles
|
|
117
|
+
|
|
118
|
+
| Profile | Use case |
|
|
119
|
+
|---|---|
|
|
120
|
+
| minimal | Generic Linux shell, lightest footprint |
|
|
121
|
+
| node | Node.js / npm projects |
|
|
122
|
+
| python | Python projects |
|
|
123
|
+
| standard | Containers, services |
|
|
124
|
+
|
|
125
|
+
## Security
|
|
126
|
+
|
|
127
|
+
- Hardware-VM isolation. Network off until you flip `--network`. Input validated against path traversal, control characters, and injection.
|
|
128
|
+
|
|
129
|
+
## Full command reference
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
Dev:
|
|
133
|
+
dew up [dir] Start dev environment
|
|
134
|
+
dew up --with postgres,redis Dev with services
|
|
135
|
+
dew down Stop dev environment
|
|
136
|
+
|
|
137
|
+
Share:
|
|
138
|
+
dew share [port] Temporary public HTTPS URL
|
|
139
|
+
|
|
140
|
+
Deploy:
|
|
141
|
+
dew build [dir] Package app for deployment
|
|
142
|
+
dew deploy <target> Deploy to remote server
|
|
143
|
+
dew env ... Manage environment variables
|
|
144
|
+
dew auth ... Manage credentials
|
|
145
|
+
|
|
146
|
+
Infrastructure:
|
|
147
|
+
dew server create [--provider] Provision a VPS
|
|
148
|
+
dew server list List managed servers
|
|
149
|
+
dew server destroy <name> Remove a server
|
|
150
|
+
dew serve Run deploy receiver (VPS)
|
|
151
|
+
|
|
152
|
+
Advanced:
|
|
153
|
+
dew run [--] <cmd> Execute in ephemeral VM
|
|
154
|
+
dew exec <cmd> Execute in running VM
|
|
155
|
+
dew assets ... Manage VM images
|
|
156
|
+
dew update Update to latest version
|
|
157
|
+
|
|
158
|
+
Output:
|
|
159
|
+
--json Machine-readable JSON (all commands)
|
|
160
|
+
--events NDJSON lifecycle stream
|
|
161
|
+
--dry-run Validate without executing
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
MIT
|