nirc-rs/quickstart.md

103 lines
1.8 KiB
Markdown
Executable File

# Quickstart
## Prerequisites
- **Rust** 1.75 or newer: [rustup.rs](https://rustup.rs/)
- **C compiler** (gcc, clang, or musl-gcc) — needed for `sha2`, `ring`, etc.
- **A terminal emulator** that supports 256-color and Unicode
## Install
```bash
git clone https://git.dcos.net/dcosnet/nirc-rs.git
cd nirc-rs
cargo build --release
# Binary: target/release/nirc-rs
```
Or use the build script:
```bash
./build.sh release
```
## First Run
No config is required to start. On first launch, nirc-rs creates
`~/.nirc/config.toml` with example server entries:
```bash
./target/release/nirc-rs
```
## Connect to IRC
1. Edit `~/.nirc/config.toml` and add:
```toml
[[servers]]
name = "libera"
protocol = "irc"
address = "irc.libera.chat:6697"
tls = true
nick = "your_nick"
```
2. Start nirc-rs and connect:
```
/connect libera
/join #nirc
```
## Connect to Matrix
```toml
[[servers]]
name = "matrix"
protocol = "matrix"
address = "https://matrix.org"
user_id = "@you:matrix.org"
[servers.extra]
password = "your_password"
```
## Connect to Discord (bot)
```toml
[[servers]]
name = "mybot"
protocol = "discord"
address = "https://discord.com/api"
bot_token = "BOT_TOKEN_HERE"
```
## Connect to BitChat (P2P)
```toml
[[servers]]
name = "p2p"
protocol = "bitchat"
address = "/ip4/0.0.0.0/tcp/9394"
[servers.extra]
nickname = "handle"
# Optional: bootstrap to a known peer
# bootstrap = "/ip4/1.2.3.4/tcp/9394/p2p/QmPeerId"
```
## Key Bindings
| Key | Action |
|------------|--------------------|
| `Ctrl+N` | Next window |
| `Ctrl+P` | Previous window |
| `Alt+1-9` | Switch to window 1-9 |
| `PgUp/Dn` | Scroll chat |
| `Tab` | Nickname complete |
| `/` | Command mode |
## Next Steps
- Add more servers to `config.toml`
- Explore `/help` for the full command list
- Press `Ctrl+^` to toggle the debug console overlay