| … | … | @@ -0,0 +1,53 @@ |
| 1 | # keet-cli |
| 2 | |
| 3 | Headless Keet P2P chat daemon + CLI client. Runs keet-core without a GUI, exposing the full Keet API over a Unix Domain Socket. |
| 4 | |
| 5 | **Pear Key**: `pear://remf9tr1z8mznij7j6ixwi178ofx85dzrbbbnpqkzt9x4d4kqr3y` |
| 6 | |
| 7 | ## Quick Start |
| 8 | |
| 9 | ```bash |
| 10 | # Run the daemon |
| 11 | bare index.js |
| 12 | |
| 13 | # Or via Pear |
| 14 | pear run pear://remf9tr1z8mznij7j6ixwi178ofx85dzrbbbnpqkzt9x4d4kqr3y |
| 15 | ``` |
| 16 | |
| 17 | The daemon listens on `/tmp/keet-daemon.sock` (UDS) with a framed-stream JSON-RPC protocol. |
| 18 | |
| 19 | ## Architecture |
| 20 | |
| 21 | ``` |
| 22 | keet-cli (this repo) |
| 23 | ├── index.js Entry point — starts keet-core + UDS server |
| 24 | ├── lib/ |
| 25 | │ ├── daemon.js Core daemon lifecycle |
| 26 | │ ├── routes.js ~90 RPC route wrappers |
| 27 | │ └── transport.js UDS + framed-stream protocol |
| 28 | └── node_modules/ |
| 29 | └── @holepunchto/keet-core-hyperdb The actual Keet engine |
| 30 | ``` |
| 31 | |
| 32 | ### Transport |
| 33 | |
| 34 | - **Protocol**: UDS (`/tmp/keet-daemon.sock`) with `bare-pipe` + `framed-stream` |
| 35 | - **Format**: Newline-delimited JSON (NDJSON) |
| 36 | - **Pattern**: `{ method, params, id }` request → `{ result, id }` response |
| 37 | |
| 38 | ## Deployment |
| 39 | |
| 40 | Deployed via pear-git CI pipeline. Push to trigger auto-deploy: |
| 41 | |
| 42 | ```bash |
| 43 | git commit -m "message" |
| 44 | git push origin master # auto-deploy fires → stage → release → seed |
| 45 | ``` |
| 46 | |
| 47 | ## P2P OTA Updates |
| 48 | |
| 49 | Includes `pear-runtime` for automatic P2P updates when running under Bare. |
| 50 | |
| 51 | ## License |
| 52 | |
| 53 | MIT |