{"id":17548843,"url":"https://github.com/bradmontgomery/zerochat","last_synced_at":"2026-02-13T14:14:49.046Z","repository":{"id":66911621,"uuid":"11414607","full_name":"bradmontgomery/zerochat","owner":"bradmontgomery","description":"a stupid simple command-line chat server and client using zeromq","archived":false,"fork":false,"pushed_at":"2025-12-30T21:48:34.000Z","size":50,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T19:21:02.375Z","etag":null,"topics":["chat","command-line","pubsub","python","zeromq"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradmontgomery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-07-15T04:19:55.000Z","updated_at":"2025-12-30T21:48:34.000Z","dependencies_parsed_at":"2023-05-13T18:30:19.154Z","dependency_job_id":null,"html_url":"https://github.com/bradmontgomery/zerochat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bradmontgomery/zerochat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmontgomery%2Fzerochat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmontgomery%2Fzerochat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmontgomery%2Fzerochat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmontgomery%2Fzerochat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradmontgomery","download_url":"https://codeload.github.com/bradmontgomery/zerochat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradmontgomery%2Fzerochat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29409600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","command-line","pubsub","python","zeromq"],"created_at":"2024-10-21T02:45:09.492Z","updated_at":"2026-02-13T14:14:49.034Z","avatar_url":"https://github.com/bradmontgomery.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zerochat\n\n[![Tests](https://github.com/bradmontgomery/zerochat/actions/workflows/tests.yml/badge.svg)](https://github.com/bradmontgomery/zerochat/actions/workflows/tests.yml)\n[![GitHub tag](https://img.shields.io/github/v/tag/bradmontgomery/zerochat?label=latest)](https://github.com/bradmontgomery/zerochat/tags)\n[![License](https://img.shields.io/github/license/bradmontgomery/zerochat)](LICENSE.txt)\n[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)\n\nA simple, command-line chat server and client using ZeroMQ with async I/O.\n\n## Features\n\n- Channel-based messaging — clients subscribe to a channel and only see messages on that channel\n- Async I/O using `asyncio` and `zmq.asyncio` for non-blocking operation\n- Rich terminal output with colored messages\n- Structured JSON logging to file\n- Input validation for usernames and channel names\n\n## Architecture\n\n- Clients push messages to the server\n- The server publishes messages to all subscribers\n- Clients subscribe to published messages, filtering by channel\n\n```\n[client] ---(push a message)---\u003e  [server]\n                                    / | \\\n                                   /  |  \\\n                        (publish message to subscribers)\n                                 /    |    \\\n                                /     |     \\\n                           [client]   |      \\\n                                      |     [client]\n                                   [client]\n```\n\n## Installation\n\nThis project uses [uv](https://docs.astral.sh/uv/) for dependency management.\n\n```bash\n# Clone the repository\ngit clone https://github.com/bradmontgomery/zerochat.git\ncd zerochat\n\n# Install dependencies\nuv sync\n```\n\n## Usage\n\n### Running the Server\n\n```bash\nuv run zerochat-server\n```\n\nServer options:\n```\n-H, --host HOST          Hostname/IP to bind (default: *)\n-p, --pubsub_port PORT   Port for publishing messages (default: 5555)\n-r, --recv_port PORT     Port for receiving messages (default: 5556)\n-v, --verbose            Enable verbose output\n--log-file PATH          Custom log file path (default: ~/.zerochat/logs/server.log)\n--log-console            Also log to console (stderr)\n```\n\n### Running the Client\n\n```bash\nuv run zerochat-client -u your_username\n```\n\nClient options:\n```\n-u, --username NAME      Your chat username (default: Anon)\n-c, --channel NAME       Channel to join (default: GLOBAL)\n-H, --host HOST          Server hostname/IP (default: localhost)\n-p, --pubsub_port PORT   Server's publish port (default: 5555)\n-s, --send_port PORT     Server's receive port (default: 5556)\n--log-file PATH          Custom log file path (default: ~/.zerochat/logs/client.log)\n--log-console            Also log to console (stderr)\n```\n\n### Example\n\nTerminal 1 — Start the server:\n```bash\nuv run zerochat-server -v\n```\n\nTerminal 2 — Connect as Alice:\n```bash\nuv run zerochat-client -u Alice -c general\n```\n\nTerminal 3 — Connect as Bob:\n```bash\nuv run zerochat-client -u Bob -c general\n```\n\n## Development\n\n```bash\n# Install dev dependencies\nuv sync\n\n# Run tests\nuv run pytest\n\n# Run linters\nuv run black zerochat/ tests/\nuv run isort zerochat/ tests/\nuv run flake8 zerochat/ tests/\nuv run mypy zerochat/\n\n# Or use make\nmake install   # Install dependencies and pre-commit hooks\nmake test      # Run tests\nmake lint      # Check linting\nmake format    # Auto-format code\n```\n\n## About\n\nThis is a fun weekend project for exploring [ZeroMQ](https://zeromq.org) pub/sub patterns.\n\n## License\n\nMIT. See the [`LICENSE.txt`](LICENSE.txt) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradmontgomery%2Fzerochat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradmontgomery%2Fzerochat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradmontgomery%2Fzerochat/lists"}