@rsktash/beads-ui 0.1.2 → 0.1.4
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 +110 -0
- package/dist/assets/{index-BSNzF5KT.js → index-CeliZ293.js} +19 -19
- package/dist/index.html +1 -1
- package/package.json +3 -2
- package/server/cli/usage.js +18 -0
- package/server/dolt-pool.js +69 -13
package/README.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# beads-ui
|
|
2
|
+
|
|
3
|
+
Web UI for [Beads](https://github.com/rsktash/beads) workspaces.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @rsktash/beads-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd /path/to/your/beads-workspace
|
|
15
|
+
bd-ui start
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Commands
|
|
19
|
+
|
|
20
|
+
| Command | Description |
|
|
21
|
+
|-----------|--------------------------|
|
|
22
|
+
| `start` | Start the UI server |
|
|
23
|
+
| `stop` | Stop the UI server |
|
|
24
|
+
| `restart` | Restart the UI server |
|
|
25
|
+
|
|
26
|
+
### Options
|
|
27
|
+
|
|
28
|
+
| Flag | Description | Default |
|
|
29
|
+
|------------------|-----------------------------------------|-------------|
|
|
30
|
+
| `-h, --help` | Show help message | |
|
|
31
|
+
| `-v, --version` | Show version | |
|
|
32
|
+
| `-d, --debug` | Enable debug logging | |
|
|
33
|
+
| `--open` | Open browser after start | |
|
|
34
|
+
| `--host <addr>` | Bind address | `127.0.0.1` |
|
|
35
|
+
| `--port <num>` | Bind port | `3333` |
|
|
36
|
+
|
|
37
|
+
## Environment Variables
|
|
38
|
+
|
|
39
|
+
| Variable | Description | Default |
|
|
40
|
+
|---------------------------------|----------------------------------------------|-------------|
|
|
41
|
+
| `PORT` | Server port | `3333` |
|
|
42
|
+
| `HOST` | Bind address | `127.0.0.1` |
|
|
43
|
+
| `BEADS_DOLT_PASSWORD` | Password for remote Dolt server connection | |
|
|
44
|
+
| `VITE_FILE_ATTACHMENT_BASE_URL` | Base URL for resolving `attach://` URIs | |
|
|
45
|
+
|
|
46
|
+
## Dolt Database Modes
|
|
47
|
+
|
|
48
|
+
beads-ui supports two Dolt connection modes, configured via `.beads/metadata.json`:
|
|
49
|
+
|
|
50
|
+
### Embedded (default)
|
|
51
|
+
|
|
52
|
+
Spawns a local `dolt sql-server` from `.beads/embeddeddolt/`. No extra configuration needed.
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"backend": "dolt",
|
|
57
|
+
"dolt_database": "mydb"
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Remote Server
|
|
62
|
+
|
|
63
|
+
Connects to an external Dolt server. Set `dolt_mode` to `"server"` in metadata.json:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"backend": "dolt",
|
|
68
|
+
"dolt_mode": "server",
|
|
69
|
+
"dolt_server_host": "127.0.0.1",
|
|
70
|
+
"dolt_server_port": 3308,
|
|
71
|
+
"dolt_server_user": "root",
|
|
72
|
+
"dolt_database": "yuklar"
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Password is read from the `BEADS_DOLT_PASSWORD` environment variable:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
BEADS_DOLT_PASSWORD=secret bd-ui start
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Attachments
|
|
83
|
+
|
|
84
|
+
Markdown content supports a custom `attach://` URI scheme for portable file references. Instead of hardcoding full URLs, store references like:
|
|
85
|
+
|
|
86
|
+
```md
|
|
87
|
+

|
|
88
|
+
[Log file](attach://bead-42/log.txt)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
At render time, `attach://` URIs are resolved against `VITE_FILE_ATTACHMENT_BASE_URL`:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
VITE_FILE_ATTACHMENT_BASE_URL=https://files.example.com/attachments bd-ui start
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The above markdown resolves to:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
https://files.example.com/attachments/bead-42/screenshot.png
|
|
101
|
+
https://files.example.com/attachments/bead-42/log.txt
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Normal `http(s)://` URLs in markdown are rendered as-is.
|
|
105
|
+
|
|
106
|
+
This keeps bead content portable across environments (local dev, staging, production) without rewriting markdown.
|
|
107
|
+
|
|
108
|
+
## License
|
|
109
|
+
|
|
110
|
+
MIT
|