4 releases
Uses new Rust 2024
| new 0.2.1 | Feb 13, 2026 |
|---|---|
| 0.2.0 | Feb 12, 2026 |
| 0.1.1 | Feb 10, 2026 |
| 0.1.0 | Feb 10, 2026 |
#4 in #ephemeral
72KB
1.5K
SLoC
opencord
Ephemeral chat servers that shut themselves down. Spin one up, share the invite link, chat, and it disappears.
Install
cargo install opencord
Or build from source:
git clone https://github.com/mcncl/opencord.git
cd opencord
cargo build --release
Usage
Start a server
cargo run --bin server -- --lifetime 2h
Output:
Listening on 127.0.0.1:8080 (lifetime: 120 minute(s))
Access code: XK7N4P
Invite link: ws://127.0.0.1:8080/?code=XK7N4P
Connect
Share the invite link. Each person connects with:
cargo run --bin client -- <name> <invite_link>
cargo run --bin client -- Alice ws://127.0.0.1:8080/?code=XK7N4P
Commands
| Command | Description |
|---|---|
/extend <duration> |
Extend server lifetime (host only). e.g. /extend 30m, /extend 1h |
/help |
Show available commands |
How it works
- The first person to join is the host
- The server shuts down when: the lifetime expires, the host disconnects, or all clients leave
- Warnings are broadcast as the deadline approaches (10m, 5m, 1m, 30s)
- The host can extend the lifetime with
/extend - Access codes prevent uninvited connections
License
Dependencies
~8–11MB
~195K SLoC