@naarang/ccc 1.0.15 → 1.1.0-beta.1
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 +162 -18
- 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 -0
- package/dist/public/terminal.html +250 -0
- package/dist/terminal/server.js +1 -0
- 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 +6 -2
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
|
|
@@ -99,15 +108,20 @@ Open the app, create a project pointing to your local directory, and start chatt
|
|
|
99
108
|
ccc [options]
|
|
100
109
|
|
|
101
110
|
Options:
|
|
102
|
-
--debug
|
|
103
|
-
-u, --username <user>
|
|
104
|
-
-p, --password <pass>
|
|
105
|
-
--port <port> MQTT broker port (default: 8883)
|
|
106
|
-
|
|
107
|
-
--
|
|
108
|
-
--
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
+
--debug Enable debug logging
|
|
112
|
+
-u, --username <user> MQTT broker username
|
|
113
|
+
-p, --password <pass> MQTT broker password
|
|
114
|
+
--mqtt-port <port> Internal MQTT broker port (default: 8883)
|
|
115
|
+
--port <port> [DEPRECATED] Use --mqtt-port instead
|
|
116
|
+
--router-port <port> Router port for ngrok (default: 8080)
|
|
117
|
+
--terminal-port <port> Internal terminal server port (default: 3001)
|
|
118
|
+
--terminal-username <user> Terminal authentication username (enables terminal)
|
|
119
|
+
--terminal-password <pass> Terminal authentication password (enables terminal)
|
|
120
|
+
-t, --ngrok-token <token> ngrok auth token (enables public tunnel)
|
|
121
|
+
--ngrok-domain <domain> ngrok static domain
|
|
122
|
+
--no-auto-update Disable automatic updates (enabled by default)
|
|
123
|
+
-v, --version Show version number
|
|
124
|
+
-h, --help Show help message
|
|
111
125
|
```
|
|
112
126
|
|
|
113
127
|
> **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 +138,26 @@ ccc
|
|
|
124
138
|
ccc -u admin -p secret
|
|
125
139
|
```
|
|
126
140
|
|
|
141
|
+
**With terminal access (Beta):**
|
|
142
|
+
```bash
|
|
143
|
+
ccc --terminal-username admin --terminal-password secret
|
|
144
|
+
```
|
|
145
|
+
|
|
127
146
|
**With ngrok for remote access:**
|
|
128
147
|
```bash
|
|
129
148
|
ccc --ngrok-token YOUR_NGROK_TOKEN
|
|
130
149
|
```
|
|
131
150
|
|
|
132
|
-
**
|
|
151
|
+
**Full example with ngrok, authentication, and terminal:**
|
|
133
152
|
```bash
|
|
134
|
-
ccc --
|
|
153
|
+
ccc --ngrok-token YOUR_TOKEN \
|
|
154
|
+
--terminal-username admin \
|
|
155
|
+
--terminal-password secret
|
|
135
156
|
```
|
|
136
157
|
|
|
137
|
-
**
|
|
158
|
+
**Custom ports with debug logging:**
|
|
138
159
|
```bash
|
|
139
|
-
ccc -
|
|
160
|
+
ccc --mqtt-port 9000 --terminal-port 3002 --debug
|
|
140
161
|
```
|
|
141
162
|
|
|
142
163
|
### Environment Variables
|
|
@@ -144,15 +165,126 @@ ccc -u admin -p secret -t YOUR_TOKEN --ngrok-domain myapp.ngrok.app
|
|
|
144
165
|
Create a `.env` file in your working directory:
|
|
145
166
|
|
|
146
167
|
```env
|
|
168
|
+
# MQTT Configuration
|
|
147
169
|
MQTT_BROKER_PORT=8883
|
|
148
170
|
MQTT_USERNAME=your-username
|
|
149
171
|
MQTT_PASSWORD=your-password
|
|
172
|
+
|
|
173
|
+
# Router Configuration
|
|
174
|
+
ROUTER_PORT=8080
|
|
175
|
+
|
|
176
|
+
# Terminal Configuration (Beta)
|
|
177
|
+
TERMINAL_PORT=3001
|
|
178
|
+
TERMINAL_USERNAME=your-terminal-username
|
|
179
|
+
TERMINAL_PASSWORD=your-terminal-password
|
|
180
|
+
|
|
181
|
+
# Ngrok Configuration
|
|
150
182
|
NGROK_AUTH_TOKEN=your-ngrok-token
|
|
151
183
|
NGROK_DOMAIN=your-custom-domain.ngrok.app
|
|
152
184
|
```
|
|
153
185
|
|
|
154
186
|
> **Note:** CLI arguments override environment variables
|
|
155
187
|
|
|
188
|
+
## 🖥️ Terminal Access (Beta)
|
|
189
|
+
|
|
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.
|
|
191
|
+
|
|
192
|
+
### Enabling Terminal Access
|
|
193
|
+
|
|
194
|
+
Terminal access is **opt-in** for security reasons. To enable it, you must provide authentication credentials:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
ccc --terminal-username admin --terminal-password your-secure-password
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Or via environment variables:
|
|
201
|
+
```env
|
|
202
|
+
TERMINAL_USERNAME=admin
|
|
203
|
+
TERMINAL_PASSWORD=your-secure-password
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### How It Works
|
|
207
|
+
|
|
208
|
+
1. **Architecture:**
|
|
209
|
+
- Internal terminal server runs on port 3001 (localhost only)
|
|
210
|
+
- Proxied through the main router on `/terminal` path
|
|
211
|
+
- Full terminal emulation with bash/powershell support
|
|
212
|
+
|
|
213
|
+
2. **Security Features:**
|
|
214
|
+
- Basic authentication required for all connections
|
|
215
|
+
- Rate limiting: max 5 failed auth attempts (15-minute IP block)
|
|
216
|
+
- Session limit: maximum 5 concurrent terminals
|
|
217
|
+
- Bound to localhost only (never exposed directly)
|
|
218
|
+
- All connections must go through authenticated router
|
|
219
|
+
|
|
220
|
+
3. **Mobile Integration:**
|
|
221
|
+
- Terminal embedded in mobile app
|
|
222
|
+
- Auto-configures when credentials are provided
|
|
223
|
+
- **Automatic authentication** - App automatically authenticates with terminal (no manual login needed)
|
|
224
|
+
- Project path updates automatically when switching projects
|
|
225
|
+
- Starts in your project directory by default
|
|
226
|
+
|
|
227
|
+
### Terminal Features
|
|
228
|
+
|
|
229
|
+
- ✅ Full terminal emulation
|
|
230
|
+
- ✅ Color support and ANSI escape sequences
|
|
231
|
+
- ✅ Responsive design (works on mobile)
|
|
232
|
+
- ✅ Multiple concurrent sessions
|
|
233
|
+
- ✅ Automatic resize on orientation change
|
|
234
|
+
- ✅ Custom theme matching app design
|
|
235
|
+
- ✅ Scrollback history
|
|
236
|
+
|
|
237
|
+
### Usage from Mobile App
|
|
238
|
+
|
|
239
|
+
Once enabled on the backend:
|
|
240
|
+
1. Open CCC mobile app
|
|
241
|
+
2. Navigate to project settings
|
|
242
|
+
3. Terminal tab will appear automatically
|
|
243
|
+
4. Tap to open full-screen terminal
|
|
244
|
+
5. Terminal opens directly in your project directory
|
|
245
|
+
6. Use on-screen keyboard or external keyboard
|
|
246
|
+
|
|
247
|
+
### Security Best Practices
|
|
248
|
+
|
|
249
|
+
⚠️ **Important Security Notes:**
|
|
250
|
+
|
|
251
|
+
1. **Use Strong Passwords:** Terminal gives full shell access
|
|
252
|
+
```bash
|
|
253
|
+
# Generate a secure password
|
|
254
|
+
openssl rand -base64 32
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
2. **Combine with ngrok Authentication:** For remote access
|
|
258
|
+
```bash
|
|
259
|
+
ccc --ngrok-token YOUR_TOKEN \
|
|
260
|
+
--terminal-username admin \
|
|
261
|
+
--terminal-password $(openssl rand -base64 32)
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
3. **Monitor Active Sessions:** Check logs for suspicious activity
|
|
265
|
+
```bash
|
|
266
|
+
ccc --debug # Enable detailed logging
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
4. **Restrict Network Access:** Only use on trusted networks or via ngrok
|
|
270
|
+
|
|
271
|
+
### Troubleshooting Terminal
|
|
272
|
+
|
|
273
|
+
**Terminal won't connect:**
|
|
274
|
+
- Verify credentials are correct
|
|
275
|
+
- Check logs with `--debug` flag
|
|
276
|
+
- Ensure port 3001 is not in use
|
|
277
|
+
|
|
278
|
+
**Authentication failures:**
|
|
279
|
+
- Check for IP blocking (max 5 failed attempts)
|
|
280
|
+
- Wait 15 minutes if blocked
|
|
281
|
+
- Restart server to clear blocks
|
|
282
|
+
|
|
283
|
+
**Terminal not showing in app:**
|
|
284
|
+
- Ensure terminal credentials are set on backend
|
|
285
|
+
- Restart the mobile app
|
|
286
|
+
- Check app settings for terminal configuration
|
|
287
|
+
|
|
156
288
|
## Permission Modes
|
|
157
289
|
|
|
158
290
|
CCC offers four permission modes to balance convenience and security:
|
|
@@ -182,11 +314,14 @@ CCC offers four permission modes to balance convenience and security:
|
|
|
182
314
|
|
|
183
315
|
When you start CCC, it:
|
|
184
316
|
|
|
185
|
-
1. **Starts MQTT Broker** - Embedded broker on port 8883 (
|
|
186
|
-
2. **
|
|
187
|
-
3. **
|
|
188
|
-
4. **
|
|
189
|
-
5. **
|
|
317
|
+
1. **Starts MQTT Broker** - Embedded broker on port 8883 (localhost)
|
|
318
|
+
2. **Starts Path Router** - HTTP router on port 8080 proxying MQTT and terminal
|
|
319
|
+
3. **Starts Terminal Server** (Optional) - Web terminal on port 3001 if credentials provided
|
|
320
|
+
4. **Sets Up ngrok Tunnel** (Optional) - Public URL pointing to router
|
|
321
|
+
5. **Sets Up Projects** - Auto-configures permission hooks
|
|
322
|
+
6. **Manages Sessions** - Persistent sessions across disconnects
|
|
323
|
+
7. **Streams Responses** - Real-time Claude responses to mobile
|
|
324
|
+
8. **Handles Permissions** - Smart permission checks based on mode
|
|
190
325
|
|
|
191
326
|
### Project Structure
|
|
192
327
|
|
|
@@ -213,18 +348,27 @@ The CCC mobile app is required to interact with the backend.
|
|
|
213
348
|
<a href="https://play.google.com/store/apps/details?id=com.naarang.ccc">
|
|
214
349
|
<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
350
|
</a>
|
|
351
|
+
<br/>
|
|
352
|
+
<a href="https://play.google.com/apps/testing/com.naarang.ccc">
|
|
353
|
+
<sub>Join Android Beta Testing</sub>
|
|
354
|
+
</a>
|
|
216
355
|
</p>
|
|
217
356
|
|
|
218
357
|
<p align="center">
|
|
219
358
|
<a href="https://apps.apple.com/in/app/ccc-ui-for-coding-agents/id6753870766">
|
|
220
359
|
<img src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" alt="Download on the App Store" height="80">
|
|
221
360
|
</a>
|
|
361
|
+
<br/>
|
|
362
|
+
<a href="https://testflight.apple.com/join/bEVNMrNH">
|
|
363
|
+
<sub>Join iOS Beta Testing (TestFlight)</sub>
|
|
364
|
+
</a>
|
|
222
365
|
</p>
|
|
223
366
|
|
|
224
367
|
### Features
|
|
225
368
|
- Multiple project management
|
|
226
369
|
- Real-time chat interface
|
|
227
370
|
- Permission request handling
|
|
371
|
+
- Integrated web terminal (Beta) - when enabled on backend
|
|
228
372
|
- Server profile management
|
|
229
373
|
- Connection health monitoring
|
|
230
374
|
- Theme support (light/dark)
|