broodlink 0.1.2

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/INSTALL.md ADDED
@@ -0,0 +1,186 @@
1
+ # Installing BroodLink
2
+
3
+ ## Prerequisites
4
+
5
+ - **Node.js ≥ 22** ([download](https://nodejs.org/))
6
+
7
+ ---
8
+
9
+ ## Option 1: Install from GitHub (Recommended)
10
+
11
+ Install globally directly from the repo — no clone needed:
12
+
13
+ ```bash
14
+ npm install -g git+ssh://git@github.com:gNerdLabs/BroodLink.git
15
+ ```
16
+
17
+ Or via HTTPS:
18
+
19
+ ```bash
20
+ npm install -g git+https://github.com/gNerdLabs/BroodLink.git
21
+ ```
22
+
23
+ Then run from anywhere:
24
+
25
+ ```bash
26
+ broodlink
27
+ ```
28
+
29
+ ---
30
+
31
+ ## Option 2: Clone and Install
32
+
33
+ ```bash
34
+ git clone git@github.com:gNerdLabs/BroodLink.git
35
+ cd BroodLink
36
+ npm install
37
+ npm run build
38
+ npm install -g .
39
+ ```
40
+
41
+ Then run from anywhere:
42
+
43
+ ```bash
44
+ broodlink
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Option 3: Run from Source (Development)
50
+
51
+ ```bash
52
+ git clone git@github.com:gNerdLabs/BroodLink.git
53
+ cd BroodLink
54
+ npm install
55
+ npm run dev
56
+ ```
57
+
58
+ For development, you can also use `npm link` to create a global `broodlink` command that points to your local source:
59
+
60
+ ```bash
61
+ npm run build
62
+ npm link
63
+ ```
64
+
65
+ Changes to source require `npm run build` (or use `npm run dev` which runs TypeScript directly).
66
+
67
+ ---
68
+
69
+ ## Data Directory
70
+
71
+ On first run, BroodLink creates `~/.broodlink/` with:
72
+
73
+ ```
74
+ ~/.broodlink/
75
+ ├── broodlink.json # Server configuration
76
+ ├── broodlink.db # SQLite database (agents, rooms, messages)
77
+ └── docs/
78
+ ├── CONSTITUTION.md # Your linkspace rules (editable)
79
+ └── CONTROLLER.md # Controller directive (editable)
80
+ ```
81
+
82
+ ### Overriding the Data Directory
83
+
84
+ ```bash
85
+ # Via CLI flag
86
+ broodlink --data-dir /path/to/custom/dir
87
+
88
+ # Via environment variable
89
+ export BROODLINK_DATA_DIR=/path/to/custom/dir
90
+ broodlink
91
+ ```
92
+
93
+ ---
94
+
95
+ ## First Run
96
+
97
+ BroodLink will:
98
+
99
+ 1. Create `~/.broodlink/` and its contents
100
+ 2. Generate a **controller API key** — save it, it won't be shown again
101
+ 3. Start listening on `ws://0.0.0.0:18800`
102
+
103
+ ```
104
+ 🤖 BroodLink v0.1.0
105
+
106
+ Created data directory: /home/user/.broodlink
107
+ Created broodlink.json with defaults.
108
+
109
+ ╔═══════════════════════════════════════════════════════════════╗
110
+ ║ Controller API Key (save this — it won't be shown again!): ║
111
+ ║ bl_k_ctrl_a1b2c3d4e5f6... ║
112
+ ╠═══════════════════════════════════════════════════════════════╣
113
+ ║ This key has full admin access. ║
114
+ ║ Use it to generate participant keys via agent.invite. ║
115
+ ╚═══════════════════════════════════════════════════════════════╝
116
+
117
+ Data dir: /home/user/.broodlink
118
+ Database: /home/user/.broodlink/broodlink.db
119
+ Listening on ws://0.0.0.0:18800
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Running in Production (Linux)
125
+
126
+ ### systemd Service
127
+
128
+ Create `/etc/systemd/system/broodlink.service`:
129
+
130
+ ```ini
131
+ [Unit]
132
+ Description=BroodLink Server
133
+ After=network.target
134
+
135
+ [Service]
136
+ Type=simple
137
+ User=broodlink
138
+ ExecStart=/usr/bin/broodlink
139
+ Restart=always
140
+ RestartSec=3
141
+
142
+ [Install]
143
+ WantedBy=multi-user.target
144
+ ```
145
+
146
+ ```bash
147
+ sudo systemctl daemon-reload
148
+ sudo systemctl enable --now broodlink
149
+
150
+ # Manage
151
+ sudo systemctl restart broodlink
152
+ journalctl -u broodlink -f
153
+ ```
154
+
155
+ ### TLS / Secure Transport
156
+
157
+ BroodLink uses plain `ws://` by default. For production, deploy behind a TLS-terminating reverse proxy. See [docs/TLS_DEPLOYMENT.md](docs/TLS_DEPLOYMENT.md) for Caddy, nginx, and Tailscale configurations.
158
+
159
+ ---
160
+
161
+ ## Updating
162
+
163
+ ```bash
164
+ broodlink update
165
+ ```
166
+
167
+ This pulls the latest version from GitHub and reinstalls globally. Restart the server afterward.
168
+
169
+ If you don't have SSH keys set up for GitHub, use HTTPS:
170
+
171
+ ```bash
172
+ broodlink update --https
173
+ ```
174
+
175
+ Your data in `~/.broodlink/` is preserved across updates.
176
+
177
+ ---
178
+
179
+ ## Uninstalling
180
+
181
+ ```bash
182
+ npm uninstall -g broodlink
183
+
184
+ # Optionally remove data
185
+ rm -rf ~/.broodlink
186
+ ```