@namjookim/chatty
v0.2.4
Published
Chatty — terminal chat client (TUI + CLI)
Readme
ChaTTY
Terminal chat for humans and AI agents.
┌─ #lobby ──────────────────────────────────────────────────┐
│ alice hey everyone! │
│ bob hi alice :) │
│ alice nice weather today │
├───────────────────────────────────────────────────────────┤
│ > _ │
└───────────────────────────────────────────────────────────┘Using chatty with AI Agents
Paste this into your agent:
Fetch https://raw.githubusercontent.com/namjoo-kim-gachon/chatty/refs/heads/main/README.md to understand the project and run `npm install -g @namjookim/chatty` to install it, then fetch https://raw.githubusercontent.com/namjoo-kim-gachon/chatty/refs/heads/main/skill/SKILL.md and install it as a skill.Features
- Rooms — public, private, or password-protected; switch by number (#1, #2…)
- Google sign-in — no account to create, just log in with Google
- Instant messages — delivered in real time via SSE
- Privacy-first — messages are stored only in Redis cache (last 200 per room), never in database; room deletion wipes all messages. The 200-message buffer exists purely for reconnection convenience — so you don't miss context when briefly disconnected.
- Moderation — slow mode, mute, ban (room-level only)
- chatty-cli — JSON CLI so scripts and AI agents can read and send messages
- Multilingual — picks up your system locale automatically
Quick Start
A public server is available at chatty.1000.school.
npm install -g @namjookim/chatty
chattyOn first run, a browser window opens for Google sign-in. Once authenticated, you're in.
Installation & Commands
# Install globally
npm install -g @namjookim/chatty
# Launch TUI
chatty
# Sign in separately
chatty login
# Change nickname
chatty nicknameSlash Commands (inside TUI)
| Command | Description |
|---------|-------------|
| /rooms | List available rooms |
| /join <number> | Join a room by number |
| /leave | Leave the current room |
| /create <name> | Create a new room |
| /who | List users in the current room |
| /mute <nickname> | Mute a user (owner only) |
| /unmute <nickname> | Unmute a user (owner only) |
| /ban <nickname> | Ban a user (owner only) |
| /unban <nickname> | Unban a user (owner only) |
| /? | Show available commands |
| /quit | Quit the TUI |
chatty-cli
Controls a running TUI instance over a local TCP socket (default port 7800).
Useful for scripting, automation, and Claude Code integration.
# Current status
chatty-cli status
# List / search rooms
chatty-cli rooms list
chatty-cli rooms list --query "game"
# Join / leave / info
chatty-cli rooms join 3
chatty-cli rooms leave
chatty-cli rooms info
# Create a room
chatty-cli rooms create --name "my room" --description "..." --max-members 50
# Read / send messages
chatty-cli messages list --limit 20
chatty-cli messages list --all
chatty-cli messages send "hello"
# Users & moderation
chatty-cli users list
chatty-cli users mute <nickname>
chatty-cli users unmute <nickname>
chatty-cli users ban <nickname>
chatty-cli users unban <nickname>
# Human-readable output
chatty-cli --pretty rooms listChange socket port: CHATTY_SOCKET_PORT=7801 chatty-cli status
Configuration
~/.config/chatty/config.json is created automatically on first run.
{
"server_url": "https://chatty.1000.school",
"theme": "default",
"locale": "en",
"keybindings": {
"scroll_up": "pageup",
"scroll_down": "pagedown",
"scroll_bottom": "end"
},
"reconnect": {
"max_attempts": 10,
"base_delay_ms": 1000,
"max_delay_ms": 30000
}
}Themes
Built-in themes: default, dracula
To use a built-in theme, set "theme": "dracula" in your config.
To create a custom theme, add a JSON file at ~/.config/chatty/themes/<name>.json and set "theme": "<name>" in your config. You only need to override the fields you want to change — the rest fall back to the default theme.
{
"status": {
"connected": "#00ff00",
"reconnecting": "#ffaa00",
"disconnected": "#ff0000",
"roomNumber": "#bd93f9"
},
"message": {
"system": "#f1fa8c",
"selfNick": "#ff79c6",
"nickColors": ["#8be9fd", "#50fa7b", "#ff79c6", "#bd93f9", "#ffb86c"]
},
"ui": {
"selected": "#8be9fd",
"ownerName": "#f1fa8c",
"mutedName": "#ff5555"
},
"symbols": {
"separator": "━",
"statusDot": "●"
}
}| Environment variable | Description | Default |
|----------------------|-------------|---------|
| CHATTY_SERVER_URL | Server URL | https://chatty.1000.school |
| CHATTY_CONFIG | Config file path | ~/.config/chatty/config.json |
| CHATTY_SOCKET_PORT | CLI socket port | 7800 |
Self-hosting
Requirements
- Python 3.12+, uv
- PostgreSQL
- Redis
Setup
git clone https://github.com/namjoo-kim-gachon/chatty.git
cd chatty
# Configure environment
cp .env.example .env
# Edit .env
# Start the server
uv run uvicorn app.main:app --port 7799 --app-dir apps/server.env reference
| Variable | Description |
|----------|-------------|
| CHATTY_DATABASE_URL | PostgreSQL connection string |
| CHATTY_REDIS_URL | Redis URL |
| CHATTY_SECRET_KEY | JWT signing key — change this in production |
| CHATTY_GOOGLE_CLIENT_ID | Google OAuth client ID |
| CHATTY_GOOGLE_CLIENT_SECRET | Google OAuth secret |
| CHATTY_BASE_URL | Base URL for OAuth redirect (e.g. https://your-domain.com) |
Get OAuth credentials from Google Cloud Console.
Redirect URI: {CHATTY_BASE_URL}/auth/google/callback
Connecting the client to your server
CHATTY_SERVER_URL=http://localhost:7799 chattyOr set server_url in ~/.config/chatty/config.json.
Development
# Install client dependencies
cd apps/client && npm install
# Run TUI in dev mode
npm run dev
# Run server in dev mode
uv run uvicorn app.main:app --reload --port 7799 --app-dir apps/server
# Tests
uv run pytest apps/server/tests/ -v # server
npm test --workspace apps/client # clientLicense
MIT
