{"id":19034803,"url":"https://github.com/sakiib/chat-server","last_synced_at":"2026-06-05T16:32:11.476Z","repository":{"id":61629312,"uuid":"552332220","full_name":"sakiib/chat-server","owner":"sakiib","description":"Simple Chat Server CLI on Top of TCP","archived":false,"fork":false,"pushed_at":"2022-10-17T10:05:07.000Z","size":2710,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-02T05:16:44.545Z","etag":null,"topics":["chat","cli","tcp-client","tcp-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sakiib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-16T10:57:01.000Z","updated_at":"2023-02-02T17:02:37.000Z","dependencies_parsed_at":"2022-10-19T19:00:52.427Z","dependency_job_id":null,"html_url":"https://github.com/sakiib/chat-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakiib%2Fchat-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakiib%2Fchat-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakiib%2Fchat-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakiib%2Fchat-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sakiib","download_url":"https://codeload.github.com/sakiib/chat-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240089023,"owners_count":19746182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","cli","tcp-client","tcp-server"],"created_at":"2024-11-08T21:47:35.169Z","updated_at":"2026-05-05T09:30:21.306Z","avatar_url":"https://github.com/sakiib.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo Chat Server using Cobra CLI on Top of TCP\n\n## Build\n\n```bash\n$ go build -o chat .\n\n```\n\n## Available commands for the CLI\n\n```bash\n$ ./chat --help\n\nUsage:\n  chat [flags]\n  chat [command]\n\nAvailable Commands:\n  client      connects the client to the chat server\n  completion  Generate the autocompletion script for the specified shell\n  help        Help about any command\n  server      starts the chat server\n\nFlags:\n  -h, --help   help for chat\n\n```\n\n## Start the chat server\n\n```bash\n$ ./chat server\n\n```\n\n## Join the chat server as a client (an Unique ID will be assigned to the client on joining)\n\n```bash\n# open several windown \u0026 run this command\n$ ./chat client\n\n# each client will be assigned a randomly generated ID within range of int64\n\n10 joined the chat\nsuccessfully joined the chat server\n\n10 joined the chat\n51 joined the chat\nsuccessfully joined the chat server\n\n10 joined the chat\n51 joined the chat\n21 joined the chat\nsuccessfully joined the chat server\n\n```\n\n## Available commands for the connected client\n\n```bash\n# Join \u0026 run help\n$ help\n\nhelp\n\nAvailable Commands:\nwhoAmI - sends the client's self identity\nuserList - lists the connected clients(ID)\nsendMessage - sends messages to all the clients\nsendToUsers - sends messages to the client with provided IDs\nhelp - lists all the available commands\n\n```\n\n## Expected output for the client commands\n\n```bash\n# for the client with ID 21\n$ whoAmI\nwhoAmI? My ID 21\n\n# list the users\n$ userList\n10, 51, 21\n\n# send messages to all the users\n# all the connected users will receive this message\n$ sendMessage hello world!\n\n# send message to users providing their IDs along with message\n# only the connected users from the usersList will receive the message\n# IDs must be enclosed by [] separated by commas\n$ sendToUsers hello world [21,51]\n\n```\n\n## Static Demo\n\n### whoAmI command demo\n\n\u003cp class=\"has-text-centered\"\u003e\n  \u003cimg src=\"static/whoAmI.png\" alt=\"Demo\" style=\"border: none\"\u003e\n\u003c/p\u003e\n\n\n### sendMessage {message} command demo\n\n\u003cp class=\"has-text-centered\"\u003e\n  \u003cimg src=\"static/sendMessage.png\" alt=\"Demo\" style=\"border: none\"\u003e\n\u003c/p\u003e\n\n### sendToUsers {message} []userList command demo\n\n\u003cp class=\"has-text-centered\"\u003e\n  \u003cimg src=\"static/sendToUsers.png\" alt=\"Demo\" style=\"border: none\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakiib%2Fchat-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsakiib%2Fchat-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakiib%2Fchat-server/lists"}