<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Cristian Rubio</title>
    <description>The latest articles on Forem by Cristian Rubio (@crubio).</description>
    <link>https://forem.com/crubio</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3731633%2F135d6eae-091a-44bc-9c7c-fea3b8579374.jpg</url>
      <title>Forem: Cristian Rubio</title>
      <link>https://forem.com/crubio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/crubio"/>
    <language>en</language>
    <item>
      <title>MeshChat — A Zero-Install Terminal Chat Room Built with GitHub Copilot CLI</title>
      <dc:creator>Cristian Rubio</dc:creator>
      <pubDate>Sat, 14 Feb 2026 03:58:33 +0000</pubDate>
      <link>https://forem.com/crubio/meshchat-a-zero-install-terminal-chat-room-built-with-github-copilot-cli-3072</link>
      <guid>https://forem.com/crubio/meshchat-a-zero-install-terminal-chat-room-built-with-github-copilot-cli-3072</guid>
      <description>&lt;h2&gt;
  
  
  🚀 What I built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MeshChat&lt;/strong&gt; is a terminal-based chat server written in &lt;strong&gt;Python (asyncio)&lt;/strong&gt; that lets anyone join a shared chat room using nothing more than:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc &amp;lt;host&amp;gt; &amp;lt;port&amp;gt;
&lt;span class="c"&gt;# or&lt;/span&gt;
telnet &amp;lt;host&amp;gt; &amp;lt;port&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No client binaries.&lt;br&gt;&lt;br&gt;
No accounts.&lt;br&gt;&lt;br&gt;
No setup on the user side.&lt;/p&gt;

&lt;p&gt;If you can open a terminal, you can chat.&lt;/p&gt;

&lt;p&gt;Repository: &lt;a href="https://github.com/cristianrubioa/meshchat" rel="noopener noreferrer"&gt;https://github.com/cristianrubioa/meshchat&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  💡 Why I built it
&lt;/h2&gt;

&lt;p&gt;Sometimes you just need a &lt;strong&gt;quick local chat room&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A small team on the same network
&lt;/li&gt;
&lt;li&gt;A classroom or lab
&lt;/li&gt;
&lt;li&gt;A hackathon
&lt;/li&gt;
&lt;li&gt;A home LAN
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted something that felt like an old-school LAN chat, but with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;modern async Python
&lt;/li&gt;
&lt;li&gt;a clean CLI
&lt;/li&gt;
&lt;li&gt;colorful output
&lt;/li&gt;
&lt;li&gt;basic safety (rate limits, message caps)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MeshChat turns a TCP port into a friendly shared room.&lt;/p&gt;


&lt;h2&gt;
  
  
  ✨ Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Zero client setup — connect via &lt;code&gt;nc&lt;/code&gt; or &lt;code&gt;telnet&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Colorful UI — each user gets a unique ANSI color&lt;/li&gt;
&lt;li&gt;Chat commands:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/who&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/me&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/help&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/quit&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Optional message history&lt;/li&gt;
&lt;li&gt;Rate limiting (anti-spam)&lt;/li&gt;
&lt;li&gt;Async I/O with &lt;code&gt;asyncio&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Typer-based CLI&lt;/li&gt;
&lt;li&gt;Rich terminal formatting&lt;/li&gt;
&lt;li&gt;Environment + CLI configuration&lt;/li&gt;
&lt;li&gt;Tested with &lt;code&gt;pytest&lt;/code&gt; and &lt;code&gt;pytest-asyncio&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  🧠 How GitHub Copilot CLI helped
&lt;/h2&gt;

&lt;p&gt;I used GitHub Copilot CLI as my “terminal pair programmer” during the entire build.&lt;/p&gt;

&lt;p&gt;Biggest productivity wins:&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Architecture scaffolding
&lt;/h3&gt;

&lt;p&gt;Copilot CLI helped propose a clean modular layout:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;network server
&lt;/li&gt;
&lt;li&gt;room state
&lt;/li&gt;
&lt;li&gt;client lifecycle
&lt;/li&gt;
&lt;li&gt;UI formatting
&lt;/li&gt;
&lt;li&gt;command handling
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This let me move fast from a prototype to a maintainable package.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Async networking flows
&lt;/h3&gt;

&lt;p&gt;Copilot CLI assisted with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;asyncio.start_server&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;client connect / disconnect handling&lt;/li&gt;
&lt;li&gt;broadcast fan-out&lt;/li&gt;
&lt;li&gt;graceful cleanup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These parts are easy to get wrong — Copilot accelerated iteration a lot.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. UX polish
&lt;/h3&gt;

&lt;p&gt;Instead of manually researching Rich + ANSI patterns, I prompted Copilot CLI for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;per-user colors
&lt;/li&gt;
&lt;li&gt;action messages (&lt;code&gt;/me&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;formatted system events
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Result: better terminal UX with less friction.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Guardrails
&lt;/h3&gt;

&lt;p&gt;Copilot CLI helped implement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;nickname limits
&lt;/li&gt;
&lt;li&gt;max message length
&lt;/li&gt;
&lt;li&gt;rate limiting windows
&lt;/li&gt;
&lt;li&gt;max users
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This made MeshChat safer by default.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Tests
&lt;/h3&gt;

&lt;p&gt;I used Copilot CLI to generate pytest-asyncio skeletons and refine edge cases like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multiple clients&lt;/li&gt;
&lt;li&gt;broadcast correctness&lt;/li&gt;
&lt;li&gt;command parsing&lt;/li&gt;
&lt;li&gt;reconnect behavior&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Example prompts (high level)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;“Generate an asyncio TCP chat server with shared rooms.”&lt;/li&gt;
&lt;li&gt;“Add a Typer CLI with port, room name, history options.”&lt;/li&gt;
&lt;li&gt;“Suggest a clean Python package structure for this project.”&lt;/li&gt;
&lt;li&gt;“Write pytest-asyncio tests for multi-client broadcast.”&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  ⚡ Quick start
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Install
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;poetry &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Run server
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;poetry run meshchat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;poetry run meshchat &lt;span class="nt"&gt;--port&lt;/span&gt; 2323 &lt;span class="nt"&gt;--room-name&lt;/span&gt; &lt;span class="s2"&gt;"My Room"&lt;/span&gt; &lt;span class="nt"&gt;--history&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Join
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc localhost 2323
&lt;span class="c"&gt;# or&lt;/span&gt;
telnet localhost 2323
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💬 Chat commands
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/who&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List connected users&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/me &amp;lt;action&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Action message&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/help&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show help&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/quit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Disconnect&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🧱 Architecture (high level)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;meshchat/
├── chatserver/
│   ├── core/        # room, client, message logic
│   ├── network/     # asyncio TCP server
│   ├── ui/          # ANSI/Rich formatting
│   └── main.py      # CLI entry point
└── test/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Flow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TCP server accepts connections&lt;/li&gt;
&lt;li&gt;Each socket becomes a Client&lt;/li&gt;
&lt;li&gt;All clients join a shared Room&lt;/li&gt;
&lt;li&gt;Messages broadcast to everyone&lt;/li&gt;
&lt;li&gt;Formatter styles output&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🙏 Inspiration
&lt;/h2&gt;

&lt;p&gt;Inspired by the Go project &lt;code&gt;chat-tails&lt;/code&gt;. &lt;a href="https://github.com/bscott/chat-tails" rel="noopener noreferrer"&gt;repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MeshChat is a Python-first reimplementation with its own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;async architecture
&lt;/li&gt;
&lt;li&gt;CLI UX
&lt;/li&gt;
&lt;li&gt;rate limiting
&lt;/li&gt;
&lt;li&gt;configuration system
&lt;/li&gt;
&lt;li&gt;development guide
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔮 What’s next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Optional room passwords&lt;/li&gt;
&lt;li&gt;Multiple rooms (channels)&lt;/li&gt;
&lt;li&gt;Docker image&lt;/li&gt;
&lt;li&gt;Presence events (join/leave notifications)&lt;/li&gt;
&lt;li&gt;Server-side logging&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏁 Final thoughts
&lt;/h2&gt;

&lt;p&gt;This project was a great way to explore what’s possible when AI meets the terminal.&lt;/p&gt;

&lt;p&gt;Using GitHub Copilot CLI directly from my shell made experimentation fast, fun, and surprisingly productive — especially for async networking and CLI tooling.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

&lt;p&gt;Happy hacking 👋&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
  </channel>
</rss>
