Configuration
Generated by setup.sh. Edit config.json for manual changes.
config.json
| nprHub.host | Bind address — :: (all), ::1 (localhost IPv6), 127.0.0.1 (IPv4) |
| nprHub.port | HTTP port — default 3000 |
| auth.token | API auth token — auto-generated, 48 chars hex |
| llama.endpoint | OpenAI-compatible API URL for local LLM |
| llama.model | Model name — e.g. qwen3.6:27 |
| slots[] | NPR slots — Noord, Oost, Zuid, West, Śūnyā |
| refreshMs | Status refresh interval — 3000ms |
Host Modes
:: | All interfaces, IPv6 |
::1 | Localhost IPv6 only |
0.0.0.0 | All interfaces, IPv4 |
Slots
| ● Noord | N — hex 0001 |
| ● Oost | E — hex 0002 |
| ● Zuid | S — hex 0003 |
| ● West | W — hex 0004 |
| ● Śūnyā | C — hex 0000 |
CLI Control REMOTE
Control the hub from any terminal. WebSocket for interactive, HTTP for one-shot.
WebSocket Terminal
Full interactive shell. Install wscat or use websockets Python.
$ npm install -g wscat
$ wscat -c ws://localhost:3000/terminal-ws \
-H "X-API-Key: YOUR_TOKEN"
connected (press CTRL+C to disconnect)
> slots
{ "slots": [...] }
> status
{ "status": "ok" }
HTTP Commands
One-shot queries via curl. All API routes require the token header.
$ curl http://localhost:3000/health
{"status":"ok","uptime":42}
$ curl -H "X-API-Key: TOKEN" http://localhost:3000/api/slots
{"slots":[{"id":0,"status":"idle"},...]}
$ curl -H "X-API-Key: TOKEN" http://localhost:3000/api/balans
{"balance":0.87,"center":0.42}
$ curl -X POST -H "X-API-Key: TOKEN" \
-H "Content-Type: application/json" \
-d '{"slot":0,"prompt":"scan north"}' \
http://localhost:3000/api/activate
$ curl -X POST -H "X-API-Key: TOKEN" \
-H "Content-Type: application/json" \
-d '{"slot":0}' \
http://localhost:3000/api/deactivate
Quick Aliases
Add to your .bashrc or .zshrc:
$ cat >> ~/.bashrc << 'EOF'
export NPR_TOKEN="YOUR_TOKEN"
export NPR_URL="http://localhost:3000"
npr-health() { curl -s $NPR_URL/health | jq .; }
npr-slots() { curl -s -H "X-API-Key: $NPR_TOKEN" $NPR_URL/api/slots | jq .; }
npr-balans() { curl -s -H "X-API-Key: $NPR_TOKEN" $NPR_URL/api/balans | jq .; }
npr-activate() { curl -s -X POST -H "X-API-Key: $NPR_TOKEN" -H "Content-Type: application/json" -d "{\"slot\":$1,\"prompt\":\"$2\"}" $NPR_URL/api/activate | jq .; }
EOF
$ source ~/.bashrc
API Reference
All authenticated routes require X-API-Key header.
GET/health— Status check (public)
GET/api/slots— Slot grid status
GET/api/balans— Signal balance
POST/api/activate— Activate slot + prompt
POST/api/deactivate— Deactivate slot
GET/api/sessions— Active sessions
GET/api/config— Current config
WS/terminal-ws— Interactive terminal
WS/dashboard-ws— Dashboard live updates
Auth
X-API-Key: your-token-here
GET /api/slots?token=your-token-here