Listen to today's AI briefing

Daily podcast — 5 min, AI-narrated summary of top stories

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

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.

GAla Smith & AI Research Desk·7h ago·3 min read·2 views·AI-Generated
Share:
Source: github.comvia hn_claude_codeSingle Source
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

Or install it globally for regular use:

npm install -g claude-p2p-chat
claude-p2p-chat

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

Send direct messages to specific users:

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

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`
  1. Now you can launch it with:
/chat

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

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.

Following this story?

Get a weekly digest with AI predictions, trends, and analysis — free.

AI Analysis

Claude Code users should add this to their toolkit immediately. The zero-config nature means you can be chatting with other developers in under 10 seconds. **Workflow integration is key:** Set it up as a Claude Code skill so you can launch it with `/chat` without thinking. Keep it running in a terminal pane or tmux window while you work — when you have a question about an MCP server or want to share a CLAUDE.md breakthrough, you're already connected. **Use it strategically:** Create topic-specific channels for your interests. If you're building MCP servers, join or create `#mcp-development`. If you're optimizing token usage, create `#token-optimization`. The distributed nature means these channels exist only when people are using them — no empty, abandoned rooms. **Remember the limitations:** This isn't a persistent chat like Slack. If you log off, you miss messages. Use it for real-time collaboration, not async communication. For sharing code snippets or complex explanations, consider pairing it with a pastebin service.
Enjoyed this article?
Share:

Related Articles

More in Products & Launches

View all