@naarang/ccc 1.1.0-beta.7 → 1.1.0
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 +73 -96
- package/dist/claude/manager.js +1 -1
- package/dist/claude/project-setup.js +1 -1
- package/dist/claude/session.js +1 -1
- package/dist/claude/stream-parser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mqtt/client.js +1 -1
- package/dist/mqtt-broker.js +1 -1
- package/dist/ngrok/manager.js +1 -1
- package/dist/proxy/router.js +1 -1
- package/dist/terminal/server.js +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/auto-update.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ CCC is a powerful CLI tool that creates a bridge between [Claude Code](https://c
|
|
|
7
7
|
[](https://www.npmjs.com/package/@naarang/ccc)
|
|
8
8
|
[](https://nodejs.org)
|
|
9
9
|
|
|
10
|
-
.png?alt=media&token=1541cc51-0a24-4055-b73f-81e181217f53)
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<img src="https://firebasestorage.googleapis.com/v0/b/cc-chat-ui.firebasestorage.app/o/Projects.jpg?alt=media&token=098ed213-ed4a-4e22-9447-4cd097e9f485" width="150" />
|
|
@@ -36,17 +36,26 @@ CCC is a powerful CLI tool that creates a bridge between [Claude Code](https://c
|
|
|
36
36
|
</a>
|
|
37
37
|
</p>
|
|
38
38
|
|
|
39
|
+
<p align="center">
|
|
40
|
+
<a href="https://discord.gg/9EjE8t4YCF">
|
|
41
|
+
<img src="https://img.shields.io/badge/Discord-Join%20Server-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join our Discord">
|
|
42
|
+
</a>
|
|
43
|
+
</p>
|
|
44
|
+
|
|
39
45
|
## ✨ Features
|
|
40
46
|
|
|
41
47
|
- **Mobile Control** - Chat with Claude from your phone or tablet
|
|
42
48
|
- **Real-time Sync** - See Claude's responses instantly on your device
|
|
43
49
|
- **Smart Permission System** - Fine-grained control over code modifications
|
|
44
|
-
- **Web Terminal Access** 🆕 (Beta) - Full terminal access
|
|
50
|
+
- **Web Terminal Access** 🆕 (Beta) - Full terminal access with auto-generated secure credentials
|
|
51
|
+
- **Request Cancellation** 🆕 - Abort ongoing Claude requests from mobile app
|
|
52
|
+
- **Dynamic Project Switching** 🆕 - Terminal automatically changes directory when switching projects
|
|
45
53
|
- **Remote Access** - Optional ngrok integration for access from anywhere
|
|
46
|
-
- **Secure MQTT** - Built-in MQTT broker with authentication support
|
|
54
|
+
- **Secure MQTT** - Built-in MQTT broker with authentication support (required for ngrok)
|
|
47
55
|
- **Session Management** - Persistent sessions across reconnections
|
|
48
56
|
- **Context Awareness** - Full project context and file system access
|
|
49
57
|
- **Auto Hook Setup** - Automatic project configuration for permission handling
|
|
58
|
+
- **Auto-Update System** 🆕 - Automatic version checks and updates (can be disabled)
|
|
50
59
|
|
|
51
60
|
## Installation
|
|
52
61
|
|
|
@@ -75,14 +84,19 @@ ccc
|
|
|
75
84
|
|
|
76
85
|
The server will start and display:
|
|
77
86
|
```
|
|
78
|
-
✓
|
|
79
|
-
|
|
87
|
+
✓ Terminal server started on localhost:3001
|
|
88
|
+
✓ Path router started on port 8883
|
|
89
|
+
✓ Claude Chat Backend v1.1.x started successfully
|
|
90
|
+
|
|
80
91
|
Server URLs (Add one of these in the app settings):
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
Localhost: localhost:8883
|
|
93
|
+
Network: 192.168.1.135:8883
|
|
94
|
+
|
|
84
95
|
Services:
|
|
85
|
-
|
|
96
|
+
MQTT: Port 8884 (via /mqtt)
|
|
97
|
+
Terminal: Port 3001 (via /terminal) - Auto-secured
|
|
98
|
+
|
|
99
|
+
MQTT Auth: Enabled
|
|
86
100
|
```
|
|
87
101
|
|
|
88
102
|
### 2. Configure the Mobile App
|
|
@@ -91,7 +105,7 @@ Download the CCC mobile app and add the server connection:
|
|
|
91
105
|
|
|
92
106
|
**For Local Network:**
|
|
93
107
|
```
|
|
94
|
-
Server URL: 192.168.
|
|
108
|
+
Server URL: 192.168.x.xxx:8883
|
|
95
109
|
```
|
|
96
110
|
|
|
97
111
|
**For Remote Access:**
|
|
@@ -113,19 +127,19 @@ ccc [options]
|
|
|
113
127
|
|
|
114
128
|
Options:
|
|
115
129
|
--debug Enable debug logging
|
|
116
|
-
-u, --username <user> MQTT broker username
|
|
117
|
-
-p, --password <pass> MQTT broker password
|
|
130
|
+
-u, --username <user> MQTT broker username (required for ngrok)
|
|
131
|
+
-p, --password <pass> MQTT broker password (required for ngrok)
|
|
118
132
|
--mqtt-port <port> Internal MQTT broker port (default: 8884)
|
|
119
133
|
--port <port> [DEPRECATED] Use --mqtt-port instead
|
|
120
134
|
--router-port <port> Internal Request Router port. This is what the app connects to (default: 8883)
|
|
121
135
|
--terminal-port <port> Internal terminal server port (default: 3001)
|
|
122
|
-
--
|
|
123
|
-
--terminal-password <pass> Terminal authentication password
|
|
124
|
-
-t, --ngrok-token <token> ngrok auth token (enables public tunnel)
|
|
136
|
+
-t, --ngrok-token <token> ngrok auth token (enables public tunnel, requires MQTT auth)
|
|
125
137
|
--ngrok-domain <domain> ngrok static domain
|
|
126
138
|
--no-auto-update Disable automatic updates (enabled by default)
|
|
127
139
|
-v, --version Show version number
|
|
128
140
|
-h, --help Show help message
|
|
141
|
+
|
|
142
|
+
Note: Terminal credentials are automatically generated and cannot be configured manually.
|
|
129
143
|
```
|
|
130
144
|
|
|
131
145
|
> **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.
|
|
@@ -144,11 +158,12 @@ ccc -u admin -p secret
|
|
|
144
158
|
|
|
145
159
|
**With terminal access (Beta):**
|
|
146
160
|
```bash
|
|
147
|
-
#
|
|
148
|
-
|
|
161
|
+
# Terminal credentials are automatically generated
|
|
162
|
+
# No configuration needed - just start the server
|
|
163
|
+
ccc
|
|
149
164
|
|
|
150
|
-
#
|
|
151
|
-
|
|
165
|
+
# Terminal credentials are broadcast to authorized clients via MQTT
|
|
166
|
+
# App receives credentials automatically on connection
|
|
152
167
|
```
|
|
153
168
|
|
|
154
169
|
**With ngrok for remote access:**
|
|
@@ -156,11 +171,13 @@ ccc -u admin -p secret # Terminal will also use these credentials
|
|
|
156
171
|
ccc --ngrok-token YOUR_NGROK_TOKEN
|
|
157
172
|
```
|
|
158
173
|
|
|
159
|
-
**Full example with ngrok
|
|
174
|
+
**Full example with ngrok and authentication:**
|
|
160
175
|
```bash
|
|
176
|
+
# Terminal credentials auto-generated
|
|
177
|
+
# MQTT authentication required for ngrok
|
|
161
178
|
ccc --ngrok-token YOUR_TOKEN \
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
-u admin \
|
|
180
|
+
-p secret
|
|
164
181
|
```
|
|
165
182
|
|
|
166
183
|
**Custom ports with debug logging:**
|
|
@@ -168,29 +185,6 @@ ccc --ngrok-token YOUR_TOKEN \
|
|
|
168
185
|
ccc --mqtt-port 9000 --terminal-port 3002 --debug
|
|
169
186
|
```
|
|
170
187
|
|
|
171
|
-
### Environment Variables
|
|
172
|
-
|
|
173
|
-
Create a `.env` file in your working directory:
|
|
174
|
-
|
|
175
|
-
```env
|
|
176
|
-
# MQTT Configuration
|
|
177
|
-
MQTT_BROKER_PORT=8884
|
|
178
|
-
MQTT_USERNAME=your-username
|
|
179
|
-
MQTT_PASSWORD=your-password
|
|
180
|
-
|
|
181
|
-
# Router Configuration
|
|
182
|
-
ROUTER_PORT=8883
|
|
183
|
-
|
|
184
|
-
# Terminal Configuration (Beta)
|
|
185
|
-
TERMINAL_PORT=3001
|
|
186
|
-
|
|
187
|
-
# Ngrok Configuration (requires MQTT authentication)
|
|
188
|
-
NGROK_AUTH_TOKEN=your-ngrok-token
|
|
189
|
-
NGROK_DOMAIN=your-custom-domain.ngrok.app
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
> **Note:** CLI arguments override environment variables
|
|
193
|
-
|
|
194
188
|
## 🖥️ Terminal Access (Beta)
|
|
195
189
|
|
|
196
190
|
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.
|
|
@@ -198,14 +192,15 @@ CCC now includes a built-in web terminal that can be accessed directly from the
|
|
|
198
192
|
### Security Model
|
|
199
193
|
|
|
200
194
|
**Terminal credentials are automatically generated** for maximum security. The terminal server:
|
|
201
|
-
- ✅ **Auto-generates strong credentials** on startup
|
|
195
|
+
- ✅ **Auto-generates strong credentials** on startup
|
|
202
196
|
- ✅ **Always enabled** - no configuration needed
|
|
203
197
|
- ✅ **Credentials shared securely** via MQTT to authorized clients only
|
|
204
198
|
- ❌ **Not user-configurable** - prevents weak passwords
|
|
199
|
+
- 🔄 **Auto-broadcast on connection** - clients receive credentials automatically
|
|
205
200
|
|
|
206
201
|
**MQTT Authentication** is separate and optional:
|
|
207
202
|
- ✅ **Optional for localhost** - no auth needed for local development
|
|
208
|
-
- ⚠️ **Required for ngrok tunnels** - protects public endpoints
|
|
203
|
+
- ⚠️ **Required for ngrok tunnels** - protects public endpoints (enforced at startup)
|
|
209
204
|
|
|
210
205
|
### How It Works
|
|
211
206
|
|
|
@@ -225,7 +220,7 @@ CCC now includes a built-in web terminal that can be accessed directly from the
|
|
|
225
220
|
- Terminal embedded in mobile app
|
|
226
221
|
- Auto-configures when credentials are provided
|
|
227
222
|
- **Automatic authentication** - App automatically authenticates with terminal (no manual login needed)
|
|
228
|
-
-
|
|
223
|
+
- **Dynamic path updates** - Terminal working directory changes automatically when switching projects via MQTT
|
|
229
224
|
- Starts in your project directory by default
|
|
230
225
|
|
|
231
226
|
### Terminal Features
|
|
@@ -233,17 +228,19 @@ CCC now includes a built-in web terminal that can be accessed directly from the
|
|
|
233
228
|
- ✅ Full terminal emulation
|
|
234
229
|
- ✅ Color support and ANSI escape sequences
|
|
235
230
|
- ✅ Responsive design (works on mobile)
|
|
236
|
-
- ✅ Multiple concurrent sessions
|
|
231
|
+
- ✅ Multiple concurrent sessions (max 5)
|
|
237
232
|
- ✅ Automatic resize on orientation change
|
|
238
233
|
- ✅ Custom theme matching app design
|
|
239
234
|
- ✅ Scrollback history
|
|
235
|
+
- ✅ Auto-generated secure credentials (no manual configuration)
|
|
236
|
+
- ✅ Project-aware (changes directory when you switch projects)
|
|
240
237
|
|
|
241
238
|
### Usage from Mobile App
|
|
242
239
|
|
|
243
240
|
Once enabled on the backend:
|
|
244
241
|
1. Open CCC mobile app
|
|
245
|
-
2. Navigate to project
|
|
246
|
-
3. Terminal
|
|
242
|
+
2. Navigate to the project
|
|
243
|
+
3. Terminal icon will appear in the toolbar automatically
|
|
247
244
|
4. Tap to open full-screen terminal
|
|
248
245
|
5. Terminal opens directly in your project directory
|
|
249
246
|
6. Use on-screen keyboard or external keyboard
|
|
@@ -252,17 +249,16 @@ Once enabled on the backend:
|
|
|
252
249
|
|
|
253
250
|
⚠️ **Important Security Notes:**
|
|
254
251
|
|
|
255
|
-
1. **
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
```
|
|
252
|
+
1. **Terminal Credentials are Auto-Generated:** No weak passwords possible
|
|
253
|
+
- System generates 32-char username + 480-char password on startup
|
|
254
|
+
- Credentials automatically broadcast to authorized clients via MQTT
|
|
255
|
+
- Cannot be manually configured (prevents security mistakes)
|
|
260
256
|
|
|
261
|
-
2. **
|
|
257
|
+
2. **Use MQTT Authentication for ngrok:** Required for remote access
|
|
262
258
|
```bash
|
|
263
259
|
ccc --ngrok-token YOUR_TOKEN \
|
|
264
|
-
|
|
265
|
-
|
|
260
|
+
-u admin \
|
|
261
|
+
-p $(openssl rand -base64 32)
|
|
266
262
|
```
|
|
267
263
|
|
|
268
264
|
3. **Monitor Active Sessions:** Check logs for suspicious activity
|
|
@@ -271,23 +267,27 @@ Once enabled on the backend:
|
|
|
271
267
|
```
|
|
272
268
|
|
|
273
269
|
4. **Restrict Network Access:** Only use on trusted networks or via ngrok
|
|
270
|
+
- Terminal bound to localhost only
|
|
271
|
+
- All access must go through authenticated router
|
|
274
272
|
|
|
275
273
|
### Troubleshooting Terminal
|
|
276
274
|
|
|
277
275
|
**Terminal won't connect:**
|
|
278
|
-
-
|
|
279
|
-
- Check logs with `--debug` flag
|
|
276
|
+
- Check logs with `--debug` flag to see credential generation
|
|
280
277
|
- Ensure port 3001 is not in use
|
|
278
|
+
- Verify MQTT connection is established (terminal credentials sent via MQTT)
|
|
279
|
+
- Check that app received terminal configuration (should happen automatically)
|
|
281
280
|
|
|
282
281
|
**Authentication failures:**
|
|
283
282
|
- Check for IP blocking (max 5 failed attempts)
|
|
284
283
|
- Wait 15 minutes if blocked
|
|
285
|
-
- Restart server to clear blocks
|
|
284
|
+
- Restart server to clear blocks and regenerate credentials
|
|
286
285
|
|
|
287
286
|
**Terminal not showing in app:**
|
|
288
|
-
- Ensure
|
|
289
|
-
-
|
|
290
|
-
- Check app
|
|
287
|
+
- Ensure server is running (credentials auto-generated on startup)
|
|
288
|
+
- Verify MQTT connection is active
|
|
289
|
+
- Check that app received system config via MQTT
|
|
290
|
+
- Restart the mobile app to force credential refresh
|
|
291
291
|
|
|
292
292
|
## Permission Modes
|
|
293
293
|
|
|
@@ -314,19 +314,6 @@ CCC offers four permission modes to balance convenience and security:
|
|
|
314
314
|
- **Use with extreme caution!**
|
|
315
315
|
- **Use case:** Controlled environments only
|
|
316
316
|
|
|
317
|
-
## How It Works
|
|
318
|
-
|
|
319
|
-
When you start CCC, it:
|
|
320
|
-
|
|
321
|
-
1. **Starts MQTT Broker** - Embedded broker on port 8884 (localhost)
|
|
322
|
-
2. **Starts Path Router** - HTTP router on port 8883 proxying MQTT and terminal
|
|
323
|
-
3. **Starts Terminal Server** (Optional) - Web terminal on port 3001 if credentials provided (falls back to MQTT credentials)
|
|
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
|
|
329
|
-
|
|
330
317
|
### Project Structure
|
|
331
318
|
|
|
332
319
|
CCC creates the following in your project:
|
|
@@ -372,7 +359,10 @@ The CCC mobile app is required to interact with the backend.
|
|
|
372
359
|
- Multiple project management
|
|
373
360
|
- Real-time chat interface
|
|
374
361
|
- Permission request handling
|
|
375
|
-
- Integrated web terminal (Beta) -
|
|
362
|
+
- Integrated web terminal (Beta) - auto-configured with secure credentials
|
|
363
|
+
- Request cancellation - abort ongoing Claude operations
|
|
364
|
+
- Dynamic project switching - terminal follows your active project
|
|
365
|
+
- Image attachments support (PNG, JPEG, GIF, WebP - max 5MB each)
|
|
376
366
|
- Server profile management
|
|
377
367
|
- Connection health monitoring
|
|
378
368
|
- Theme support (light/dark)
|
|
@@ -381,10 +371,9 @@ The CCC mobile app is required to interact with the backend.
|
|
|
381
371
|
|
|
382
372
|
1. Open the mobile app
|
|
383
373
|
2. Go to Settings → Add Server Profile
|
|
384
|
-
3. Enter server URL
|
|
374
|
+
3. Enter server URL
|
|
385
375
|
4. Add credentials if authentication is enabled
|
|
386
|
-
5.
|
|
387
|
-
6. Create a project pointing to your code directory
|
|
376
|
+
5. Create a project pointing to your code directory
|
|
388
377
|
|
|
389
378
|
## Troubleshooting
|
|
390
379
|
|
|
@@ -462,7 +451,7 @@ ccc --router-port 9000 --mqtt-port 9001
|
|
|
462
451
|
|
|
463
452
|
## System Requirements
|
|
464
453
|
|
|
465
|
-
- **Node.js**:
|
|
454
|
+
- **Node.js**: v20.0.0 or higher
|
|
466
455
|
- **Claude Code**: Latest version
|
|
467
456
|
- **Claude Subscription**: Active Pro or Max account
|
|
468
457
|
- **Operating Systems**:
|
|
@@ -488,19 +477,6 @@ Learn coding concepts by chatting with Claude from mobile.
|
|
|
488
477
|
### Pair Programming
|
|
489
478
|
Collaborate with Claude on coding tasks remotely.
|
|
490
479
|
|
|
491
|
-
## Comparison
|
|
492
|
-
|
|
493
|
-
### vs Claude Web
|
|
494
|
-
- ✅ Mobile access
|
|
495
|
-
- ✅ Offline project access
|
|
496
|
-
- ✅ Real-time streaming
|
|
497
|
-
- ✅ Local file system access
|
|
498
|
-
|
|
499
|
-
### vs Claude Desktop
|
|
500
|
-
- ✅ Mobile control
|
|
501
|
-
- ✅ Remote access
|
|
502
|
-
- ✅ Multi-device support
|
|
503
|
-
- ✅ Session persistence
|
|
504
480
|
|
|
505
481
|
## Performance
|
|
506
482
|
|
|
@@ -511,6 +487,7 @@ Collaborate with Claude on coding tasks remotely.
|
|
|
511
487
|
|
|
512
488
|
## Support & Community
|
|
513
489
|
|
|
490
|
+
- **Discord**: Join our community at https://discord.gg/9EjE8t4YCF
|
|
514
491
|
- **Issues**: Report bugs and request features
|
|
515
492
|
- **Discussions**: Ask questions and share ideas
|
|
516
493
|
- **Updates**: Check npm for latest version
|