cheatchat 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# CheatChat
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/cheatchat)
|
|
6
|
+
[]()
|
|
7
|
+
|
|
8
|
+
**A minimal, blazing-fast terminal chat app powered by AWS Serverless & Gemini AI.**
|
|
9
|
+
|
|
10
|
+
<img src="assets/cheatchatlogo.png" alt="CheatChat Logo" width="500" />
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Why CheatChat?
|
|
17
|
+
|
|
18
|
+
- **Lightweight:** Runs entirely in your terminal with zero visual bloat.
|
|
19
|
+
- **Fast:** Powered by AWS WebSockets for real-time, low-latency communication.
|
|
20
|
+
- **Terminal-First:** Designed for developers who live in the command line.
|
|
21
|
+
- **Serverless Backend:** Highly scalable, pay-per-use architecture leveraging AWS Lambda and DynamoDB.
|
|
22
|
+
- **Easy Installation:** Get started in seconds with a single curl command or npm.
|
|
23
|
+
- **AI Integration:** Built-in Google Gemini AI for terminal-based chatting and autonomous code file solving.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Screenshots
|
|
28
|
+
|
|
29
|
+
> real-time terminal global chatting
|
|
30
|
+
|
|
31
|
+

|
|
32
|
+
|
|
33
|
+
> Private messaging
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
> Brainstorming with Gemini AI in the terminal
|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
There are two ways to install the CheatChat CLI on your machine.
|
|
46
|
+
|
|
47
|
+
### Method 1: Install using `install.sh` (Recommended)
|
|
48
|
+
|
|
49
|
+
The absolute quickest way to get started. This script automatically configures your npm global directory (to prevent permission errors) and installs the package.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
curl -fsSL https://raw.githubusercontent.com/ramoliyaYug/cheatChat/main/install.sh | bash
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Method 2: Install from npm
|
|
56
|
+
|
|
57
|
+
**Global Installation (Available anywhere in your terminal):**
|
|
58
|
+
```bash
|
|
59
|
+
npm install -g cheatchat
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Local Installation (Available only in the current project directory):**
|
|
63
|
+
```bash
|
|
64
|
+
npm install cheatchat
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
## Features
|
|
69
|
+
|
|
70
|
+
- User Authentication
|
|
71
|
+
- JWT Session Management
|
|
72
|
+
- Global Chat
|
|
73
|
+
- Private Messaging
|
|
74
|
+
- Chat History Retention
|
|
75
|
+
- Online Users Tracking
|
|
76
|
+
- Complete User Directory
|
|
77
|
+
- Interactive AI Chat
|
|
78
|
+
- AI Autonomous File Solver
|
|
79
|
+
- Serverless Cloud Backend
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Getting Started
|
|
84
|
+
|
|
85
|
+
Once installed, follow these steps to jump into the chat:
|
|
86
|
+
|
|
87
|
+
1. **Create an account:**
|
|
88
|
+
```bash
|
|
89
|
+
chat signup
|
|
90
|
+
```
|
|
91
|
+
2. **Log in:**
|
|
92
|
+
```bash
|
|
93
|
+
chat login
|
|
94
|
+
```
|
|
95
|
+
3. **Connect to the live chat server:**
|
|
96
|
+
```bash
|
|
97
|
+
chat connect
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Once connected, you will immediately enter the **Global chat** room, From there, you can easily switch to **Private messaging**, or exit to use our **AI tools**.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## CLI Commands
|
|
105
|
+
|
|
106
|
+
Outside of the active chat interface, the following commands are available in your terminal:
|
|
107
|
+
|
|
108
|
+
| Command | Description |
|
|
109
|
+
|---|---|
|
|
110
|
+
| `chat signup` | Create a new CheatChat account interactively. |
|
|
111
|
+
| `chat login` | Authenticate and securely store your session locally. |
|
|
112
|
+
| `chat logout` | Destroy your local session and clear credentials. |
|
|
113
|
+
| `chat whoami` | Display your current authenticated user profile. |
|
|
114
|
+
| `chat connect` | Connect to the WebSocket server and enter interactive chat mode. |
|
|
115
|
+
| `chat ai` | Start an interactive AI conversation directly in your terminal. |
|
|
116
|
+
| `chat solve <file>` | Automatically send a source file to Gemini AI to fix bugs or optimize code, then overwrite it. |
|
|
117
|
+
| `chat help` | Display the CLI help menu and command reference. |
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Chat Mode Commands
|
|
122
|
+
|
|
123
|
+
Once you run `chat connect` and enter the interactive terminal UI, you can use these slash commands:
|
|
124
|
+
|
|
125
|
+
| Command | Description |
|
|
126
|
+
|---|---|
|
|
127
|
+
| `/global` | Switch your current view and sending target to the Global chat room. |
|
|
128
|
+
| `/dm <username>` | Switch to a direct, private conversation with a specific user. |
|
|
129
|
+
| `/history` | Manually reload the message history for your current active chat. |
|
|
130
|
+
| `/users` | Display a complete list of every registered CheatChat user. |
|
|
131
|
+
| `/online` | Display a list of users currently connected to the WebSocket server. |
|
|
132
|
+
| `/help` | Display the in-chat help menu. |
|
|
133
|
+
| `/exit` | Safely sever the WebSocket connection and return to your standard terminal. |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## AI Features
|
|
138
|
+
|
|
139
|
+
CheatChat integrates with Google's **Gemini AI** to boost developer productivity without leaving the terminal.
|
|
140
|
+
|
|
141
|
+
### Interactive AI Chat
|
|
142
|
+
```bash
|
|
143
|
+
chat ai
|
|
144
|
+
```
|
|
145
|
+
Entering this command opens a dedicated, interactive AI chat prompt. You can ask questions, get code explanations, or brainstorm ideas. Type `exit` to leave the AI chat.
|
|
146
|
+
|
|
147
|
+
### AI File Solver
|
|
148
|
+
```bash
|
|
149
|
+
chat solve app.js
|
|
150
|
+
```
|
|
151
|
+
This powerful command reads the specified local file, sends the entire content to Gemini AI with instructions to fix bugs and optimize code, and safely **overwrites the original file** with the AI's improved output.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Technologies
|
|
156
|
+
|
|
157
|
+
CheatChat is built using modern serverless cloud infrastructure and a robust Node.js CLI.
|
|
158
|
+
|
|
159
|
+
**Backend**
|
|
160
|
+
* AWS Lambda
|
|
161
|
+
* API Gateway (REST)
|
|
162
|
+
* API Gateway (WebSocket)
|
|
163
|
+
* DynamoDB
|
|
164
|
+
* Node.js / JavaScript
|
|
165
|
+
* JWT (JSON Web Tokens)
|
|
166
|
+
* bcrypt
|
|
167
|
+
* Gemini AI (Google)
|
|
168
|
+
|
|
169
|
+
**CLI Client**
|
|
170
|
+
* Node.js
|
|
171
|
+
* Commander
|
|
172
|
+
* Axios
|
|
173
|
+
* WebSocket (`ws`)
|
|
174
|
+
* Chalk
|
|
175
|
+
* Ora
|
|
176
|
+
* Inquirer
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Architecture
|
|
181
|
+
|
|
182
|
+
CheatChat leverages a completely serverless AWS architecture, ensuring it scales instantly and costs nothing when idle.
|
|
183
|
+
|
|
184
|
+
<img src="architecture/overview.excalidraw.png" height="400">
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Documentation
|
|
189
|
+
|
|
190
|
+
If you are interested in understanding its internal mechanics, check out these files:
|
|
191
|
+
|
|
192
|
+
- **`README.md`**: You are here! High-level overview and usage instructions.
|
|
193
|
+
- **`backend/src/apiDocumentation.md`**: Complete API specifications for both REST and WebSocket endpoints, including Postman testing guides.
|
|
194
|
+
- **`architecture/overview.excalidraw.png`**: A visual overview of the architecture.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
<div align="center">
|
|
198
|
+
<b>Built with ❤️ for the terminal.</b>
|
|
199
|
+
</div>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/utils/constants.js
CHANGED
|
@@ -6,7 +6,7 @@ export const WS_API_URL = "wss://lhyew4zkm2.execute-api.ap-south-1.amazonaws.com
|
|
|
6
6
|
// ─── App Metadata ────────────────────────────────────────────────────────────
|
|
7
7
|
|
|
8
8
|
export const APP_NAME = "CheatChat";
|
|
9
|
-
export const APP_VERSION = "1.
|
|
9
|
+
export const APP_VERSION = "1.2.3";
|
|
10
10
|
export const APP_DESCRIPTION = "A minimal terminal chat app powered by AWS.";
|
|
11
11
|
|
|
12
12
|
// ─── Chat Modes ──────────────────────────────────────────────────────────────
|