@naarang/ccc 1.0.14 → 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 CHANGED
@@ -20,9 +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>
27
+ </p>
28
+
29
+ <p align="center">
23
30
  <a href="https://apps.apple.com/in/app/ccc-ui-for-coding-agents/id6753870766">
24
31
  <img src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" alt="Download on the App Store" height="80">
25
32
  </a>
33
+ <br/>
34
+ <a href="https://testflight.apple.com/join/bEVNMrNH">
35
+ <sub>Join iOS Beta Testing (TestFlight)</sub>
36
+ </a>
26
37
  </p>
27
38
 
28
39
  ## ✨ Features
@@ -30,6 +41,7 @@ CCC is a powerful CLI tool that creates a bridge between [Claude Code](https://c
30
41
  - **Mobile Control** - Chat with Claude from your phone or tablet
31
42
  - **Real-time Sync** - See Claude's responses instantly on your device
32
43
  - **Smart Permission System** - Fine-grained control over code modifications
44
+ - **Web Terminal Access** 🆕 (Beta) - Full terminal access in mobile app with authentication
33
45
  - **Remote Access** - Optional ngrok integration for access from anywhere
34
46
  - **Secure MQTT** - Built-in MQTT broker with authentication support
35
47
  - **Session Management** - Persistent sessions across reconnections
@@ -96,15 +108,20 @@ Open the app, create a project pointing to your local directory, and start chatt
96
108
  ccc [options]
97
109
 
98
110
  Options:
99
- --debug Enable debug logging
100
- -u, --username <user> MQTT broker username
101
- -p, --password <pass> MQTT broker password
102
- --port <port> MQTT broker port (default: 8883)
103
- -t, --ngrok-token <token> ngrok auth token (enables public tunnel)
104
- --ngrok-domain <domain> ngrok static domain
105
- --no-auto-update Disable automatic updates (enabled by default)
106
- -v, --version Show version number
107
- -h, --help Show help message
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
108
125
  ```
109
126
 
110
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.
@@ -121,19 +138,26 @@ ccc
121
138
  ccc -u admin -p secret
122
139
  ```
123
140
 
141
+ **With terminal access (Beta):**
142
+ ```bash
143
+ ccc --terminal-username admin --terminal-password secret
144
+ ```
145
+
124
146
  **With ngrok for remote access:**
125
147
  ```bash
126
148
  ccc --ngrok-token YOUR_NGROK_TOKEN
127
149
  ```
128
150
 
129
- **Custom port with debug logging:**
151
+ **Full example with ngrok, authentication, and terminal:**
130
152
  ```bash
131
- ccc --port 9000 --debug
153
+ ccc --ngrok-token YOUR_TOKEN \
154
+ --terminal-username admin \
155
+ --terminal-password secret
132
156
  ```
133
157
 
134
- **Full example with ngrok and authentication:**
158
+ **Custom ports with debug logging:**
135
159
  ```bash
136
- ccc -u admin -p secret -t YOUR_TOKEN --ngrok-domain myapp.ngrok.app
160
+ ccc --mqtt-port 9000 --terminal-port 3002 --debug
137
161
  ```
138
162
 
139
163
  ### Environment Variables
@@ -141,15 +165,126 @@ ccc -u admin -p secret -t YOUR_TOKEN --ngrok-domain myapp.ngrok.app
141
165
  Create a `.env` file in your working directory:
142
166
 
143
167
  ```env
168
+ # MQTT Configuration
144
169
  MQTT_BROKER_PORT=8883
145
170
  MQTT_USERNAME=your-username
146
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
147
182
  NGROK_AUTH_TOKEN=your-ngrok-token
148
183
  NGROK_DOMAIN=your-custom-domain.ngrok.app
149
184
  ```
150
185
 
151
186
  > **Note:** CLI arguments override environment variables
152
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
+
153
288
  ## Permission Modes
154
289
 
155
290
  CCC offers four permission modes to balance convenience and security:
@@ -179,11 +314,14 @@ CCC offers four permission modes to balance convenience and security:
179
314
 
180
315
  When you start CCC, it:
181
316
 
182
- 1. **Starts MQTT Broker** - Embedded broker on port 8883 (WebSocket)
183
- 2. **Sets Up Projects** - Auto-configures permission hooks
184
- 3. **Manages Sessions** - Persistent sessions across disconnects
185
- 4. **Streams Responses** - Real-time Claude responses to mobile
186
- 5. **Handles Permissions** - Smart permission checks based on mode
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
187
325
 
188
326
  ### Project Structure
189
327
 
@@ -210,15 +348,27 @@ The CCC mobile app is required to interact with the backend.
210
348
  <a href="https://play.google.com/store/apps/details?id=com.naarang.ccc">
211
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">
212
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>
355
+ </p>
356
+
357
+ <p align="center">
213
358
  <a href="https://apps.apple.com/in/app/ccc-ui-for-coding-agents/id6753870766">
214
359
  <img src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg" alt="Download on the App Store" height="80">
215
360
  </a>
361
+ <br/>
362
+ <a href="https://testflight.apple.com/join/bEVNMrNH">
363
+ <sub>Join iOS Beta Testing (TestFlight)</sub>
364
+ </a>
216
365
  </p>
217
366
 
218
367
  ### Features
219
368
  - Multiple project management
220
369
  - Real-time chat interface
221
370
  - Permission request handling
371
+ - Integrated web terminal (Beta) - when enabled on backend
222
372
  - Server profile management
223
373
  - Connection health monitoring
224
374
  - Theme support (light/dark)