@naarang/ccc 1.0.15 → 1.1.0-beta.2

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 CHANGED
@@ -20,12 +20,20 @@ CCC is a powerful CLI tool that creates a bridge between [Claude Code](https://c
20
20
  <a href="https://play.google.com/store/apps/details?id=com.naarang.ccc">
21
21
  <img src="https://firebasestorage.googleapis.com/v0/b/cc-chat-ui.firebasestorage.app/o/GetItOnGooglePlay_Badge_Web_color_English.png?alt=media&token=d2f34558-ce96-4882-9225-8ded76f759ba" alt="Get it on Google Play" height="80">
22
22
  </a>
23
+ <br/>
24
+ <a href="https://play.google.com/apps/testing/com.naarang.ccc">
25
+ <sub>Join Android Beta Testing</sub>
26
+ </a>
23
27
  </p>
24
28
 
25
29
  <p align="center">
26
30
  <a href="https://apps.apple.com/in/app/ccc-ui-for-coding-agents/id6753870766">
27
31
  <img src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" alt="Download on the App Store" height="80">
28
32
  </a>
33
+ <br/>
34
+ <a href="https://testflight.apple.com/join/bEVNMrNH">
35
+ <sub>Join iOS Beta Testing (TestFlight)</sub>
36
+ </a>
29
37
  </p>
30
38
 
31
39
  ## ✨ Features
@@ -33,6 +41,7 @@ CCC is a powerful CLI tool that creates a bridge between [Claude Code](https://c
33
41
  - **Mobile Control** - Chat with Claude from your phone or tablet
34
42
  - **Real-time Sync** - See Claude's responses instantly on your device
35
43
  - **Smart Permission System** - Fine-grained control over code modifications
44
+ - **Web Terminal Access** 🆕 (Beta) - Full terminal access in mobile app with authentication
36
45
  - **Remote Access** - Optional ngrok integration for access from anywhere
37
46
  - **Secure MQTT** - Built-in MQTT broker with authentication support
38
47
  - **Session Management** - Persistent sessions across reconnections
@@ -66,10 +75,14 @@ ccc
66
75
 
67
76
  The server will start and display:
68
77
  ```
69
- ✓ Claude Chat Backend v1.0.5 started successfully
78
+ ✓ Claude Chat Backend v1.1.0 started successfully
70
79
 
71
80
  Server URLs (Add one of these in the app settings):
72
- Local: 192.168.1.100:8883
81
+ Localhost: localhost:8080
82
+ Network: 192.168.1.100:8080
83
+
84
+ Services:
85
+ MQTT: Port 8883 (via /mqtt)
73
86
  ```
74
87
 
75
88
  ### 2. Configure the Mobile App
@@ -99,15 +112,20 @@ Open the app, create a project pointing to your local directory, and start chatt
99
112
  ccc [options]
100
113
 
101
114
  Options:
102
- --debug Enable debug logging
103
- -u, --username <user> MQTT broker username
104
- -p, --password <pass> MQTT broker password
105
- --port <port> MQTT broker port (default: 8883)
106
- -t, --ngrok-token <token> ngrok auth token (enables public tunnel)
107
- --ngrok-domain <domain> ngrok static domain
108
- --no-auto-update Disable automatic updates (enabled by default)
109
- -v, --version Show version number
110
- -h, --help Show help message
115
+ --debug Enable debug logging
116
+ -u, --username <user> MQTT broker username
117
+ -p, --password <pass> MQTT broker password
118
+ --mqtt-port <port> Internal MQTT broker port (default: 8883)
119
+ --port <port> [DEPRECATED] Use --mqtt-port instead
120
+ --router-port <port> Router port for ngrok (default: 8080)
121
+ --terminal-port <port> Internal terminal server port (default: 3001)
122
+ --terminal-username <user> Terminal authentication username (enables terminal)
123
+ --terminal-password <pass> Terminal authentication password (enables terminal)
124
+ -t, --ngrok-token <token> ngrok auth token (enables public tunnel)
125
+ --ngrok-domain <domain> ngrok static domain
126
+ --no-auto-update Disable automatic updates (enabled by default)
127
+ -v, --version Show version number
128
+ -h, --help Show help message
111
129
  ```
112
130
 
113
131
  > **Auto-Update**: By default, CCC checks for updates on startup and automatically downloads the latest version. After a successful update, you'll be prompted to manually restart the server. Use `--no-auto-update` to disable this behavior.
@@ -124,19 +142,26 @@ ccc
124
142
  ccc -u admin -p secret
125
143
  ```
126
144
 
145
+ **With terminal access (Beta):**
146
+ ```bash
147
+ ccc --terminal-username admin --terminal-password secret
148
+ ```
149
+
127
150
  **With ngrok for remote access:**
128
151
  ```bash
129
152
  ccc --ngrok-token YOUR_NGROK_TOKEN
130
153
  ```
131
154
 
132
- **Custom port with debug logging:**
155
+ **Full example with ngrok, authentication, and terminal:**
133
156
  ```bash
134
- ccc --port 9000 --debug
157
+ ccc --ngrok-token YOUR_TOKEN \
158
+ --terminal-username admin \
159
+ --terminal-password secret
135
160
  ```
136
161
 
137
- **Full example with ngrok and authentication:**
162
+ **Custom ports with debug logging:**
138
163
  ```bash
139
- ccc -u admin -p secret -t YOUR_TOKEN --ngrok-domain myapp.ngrok.app
164
+ ccc --mqtt-port 9000 --terminal-port 3002 --debug
140
165
  ```
141
166
 
142
167
  ### Environment Variables
@@ -144,15 +169,126 @@ ccc -u admin -p secret -t YOUR_TOKEN --ngrok-domain myapp.ngrok.app
144
169
  Create a `.env` file in your working directory:
145
170
 
146
171
  ```env
172
+ # MQTT Configuration
147
173
  MQTT_BROKER_PORT=8883
148
174
  MQTT_USERNAME=your-username
149
175
  MQTT_PASSWORD=your-password
176
+
177
+ # Router Configuration
178
+ ROUTER_PORT=8080
179
+
180
+ # Terminal Configuration (Beta)
181
+ TERMINAL_PORT=3001
182
+ TERMINAL_USERNAME=your-terminal-username
183
+ TERMINAL_PASSWORD=your-terminal-password
184
+
185
+ # Ngrok Configuration
150
186
  NGROK_AUTH_TOKEN=your-ngrok-token
151
187
  NGROK_DOMAIN=your-custom-domain.ngrok.app
152
188
  ```
153
189
 
154
190
  > **Note:** CLI arguments override environment variables
155
191
 
192
+ ## 🖥️ Terminal Access (Beta)
193
+
194
+ CCC now includes a built-in web terminal that can be accessed directly from the mobile app. This feature is currently in **beta** and provides full terminal access to your development environment.
195
+
196
+ ### Enabling Terminal Access
197
+
198
+ Terminal access is **opt-in** for security reasons. To enable it, you must provide authentication credentials:
199
+
200
+ ```bash
201
+ ccc --terminal-username admin --terminal-password your-secure-password
202
+ ```
203
+
204
+ Or via environment variables:
205
+ ```env
206
+ TERMINAL_USERNAME=admin
207
+ TERMINAL_PASSWORD=your-secure-password
208
+ ```
209
+
210
+ ### How It Works
211
+
212
+ 1. **Architecture:**
213
+ - Internal terminal server runs on port 3001 (localhost only)
214
+ - Proxied through the main router on `/terminal` path
215
+ - Full terminal emulation with bash/powershell support
216
+
217
+ 2. **Security Features:**
218
+ - Basic authentication required for all connections
219
+ - Rate limiting: max 5 failed auth attempts (15-minute IP block)
220
+ - Session limit: maximum 5 concurrent terminals
221
+ - Bound to localhost only (never exposed directly)
222
+ - All connections must go through authenticated router
223
+
224
+ 3. **Mobile Integration:**
225
+ - Terminal embedded in mobile app
226
+ - Auto-configures when credentials are provided
227
+ - **Automatic authentication** - App automatically authenticates with terminal (no manual login needed)
228
+ - Project path updates automatically when switching projects
229
+ - Starts in your project directory by default
230
+
231
+ ### Terminal Features
232
+
233
+ - ✅ Full terminal emulation
234
+ - ✅ Color support and ANSI escape sequences
235
+ - ✅ Responsive design (works on mobile)
236
+ - ✅ Multiple concurrent sessions
237
+ - ✅ Automatic resize on orientation change
238
+ - ✅ Custom theme matching app design
239
+ - ✅ Scrollback history
240
+
241
+ ### Usage from Mobile App
242
+
243
+ Once enabled on the backend:
244
+ 1. Open CCC mobile app
245
+ 2. Navigate to project settings
246
+ 3. Terminal tab will appear automatically
247
+ 4. Tap to open full-screen terminal
248
+ 5. Terminal opens directly in your project directory
249
+ 6. Use on-screen keyboard or external keyboard
250
+
251
+ ### Security Best Practices
252
+
253
+ ⚠️ **Important Security Notes:**
254
+
255
+ 1. **Use Strong Passwords:** Terminal gives full shell access
256
+ ```bash
257
+ # Generate a secure password
258
+ openssl rand -base64 32
259
+ ```
260
+
261
+ 2. **Combine with ngrok Authentication:** For remote access
262
+ ```bash
263
+ ccc --ngrok-token YOUR_TOKEN \
264
+ --terminal-username admin \
265
+ --terminal-password $(openssl rand -base64 32)
266
+ ```
267
+
268
+ 3. **Monitor Active Sessions:** Check logs for suspicious activity
269
+ ```bash
270
+ ccc --debug # Enable detailed logging
271
+ ```
272
+
273
+ 4. **Restrict Network Access:** Only use on trusted networks or via ngrok
274
+
275
+ ### Troubleshooting Terminal
276
+
277
+ **Terminal won't connect:**
278
+ - Verify credentials are correct
279
+ - Check logs with `--debug` flag
280
+ - Ensure port 3001 is not in use
281
+
282
+ **Authentication failures:**
283
+ - Check for IP blocking (max 5 failed attempts)
284
+ - Wait 15 minutes if blocked
285
+ - Restart server to clear blocks
286
+
287
+ **Terminal not showing in app:**
288
+ - Ensure terminal credentials are set on backend
289
+ - Restart the mobile app
290
+ - Check app settings for terminal configuration
291
+
156
292
  ## Permission Modes
157
293
 
158
294
  CCC offers four permission modes to balance convenience and security:
@@ -182,11 +318,14 @@ CCC offers four permission modes to balance convenience and security:
182
318
 
183
319
  When you start CCC, it:
184
320
 
185
- 1. **Starts MQTT Broker** - Embedded broker on port 8883 (WebSocket)
186
- 2. **Sets Up Projects** - Auto-configures permission hooks
187
- 3. **Manages Sessions** - Persistent sessions across disconnects
188
- 4. **Streams Responses** - Real-time Claude responses to mobile
189
- 5. **Handles Permissions** - Smart permission checks based on mode
321
+ 1. **Starts MQTT Broker** - Embedded broker on port 8883 (localhost)
322
+ 2. **Starts Path Router** - HTTP router on port 8080 proxying MQTT and terminal
323
+ 3. **Starts Terminal Server** (Optional) - Web terminal on port 3001 if credentials provided
324
+ 4. **Sets Up ngrok Tunnel** (Optional) - Public URL pointing to router
325
+ 5. **Sets Up Projects** - Auto-configures permission hooks
326
+ 6. **Manages Sessions** - Persistent sessions across disconnects
327
+ 7. **Streams Responses** - Real-time Claude responses to mobile
328
+ 8. **Handles Permissions** - Smart permission checks based on mode
190
329
 
191
330
  ### Project Structure
192
331
 
@@ -213,18 +352,27 @@ The CCC mobile app is required to interact with the backend.
213
352
  <a href="https://play.google.com/store/apps/details?id=com.naarang.ccc">
214
353
  <img src="https://firebasestorage.googleapis.com/v0/b/cc-chat-ui.firebasestorage.app/o/GetItOnGooglePlay_Badge_Web_color_English.png?alt=media&token=d2f34558-ce96-4882-9225-8ded76f759ba" alt="Get it on Google Play" height="80">
215
354
  </a>
355
+ <br/>
356
+ <a href="https://play.google.com/apps/testing/com.naarang.ccc">
357
+ <sub>Join Android Beta Testing</sub>
358
+ </a>
216
359
  </p>
217
360
 
218
361
  <p align="center">
219
362
  <a href="https://apps.apple.com/in/app/ccc-ui-for-coding-agents/id6753870766">
220
363
  <img src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" alt="Download on the App Store" height="80">
221
364
  </a>
365
+ <br/>
366
+ <a href="https://testflight.apple.com/join/bEVNMrNH">
367
+ <sub>Join iOS Beta Testing (TestFlight)</sub>
368
+ </a>
222
369
  </p>
223
370
 
224
371
  ### Features
225
372
  - Multiple project management
226
373
  - Real-time chat interface
227
374
  - Permission request handling
375
+ - Integrated web terminal (Beta) - when enabled on backend
228
376
  - Server profile management
229
377
  - Connection health monitoring
230
378
  - Theme support (light/dark)
@@ -263,7 +411,7 @@ ccc --port 9000
263
411
  **Checklist:**
264
412
  1. Check you're on the same WiFi network (for local)
265
413
  2. Verify server is running (`ccc` should show "started successfully")
266
- 3. Check firewall settings allow port 8883
414
+ 3. Check firewall settings allow port 8080 (router) and 8883 (MQTT)
267
415
  4. Use correct format: `hostname:port` (no `http://`)
268
416
  5. Enable debug mode: `ccc --debug`
269
417
 
@@ -335,38 +483,4 @@ Make quick code changes without opening your laptop.
335
483
  Learn coding concepts by chatting with Claude from mobile.
336
484
 
337
485
  ### Pair Programming
338
- Collaborate with Claude on coding tasks remotely.
339
-
340
- ## Comparison
341
-
342
- ### vs Claude Web
343
- - ✅ Mobile access
344
- - ✅ Offline project access
345
- - ✅ Real-time streaming
346
- - ✅ Local file system access
347
-
348
- ### vs Claude Desktop
349
- - ✅ Mobile control
350
- - ✅ Remote access
351
- - ✅ Multi-device support
352
- - ✅ Session persistence
353
-
354
- ## Performance
355
-
356
- - **Startup Time**: ~2 seconds
357
- - **Response Latency**: <100ms (local network)
358
- - **Concurrent Sessions**: Unlimited
359
- - **Memory Usage**: ~150MB (varies with active sessions)
360
-
361
- ## Support & Community
362
-
363
- - **Issues**: Report bugs and request features
364
- - **Discussions**: Ask questions and share ideas
365
- - **Updates**: Check npm for latest version
366
- - **Contact**: Email us at cccuiapp@gmail.com
367
-
368
- **Made with ❤️ by naarang**
369
-
370
- > **Note**: This tool requires an active Claude subscription and Claude Code to function properly.
371
-
372
- **Get Started:** `npm install -g @naarang/ccc && ccc`
486
+ Co @naarang/ccc && ccc`