drejx 0.2.0 → 0.2.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 +84 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# drejx
|
|
2
|
+
|
|
3
|
+
CLI for [drej](https://drej.dev) — start a local OpenSandbox server, manage sandbox snapshots, and add pre-built sandbox environments from the registry.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bunx drejx init
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
### `drejx init`
|
|
14
|
+
|
|
15
|
+
Starts an [OpenSandbox](https://open-sandbox.ai) server in Docker and writes config to `~/.config/drejx/server.toml` and `.drej/config.json`.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
drejx init
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
When using a server started this way, pass `useServerProxy: true` to `new Drej(...)` — sandbox containers run on Docker's bridge network and aren't reachable directly from the host.
|
|
22
|
+
|
|
23
|
+
### `drejx add <url>`
|
|
24
|
+
|
|
25
|
+
Fetches a sandbox spec from the registry, builds it, and checkpoints it locally.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
drejx add https://registry.drej.dev/python-data
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### `drejx list`
|
|
32
|
+
|
|
33
|
+
Lists locally managed sandboxes from `.drej/sandboxes.json`.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
drejx list
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### `drejx remove <name>`
|
|
40
|
+
|
|
41
|
+
Removes a sandbox entry from the local list.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
drejx remove python-data
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Manual server setup
|
|
50
|
+
|
|
51
|
+
If you prefer not to use Docker, run the server directly with `uvx`:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
uvx opensandbox-server
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
With `~/.sandbox.toml`:
|
|
58
|
+
|
|
59
|
+
```toml
|
|
60
|
+
[server]
|
|
61
|
+
host = "127.0.0.1"
|
|
62
|
+
port = 8080
|
|
63
|
+
|
|
64
|
+
[runtime]
|
|
65
|
+
type = "docker"
|
|
66
|
+
execd_image = "opensandbox/execd:v1.0.19"
|
|
67
|
+
|
|
68
|
+
[docker]
|
|
69
|
+
network_mode = "bridge"
|
|
70
|
+
|
|
71
|
+
[ingress]
|
|
72
|
+
mode = "direct"
|
|
73
|
+
|
|
74
|
+
[egress]
|
|
75
|
+
mode = "dns"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
With this setup, leave `useServerProxy` unset (defaults to `false`) — the server is on the host, so direct container IPs are reachable.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
Apache 2.0
|