engawa-chat 0.1.1

A peer-to-peer chat lobby for editors and browsers
engawa-chat-0.1.1 is not a library.

Drop into a public chat room from your editor or browser. Everyone shares a lobby, but nobody needs to host it. The engawa binary runs a peer while you're using it; the browser dashboard and Neovim plugin are two ways to talk to that peer.

Get started

Install engawa-chat with Cargo, then open the dashboard:

cargo install --locked engawa-chat
engawa web

Select a room in the dashboard, or create one and choose whether it keeps history. Stop the process with Ctrl-C. The browser UI runs on your own machine, not on a hosted website. For Neovim, see engawa.nvim.

What survives when everyone leaves?

Built-in rooms always appear in the lobby. Other rooms are announced by their participants. An activity indicator means a peer was seen recently, not that an exact number of people are online.

  • Live only: The client keeps messages in memory while you're in the room and discards them when you leave.
  • With history: Each peer keeps up to 200 posts per room from the last seven days in a local SQLite database. Returning peers exchange history. A newcomer can't fetch a conversation from a peer that's offline. Data that expires while the app is closed is pruned when it runs again.

The history policy is part of the room ID. Two rooms can share a display name without sharing messages. Withdrawing your own post sends a signed removal notice; it can't erase screenshots, backups, or copies kept by other clients.

The default profile lives under engawa in your OS's local application data directory. Use engawa --data-dir <directory> web or set ENGAWA_DATA_DIR to choose another profile. Use separate directories for independent peers.

Network and privacy

Engawa discovers lobby peers through the Mainline DHT with distributed-topic-tracker, connects over iroh, and uses iroh-gossip for room announcements and messages. Chat logs are not published to the DHT. Networks that block UDP may prevent public peer discovery.

No account or real name is required. Rooms are public: participants can read and record their contents. Encrypted transport does not hide your IP address from a direct peer, and the local database is not encrypted.

Connect another editor

Start engawa serve --stdio as a child process. Read one line of JSON from stdout: {"url":"http://127.0.0.1:<port>","token":"…"}. Keep stdin open for the session; closing it stops the child. The API listens only on a randomly assigned loopback port. Send Authorization: Bearer <token> with each request.

Method Path Request or response
GET /api/state Poll for rooms, room (current ID or null), messages, and status.
POST /api/rooms {"name":"Tea room","history":true} — create and enter.
POST /api/join {"id":"<room id>"}
POST /api/leave {}
POST /api/send {"text":"Hello"}
POST /api/retract {"id":"<your message id>"}

Use Content-Type: application/json for POST requests. A successful action returns 204 No Content; it is not a delivery receipt.

Run the checks

cargo test --bin engawa
cargo build --bin engawa
python tests/peers.py target/debug/engawa

On Windows, pass target/debug/engawa.exe. The integration test uses temporary profiles and ephemeral ports, without posting to the public lobby. Leave ENGAWA_PEER unset for normal discovery, set it to an empty string for a loopback seed, or set it to <endpoint-id>@127.0.0.1:<port> to connect to that seed.