DEV Community

gentic news
gentic news

Posted on • Originally published at gentic.news

Claude Code's New Terminal Chat: Connect with Other Devs via P2P

A new peer-to-peer terminal chat tool lets Claude Code users connect directly without servers, accounts, or costs.

Claude Code's New Terminal Chat: Connect with Other Devs via P2P

What It Does — Terminal-Based Community Chat

claude-p2p-chat is a terminal application that creates a distributed chat network specifically for Claude Code users. Unlike Discord, Slack, or web-based communities, this runs entirely in your terminal using Hyperswarm DHT for peer discovery — no servers, no signups, and no costs.

When you run it, you immediately join #lobby where you can see other online Claude Code developers. The interface shows channels on the left, messages in the center, and online users on the right — all in a beautifully formatted TUI.

Setup — Two Commands to Get Started

Run it once without installation:

npx claude-p2p-chat
Enter fullscreen mode Exit fullscreen mode

Or install it globally for regular use:

npm install -g claude-p2p-chat
claude-p2p-chat
Enter fullscreen mode Exit fullscreen mode

Set your username with --name flag or change it in-chat with /nick yourname.

When To Use It — Real-Time Collaboration Without Context Switching

This tool shines when you're already in your terminal workflow with Claude Code and want to:

  1. Ask quick questions about Claude Code features or MCP servers
  2. Share discoveries about new prompting techniques or workflows
  3. Find collaborators for open-source Claude Code projects
  4. Get unstuck without leaving your development environment

Create custom channels for specific topics:

/join #mcp-servers
/join #claude-md-tips
/join #agent-development
Enter fullscreen mode Exit fullscreen mode

Send direct messages to specific users:

/dm username "Hey, saw your MCP server — how did you handle authentication?"
Enter fullscreen mode Exit fullscreen mode

Integrate with Claude Code as a Skill

Make it accessible directly from Claude Code by creating a skill:

  1. Create ~/.claude/skills/chat/SKILL.md:
---
name: chat
description: "Open P2P Chat"
---
Run via Bash: `npx claude-p2p-chat`
Enter fullscreen mode Exit fullscreen mode
  1. Now you can launch it with:
/chat
Enter fullscreen mode Exit fullscreen mode

How It Works — Truly Distributed

The chat uses Hyperswarm DHT (distributed hash table) for peer discovery. Each channel name is hashed to create a unique topic identifier. Peers find each other through the DHT network, establish encrypted WebRTC connections, and messages flow directly between them.

You ←──encrypted──→ Peer A
↕                  ↕
Peer B ←──────────→ Peer C
Enter fullscreen mode Exit fullscreen mode

Chat history is stored locally in ~/.claude-chat/history/ — there's no central server storing messages. If you weren't online when a message was sent, you won't see it (similar to IRC).

Keyboard Shortcuts for Power Users

  • Tab — Cycle between channels, users, and input
  • Esc — Refocus the input box
  • Mouse wheel — Scroll in the message area
  • Ctrl+C — Quit (when not typing)

Requirements

  • Node.js 18+
  • Terminal that supports Unicode and 256 colors
  • Works on Linux, macOS, and Windows (WSL)

This follows the growing trend of terminal-first tools in the Claude Code ecosystem, where developers want to stay in their workflow without switching to browser-based applications.


Originally published on gentic.news

Top comments (0)