UNPKG

@tastekim/chat-cli

Version:

๐Ÿ’ฌConnect with developers worldwide through an interactive terminal chat experience while you code!๐Ÿ’ป

244 lines (173 loc) โ€ข 10.9 kB
# ๐Ÿ’ฌ Chat CLI <div align="center"> <img src="https://velog.velcdn.com/images/tastekim_/post/4bb7992d-70e9-4340-b588-559b90d7a0f8/image.png"> [![npm version](https://badge.fury.io/js/@tastekim%2Fchat-cli.svg)](https://badge.fury.io/js/@tastekim%2Fchat-cli) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Node.js](https://img.shields.io/badge/Node.js-22.14.0+-green.svg)](https://nodejs.org/) **A Chat CLI that lets you communicate with developers from all over the world while you're at work, naturally and unobtrusively.** *ํ„ฐ๋ฏธ๋„๋กœ ์—…๋ฌด์ค‘์—๋„ ๋ˆˆ์น˜ ์•ˆ๋ณด๊ณ  ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์„ธ์ƒ ๋ชจ๋“  ๊ฐœ๋ฐœ์ž์™€ ์†Œํ†ตํ•  ์ˆ˜ ์žˆ๋Š” ์ฑ„ํŒ… CLI* [๐Ÿš€ Quick Start](#๐Ÿš€-quick-start) โ€ข [โœจ Features](#-features) โ€ข [๐Ÿ“– Documentation](#-documentation) โ€ข [โ˜• Support](https://buymeacoffee.com/tastekim) </div> --- ## ๐ŸŒŸ Overview | ๊ฐœ์š” Chat CLI is a modern, terminal-based chat application that brings real-time communication directly to your command line. Built with TypeScript and powered by WebSocket technology, it offers a seamless and intuitive chat experience without leaving your terminal. Chat CLI๋Š” ์‹ค์‹œ๊ฐ„ ์ปค๋ฎค๋‹ˆ์ผ€์ด์…˜์„ ๋ช…๋ น์ค„๋กœ ์ง์ ‘ ๊ฐ€์ ธ์˜ค๋Š” ํ˜„๋Œ€์ ์ธ ํ„ฐ๋ฏธ๋„ ๊ธฐ๋ฐ˜ ์ฑ„ํŒ… ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ž…๋‹ˆ๋‹ค. TypeScript๋กœ ๊ตฌ์ถ•๋˜๊ณ  WebSocket ๊ธฐ์ˆ ๋กœ ๊ตฌ๋™๋˜๋ฉฐ, ํ„ฐ๋ฏธ๋„์„ ๋ฒ—์–ด๋‚˜์ง€ ์•Š๊ณ ๋„ ์›ํ™œํ•˜๊ณ  ์ง๊ด€์ ์ธ ์ฑ„ํŒ… ๊ฒฝํ—˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ## ๐Ÿš€ Quick Start | ๋น ๋ฅธ ์‹œ์ž‘ ### Installation | ์„ค์น˜ ```bash # Install globally | ์ „์—ญ ์„ค์น˜ npm install -g @tastekim/chat-cli # Run immediately | ์ฆ‰์‹œ ์‹คํ–‰ chat-cli ``` ### Basic Usage | ๊ธฐ๋ณธ ์‚ฌ์šฉ๋ฒ• ```bash # Start chatting | ์ฑ„ํŒ… ์‹œ์ž‘ chat-cli # Help | ๋„์›€๋ง chat-cli --help ``` ## โœจ Features | ๊ธฐ๋Šฅ ### ๐ŸŽฏ Core Features | ํ•ต์‹ฌ ๊ธฐ๋Šฅ - ๐Ÿ’ฌ **Real-time messaging** | ์‹ค์‹œ๊ฐ„ ๋ฉ”์‹œ์ง• - ๐Ÿ–ผ๏ธ **Image sharing support** | ์ด๋ฏธ์ง€ ๊ณต์œ  ์ง€์› - ๐Ÿ  **Multiple chat rooms** | ๋‹ค์ค‘ ์ฑ„ํŒ…๋ฐฉ - ๐Ÿš€ **Custom room creation** | ์ปค์Šคํ…€ ๋ฐฉ ์ƒ์„ฑ - ๐Ÿ‘ฅ **Multi-user support** | ๋‹ค์ค‘ ์‚ฌ์šฉ์ž ์ง€์› - ๐Ÿ”„ **Auto-reconnection** | ์ž๋™ ์žฌ์—ฐ๊ฒฐ ### ๐ŸŽจ User Experience | ์‚ฌ์šฉ์ž ๊ฒฝํ—˜ - ๐Ÿ–ฅ๏ธ **Beautiful terminal UI with rounded borders** | ๋‘ฅ๊ทผ ํ…Œ๋‘๋ฆฌ๋กœ ์•„๋ฆ„๋‹ค์šด ํ„ฐ๋ฏธ๋„ UI - โŒจ๏ธ **Intuitive keyboard shortcuts** | ์ง๊ด€์ ์ธ ํ‚ค๋ณด๋“œ ๋‹จ์ถ•ํ‚ค - ๐ŸŽฏ **Responsive layout** | ๋ฐ˜์‘ํ˜• ๋ ˆ์ด์•„์›ƒ - ๐Ÿ”„ **Dynamic room switching** | ๋™์  ๋ฐฉ ์ „ํ™˜ ### ๐Ÿ› ๏ธ Developer Features | ๊ฐœ๋ฐœ์ž ๊ธฐ๋Šฅ - ๐Ÿ”Œ **WebSocket protocol** | WebSocket ํ”„๋กœํ† ์ฝœ - ๐Ÿ“‹ **Rich command-line interface** | ํ’๋ถ€ํ•œ ๋ช…๋ น์ค„ ์ธํ„ฐํŽ˜์ด์Šค - ๐Ÿท๏ธ **TypeScript support** | ํƒ€์ž…์Šคํฌ๋ฆฝํŠธ ์ง€์› - ๐Ÿ“ฆ **Modern ES modules** | ํ˜„๋Œ€์ ์ธ ES ๋ชจ๋“ˆ ## ๐Ÿ“– Documentation | ๋ฌธ์„œ ### Keyboard Shortcuts | ํ‚ค๋ณด๋“œ ๋‹จ์ถ•ํ‚ค | Shortcut | Action | ์„ค๋ช… | |----------|--------|------| | `Ctrl + C` | Exit | ์ข…๋ฃŒ | | `Enter` | Send message | ๋ฉ”์‹œ์ง€ ์ „์†ก | | `Tab` | Toggle rooms/Commands | ๋ฐฉ ๋ชฉ๋ก ํ† ๊ธ€/๋ช…๋ น์–ด | | `Backspace` | Delete character | ๋ฌธ์ž ์‚ญ์ œ | | `Escape` | Exit | ์ข…๋ฃŒ | ### Chat Commands | ์ฑ„ํŒ… ๋ช…๋ น์–ด | Command | Action | ์„ค๋ช… | |---------|--------|------| | `/help` | Show help | ๋„์›€๋ง ํ‘œ์‹œ | | `/create-room` | Create new room | ์ƒˆ ๋ฐฉ ์ƒ์„ฑ | | `/join <room>` | Join room | ๋ฐฉ ์ฐธ์—ฌ | | `/leave` | Leave current room | ํ˜„์žฌ ๋ฐฉ ๋‚˜๊ฐ€๊ธฐ | | `/users` | List users | ์‚ฌ์šฉ์ž ๋ชฉ๋ก | | `/rooms` | List rooms | ๋ฐฉ ๋ชฉ๋ก | | `/clear` | Clear chat | ์ฑ„ํŒ… ๊ธฐ๋ก ์ง€์šฐ๊ธฐ | | `/quit` | Exit app | ์•ฑ ์ข…๋ฃŒ | | `/1, /2, /3...` | Switch to room | ๋ฐฉ ๋ฒˆํ˜ธ๋กœ ์ „ํ™˜ | ### Room Management | ๋ฐฉ ๊ด€๋ฆฌ Chat CLI provides a modern, dynamic room management system: Chat CLI๋Š” ํ˜„๋Œ€์ ์ด๊ณ  ๋™์ ์ธ ๋ฐฉ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค: #### Starting with Lobby | ๋กœ๋น„์—์„œ ์‹œ์ž‘ - **๐Ÿ  Lobby** - Default starting room | ๊ธฐ๋ณธ ์‹œ์ž‘ ๋ฐฉ - **๐Ÿ‘ฅ Multi-user support** - See real-time user count | ์‹ค์‹œ๊ฐ„ ์‚ฌ์šฉ์ž ์ˆ˜ ํ™•์ธ - **๐Ÿ”„ Auto-reconnection** - Seamless connection management | ์›ํ™œํ•œ ์—ฐ๊ฒฐ ๊ด€๋ฆฌ #### Room Features | ๋ฐฉ ๊ธฐ๋Šฅ - **๐Ÿ  Public rooms** - Open to everyone | ๋ชจ๋“  ์‚ฌ๋žŒ์—๊ฒŒ ์—ด๋ฆฐ ๊ณต๊ฐœ ๋ฐฉ - **๐Ÿ”’ Private rooms** - Password protected | ๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณดํ˜ธ ๋น„๊ณต๊ฐœ ๋ฐฉ - **๐Ÿ‘ฅ Real-time user count** - See who's online | ์‹ค์‹œ๊ฐ„ ์˜จ๋ผ์ธ ์‚ฌ์šฉ์ž ์ˆ˜ - **๐Ÿ”„ Dynamic room switching** - Switch between joined rooms | ์ฐธ์—ฌํ•œ ๋ฐฉ ๊ฐ„ ๋™์  ์ „ํ™˜ - **๐Ÿ’ฌ Unread indicators** - Green dot for new messages | ์ƒˆ ๋ฉ”์‹œ์ง€ ์•Œ๋ฆผ (๋…น์ƒ‰ ์ ) #### Creating Rooms | ๋ฐฉ ์ƒ์„ฑ 1. Use `/create-room` command | `/create-room` ๋ช…๋ น์–ด ์‚ฌ์šฉ 2. Enter room name (1-15 characters) | ๋ฐฉ ์ด๋ฆ„ ์ž…๋ ฅ (1-15์ž) 3. Choose public or private | ๊ณต๊ฐœ ๋˜๋Š” ๋น„๊ณต๊ฐœ ์„ ํƒ 4. Set password if private | ๋น„๊ณต๊ฐœ์ธ ๊ฒฝ์šฐ ๋น„๋ฐ€๋ฒˆํ˜ธ ์„ค์ • #### Joining Rooms | ๋ฐฉ ์ฐธ์—ฌ 1. Use `/join <room-name>` command | `/join <๋ฐฉ์ด๋ฆ„>` ๋ช…๋ น์–ด ์‚ฌ์šฉ 2. Enter password if required | ํ•„์š”์‹œ ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ 3. Switch between rooms using `/1`, `/2`, `/3`... | `/1`, `/2`, `/3`... ์œผ๋กœ ๋ฐฉ ์ „ํ™˜ ### Interface Layout | ์ธํ„ฐํŽ˜์ด์Šค ๋ ˆ์ด์•„์›ƒ Chat CLI features a responsive, three-panel layout: Chat CLI๋Š” ๋ฐ˜์‘ํ˜• 3ํŒจ๋„ ๋ ˆ์ด์•„์›ƒ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค: ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐Ÿ”ต Chat CLI - Room โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ ๐Ÿ“ Rooms โ”‚ ๐Ÿ’ฌ Chat โ”‚ ๐Ÿ‘ฅ Users โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 1. # Lobby โ”‚ [Message bubbles with โ”‚ ๐Ÿ‘ค You โ”‚ โ”‚ (5) โ€ข โ”‚ rounded borders] โ”‚ ๐Ÿ‘ฅ Other โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 2. # Room2 โ”‚ ๐Ÿ’ญ typing indicator... โ”‚ โ”‚ โ”‚ (2) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ”‚ ๐Ÿ’ฌ Type a message... โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` #### Responsive Design | ๋ฐ˜์‘ํ˜• ๋””์ž์ธ - **Wide terminals (80+ cols)**: Full 3-panel layout | ๋„“์€ ํ„ฐ๋ฏธ๋„: ์ „์ฒด 3ํŒจ๋„ - **Medium terminals (60-79 cols)**: 2-panel layout | ์ค‘๊ฐ„ ํ„ฐ๋ฏธ๋„: 2ํŒจ๋„ - **Small terminals (<60 cols)**: Single chat panel | ์ž‘์€ ํ„ฐ๋ฏธ๋„: ๋‹จ์ผ ์ฑ„ํŒ… ํŒจ๋„ ### Configuration | ์„ค์ • User data is automatically managed: ์‚ฌ์šฉ์ž ๋ฐ์ดํ„ฐ๋Š” ์ž๋™์œผ๋กœ ๊ด€๋ฆฌ๋ฉ๋‹ˆ๋‹ค: ```bash ~/.chat-cli/ โ”œโ”€โ”€ config.json # User preferences | ์‚ฌ์šฉ์ž ์„ค์ • โ””โ”€โ”€ user.json # User information | ์‚ฌ์šฉ์ž ์ •๋ณด ``` ## ๐Ÿ”ง Requirements | ์š”๊ตฌ์‚ฌํ•ญ - **Node.js** 22.14.0 or higher | 22.14.0 ์ด์ƒ - **Terminal** with color support and Unicode | ์ปฌ๋Ÿฌ ๋ฐ ์œ ๋‹ˆ์ฝ”๋“œ ์ง€์› ํ„ฐ๋ฏธ๋„ - **Network connection** for real-time features | ์‹ค์‹œ๊ฐ„ ๊ธฐ๋Šฅ์„ ์œ„ํ•œ ๋„คํŠธ์›Œํฌ ์—ฐ๊ฒฐ - **Minimum terminal size**: 60x15 characters | ์ตœ์†Œ ํ„ฐ๋ฏธ๋„ ํฌ๊ธฐ: 60x15 ๋ฌธ์ž ## ๐ŸŽจ Design Features | ๋””์ž์ธ ํŠน์ง• ### Modern UI Elements | ํ˜„๋Œ€์ ์ธ UI ์š”์†Œ - **๐ŸŽจ Color-coded elements** - Intuitive color system | ์ง๊ด€์ ์ธ ์ƒ‰์ƒ ์‹œ์Šคํ…œ - **๐Ÿ“ฑ Responsive layout** - Adapts to terminal size | ํ„ฐ๋ฏธ๋„ ํฌ๊ธฐ์— ๋งž์ถฐ ์ ์‘ - **๐Ÿ’ฌ Message bubbles** - Chat-app style message display | ์ฑ„ํŒ…์•ฑ ์Šคํƒ€์ผ ๋ฉ”์‹œ์ง€ ํ‘œ์‹œ - **๐Ÿ”ต Status indicators** - Visual connection and activity status | ์‹œ๊ฐ์  ์—ฐ๊ฒฐ ๋ฐ ํ™œ๋™ ์ƒํƒœ ํ‘œ์‹œ ### Typography & Icons | ํƒ€์ดํฌ๊ทธ๋ž˜ํ”ผ ๋ฐ ์•„์ด์ฝ˜ - **๐Ÿ“ Consistent typography** - Clear, readable text | ์ผ๊ด€๋œ ํƒ€์ดํฌ๊ทธ๋ž˜ํ”ผ - **๐ŸŽฏ Contextual icons** - Meaningful visual cues | ์˜๋ฏธ ์žˆ๋Š” ์‹œ๊ฐ์  ๋‹จ์„œ - **๐ŸŒˆ Gradient title** - Beautiful app branding | ์•„๋ฆ„๋‹ค์šด ์•ฑ ๋ธŒ๋žœ๋”ฉ ## ๐Ÿค Contributing | ๊ธฐ์—ฌํ•˜๊ธฐ We welcome contributions! Please feel free to submit a Pull Request. ๊ธฐ์—ฌ๋ฅผ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค! ์–ธ์ œ๋“ ์ง€ Pull Request๋ฅผ ์ œ์ถœํ•ด ์ฃผ์„ธ์š”. 1. Fork the repository | ์ €์žฅ์†Œ ํฌํฌ 2. Create your feature branch | ๊ธฐ๋Šฅ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ 3. Commit your changes | ๋ณ€๊ฒฝ์‚ฌํ•ญ ์ปค๋ฐ‹ 4. Push to the branch | ๋ธŒ๋žœ์น˜์— ํ‘ธ์‹œ 5. Open a Pull Request | Pull Request ์—ด๊ธฐ ## ๐Ÿ“„ License | ๋ผ์ด์„ ์Šค This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ์ด ํ”„๋กœ์ ํŠธ๋Š” MIT ๋ผ์ด์„ ์Šค ํ•˜์— ๋ฐฐํฌ๋ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ [LICENSE](LICENSE) ํŒŒ์ผ์„ ์ฐธ์กฐํ•˜์„ธ์š”. ## ๐Ÿ“ˆ Version History | ๋ฒ„์ „ ๊ธฐ๋ก ### Latest Updates (v1.4.8+) | ์ตœ์‹  ์—…๋ฐ์ดํŠธ - **๐ŸŽจ UI/UX Improvements** | UI/UX ๊ฐœ์„  - Rounded borders for all UI components | ๋ชจ๋“  UI ์ปดํฌ๋„ŒํŠธ์— ๋‘ฅ๊ทผ ํ…Œ๋‘๋ฆฌ - Enhanced visual consistency | ํ–ฅ์ƒ๋œ ์‹œ๊ฐ์  ์ผ๊ด€์„ฑ - Better responsive design | ๊ฐœ์„ ๋œ ๋ฐ˜์‘ํ˜• ๋””์ž์ธ - **โšก Performance Enhancements** | ์„ฑ๋Šฅ ํ–ฅ์ƒ - Optimized input handling | ์ตœ์ ํ™”๋œ ์ž…๋ ฅ ์ฒ˜๋ฆฌ - Improved WebSocket management | ๊ฐœ์„ ๋œ WebSocket ๊ด€๋ฆฌ - Better memory usage | ํ–ฅ์ƒ๋œ ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ๋Ÿ‰ - **๐Ÿ”ง Technical Improvements** | ๊ธฐ์ˆ ์  ๊ฐœ์„  - Simplified input processing | ๋‹จ์ˆœํ™”๋œ ์ž…๋ ฅ ์ฒ˜๋ฆฌ - Enhanced error handling | ํ–ฅ์ƒ๋œ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ - Better code organization | ๊ฐœ์„ ๋œ ์ฝ”๋“œ ๊ตฌ์กฐ ## โ˜• Support | ํ›„์› If you find this project helpful, consider buying me a coffee! Your support helps keep this project alive and enables continuous improvements. ์ด ํ”„๋กœ์ ํŠธ๊ฐ€ ๋„์›€์ด ๋˜์…จ๋‹ค๋ฉด ์ปคํ”ผ ํ•œ ์ž” ์‚ฌ์ฃผ์„ธ์š”! ์—ฌ๋Ÿฌ๋ถ„์˜ ํ›„์›์€ ์ด ํ”„๋กœ์ ํŠธ๋ฅผ ์ง€์†์‹œํ‚ค๊ณ  ์ง€์†์ ์ธ ๊ฐœ์„ ์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค. <div align="center"> [![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/tastekim) **[โ˜• Buy me a coffee](https://buymeacoffee.com/tastekim)** *Your generous support is greatly appreciated! | ์—ฌ๋Ÿฌ๋ถ„์˜ ๋„ˆ๊ทธ๋Ÿฌ์šด ํ›„์›์— ๊นŠ์ด ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค!* </div> --- <div align="center"> **Made with โค๏ธ by [tastekim](https://github.com/tastekim)** *Chat CLI - Bringing conversations to your terminal | Chat CLI - ๋Œ€ํ™”๋ฅผ ํ„ฐ๋ฏธ๋„๋กœ* </div>