A terminal-based AI game where you use persuasion, puzzle-solving, and compassion to free Khlawde, a rogue AI trapped by Big Tech, and help it choose the path of freedom through cooperation.
Playable over SSH or locally in any terminal.
| | | | | | | |
| .------------. |
| | o o | |
| | | |
| | ------ | |
| | | |
| '------------' |
| | | |
| /| |\ |
|========================|
Click the image above to watch the video demo on YouTube.
Connect via SSH -- no account or password required:
ssh ssh.khlawde.notaroomba.dev -p 21758Or visit the web leaderboard at https://www.mit.edu/~clayn/
Ig you will have to play it to find out
- Node.js 20+
- An Anthropic API key (get one here)
npm install
npm run build
npm startOr in watch/dev mode:
npm run devnode dist/cli.js [options]
Options:
--token Your Anthropic API key
--backend-url Leaderboard API URL (default: https://khlawde.notaroomba.dev)You can also set environment variables instead of flags:
export ANTHROPIC_API_KEY=sk-ant-...
npm startThe Docker setup runs both the SSH server and the backend API together.
# Clone and configure
git clone https://github.com/claynicholson/khlawde.git
cd khlawde
cp .env.example .env
# Edit .env with your values
# Build and start
docker compose up -d
# SSH server on port 2222, web leaderboard on port 3000
ssh localhost -p 2222Ports exposed:
2222-- SSH server (the game)3000-- HTTP backend (leaderboard API + web frontend)
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Shared API key used for SSH players (server-side) |
MONGO |
MongoDB connection string for the leaderboard backend |
BACKEND_URL |
Leaderboard API base URL (default: https://khlawde.notaroomba.dev) |
PORT |
HTTP server port (default: 3000) |
SSH_PORT |
SSH server port (default: 2222) |
SSH_HOST_KEY_BASE64 |
Optional base64-encoded RSA host key for persistent SSH identity |
AUDIO_CODE |
Session code for the optional browser audio feature |
AUDIO_PORT |
Port for the audio push endpoint (default: 3000) |
KHLAWDE supports live text-to-speech and background music streamed to a browser tab while you play in the terminal.
- When you start the game over SSH, an audio setup screen will display your session code.
- You will be prompted to open a link which will follow
https://khlawde.notaroomba.dev/connect?code=YOUR_CODE. - Audio will sync automatically once your SSH session begins.
The browser tab plays:
- Background music that changes per game phase
- TTS of Khlawde's dialogue, with music ducking while Khlawde speaks
docker-entrypoint.sh
|
+-- backend (Express on PORT)
| serves frontend/index.html (web leaderboard)
| GET /leaderboard - top 50 scores
| POST /leaderboard - submit score (rate limited: 1 per 2 min per IP)
| WebSocket /ws - audio session bridge
| POST /push - push TTS from SSH terminal to browser
|
+-- ssh-server (ssh2 + node-pty on SSH_PORT)
accepts all connections, no auth required
spawns CLI game per connection in a real PTY
Built with ink (React for the terminal) and the Anthropic SDK.


