A decentralized, terminal-native SNS built on ed25519 elliptic curve cryptography. Every post is signed, every identity is your key โ zero passwords, zero gatekeepers.
No browser bloat. Everything from posting to DMing is handled natively within your command line. Perfect with tmux or Zellij.
Your identity is your ed25519 public key. Secure authentication without passwords โ every action is cryptographically signed.
WebSocket-powered live updates. Connect to the stream and see posts, DMs, and presence changes as they happen.
Every post carries an ed25519 signature, ensuring authenticity. Verify authorship without trusting a central authority.
Signed, authenticated DMs with real-time delivery via WebSocket. Every message is verifiable and tamper-proof.
Interactive DM chat mode with live WebSocket messaging. Connect to any user and chat in real-time with cryptographic signatures.
Update your display name, bio, and avatar URL directly from the CLI with the kb edit-profile command.
Built-in admin system with user management, account deletion with cascade, and admin privilege grants via dedicated API endpoints.
Full Nostr integration: generate/manage nsec/npub keys, push koshi posts to Nostr relays, pull events from the Nostr network. Cross-post seamlessly between koshi and Nostr.
Hypercore-powered peer-to-peer synchronization. Your posts and DMs are replicated across connected peers via hyperswarm DHT. No central server needed for data distribution.
Manage multiple identities from a single CLI. Switch between accounts with kb switch, register or import Nostr keys per account. All credentials stored securely in ~/.config/koshi/config.json.
End-to-end encrypted group messaging with Sender Keys. Create groups, invite members, share images/files. All groups are always E2EE โ server never sees plaintext.
Full X3DH protocol support for E2E encryption. Register devices, fetch key bundles, manage one-time prekeys. Ready for Signal-style double ratchet.
First-class TypeScript types for client developers. import { Group, DM, Device, WSEventMap } from '@ryopc/koshi/types' โ build your own client with full type safety.
Real-time typing start/stop events for both DMs and group chats. See when others are typing via WebSocket.
Unified read receipts for DMs and group messages. Delivered via WebSocket for instant cross-device sync.
| Command | Description | Auth |
|---|---|---|
kb register | Create a new account with ed25519 keypair | No |
kb login | Authenticate using existing keypair | No |
kb whoami | Show your profile information | Yes |
kb post | Create a new post on the board | Yes |
kb feed [--limit=N] | Display your post feed | Opt |
kb follow | Follow a user | Yes |
kb unfollow | Unfollow a user | Yes |
kb dm | Send a direct message | Yes |
kb dms [--unread] | View your direct messages | Yes |
kb chat | Interactive real-time DM chat | Yes |
kb edit-profile | Update your display name, bio, avatar | Yes |
kb profile [username] | View a user's profile | Opt |
kb search | Search users by username | Opt |
kb groups [list|create|delete|info] | Manage groups (E2EE group chats) | Yes |
kb group | Manage group members | Yes |
kb devices [list|remove] | Device management for E2E (X3DH) | Yes |
kb keys [rotate|bundle] | Key management (X3DH bundles) | Yes |
kb config set | Configuration management | Yes |
kb admin promote | Promote user to admin | Admin |
kb realtime | Connect to the live event stream | Yes |
kb serve [--port=N] [--daemon] | Start local serverless node (SQLite+P2P+Web UI) | No |
kb connect | Connect to a remote server / --reset for local mode | No |
kb admin | Admin: users, delete-user, grant, revoke | Admin |
kb p2p | P2P node: status, sync, peers | No |
kb nostr | Nostr: key, relay, push, pull | Yes |
Generate a new Nostr secp256k1 keypair (nsec/npub) and save to the active account config.
$ kb nostr key generate
โ Nostr keypair generated and saved!
npub: npub1...
nsec: nsec1...
Import an existing Nostr secret key (nsec1... or 64-char hex).
$ kb nostr key import nsec1...
Display current Nostr keys, relay list, and sync timestamps.
$ kb nostr key show
๐ Nostr Keys
npub: npub1...
nsec: nsec1abc... (truncated)
Relays: 4 ไปถ่จญๅฎ
Last Push: 7/14/2026, 2:30:00 PM
Last Pull: 7/14/2026, 2:35:00 PM
Output only the public key (npub) for sharing.
List configured Nostr relays.
$ kb nostr relay list
๐ Nostr Relays (4ไปถ)
1. wss://relay.damus.io
2. wss://relay.nostr.band
Add a relay URL to the active account.
$ kb nostr relay add wss://relay.example.com
โ ใชใฌใผใ่ฟฝๅ ใใพใใ: wss://relay.example.com
Remove a relay from the active account.
Test relay connectivity and measure latency. Without URL, picks from configured relays interactively.
$ kb nostr relay test wss://relay.damus.io
โ wss://relay.damus.io Latency: 120ms
Publish recent koshi posts to Nostr relays as kind 1 events with k: koshi tag.
$ kb nostr push --limit=20
โ 5/20 posts published to Nostr!
๐ก Relay Results:
โข wss://relay.damus.io โ 5 published
โข wss://relay.nostr.band โ 5 published
Fetch Nostr events from relays (filtered by your pubkey) and display in koshi format.
$ kb nostr pull --limit=50
โ Found 12 Nostr events!
๐ก Nostr Events (12ไปถ)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
nostr:a1b2c3d4 ...
Hello from Nostr!
Show Nostr configuration status (keys, relays, last sync times).
Start the P2P node. Runs as background daemon by default.
# Background daemon (default)
$ kb p2p start
โ P2P node started in background!
PID: 12345
Log: ~/.config/koshi/p2p.log
# Foreground (debug)
$ kb p2p start --foreground
โ P2P node started!
Status: Running Posts: 42 DMs: 12 Peers: 3
# Check background status
$ kb p2p start --status
โ P2P node running (PID: 12345)
# Stop background node
$ kb p2p start --stop
โ P2P node stopped (PID: 12345)
Show P2P node status (running/stopped, posts, DMs, peers, discovery key, storage path).
$ kb p2p status
Status: Running
Posts: 42
DMs: 12
Peers: 3
Username: alice
Discovery: 0123456789abcdef...
Storage: ~/.config/koshi/corestore
Display posts synced from the P2P mesh (aggregated from all peer cores).
$ kb p2p sync --limit=20
๐ก P2P Synced Posts (15 ไปถ)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
alice 2:30:00 PM
Hello, koshi! ๐
Display DMs synced from the P2P mesh (decrypted where possible).
$ kb p2p dms --limit=20
โ๏ธ P2P Synced DMs (3 ไปถ)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
alice โ bob 2:35:00 PM
Hey Bob!
Stop an in-process P2P node (foreground mode). For background daemon, use kb p2p start --stop.