thinkncollab-shell 0.0.6 → 0.0.8

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
@@ -1,6 +1,6 @@
1
1
  # ThinkNCollab Shell (`thinknsh`)
2
2
 
3
- A powerful collaborative shell with WebSocket integration for real-time team collaboration — built on top of the ThinkNCollab platform.
3
+ A real-time collaborative terminal shell with WebSocket integration, built on top of the ThinkNCollab platform. Run commands, join rooms, chat with teammates, manage tasks, share terminals — all from your CLI.
4
4
 
5
5
  ---
6
6
 
@@ -10,34 +10,38 @@ A powerful collaborative shell with WebSocket integration for real-time team col
10
10
  - [Installation](#installation)
11
11
  - [Quick Start](#quick-start)
12
12
  - [Configuration](#configuration)
13
+ - [Environment Variables](#environment-variables)
13
14
  - [CLI Flags](#cli-flags)
14
15
  - [Interactive Shell](#interactive-shell)
15
16
  - [Commands Reference](#commands-reference)
16
17
  - [Auth Commands](#auth-commands)
17
- - [Team Commands](#team-commands)
18
18
  - [Room Commands](#room-commands)
19
19
  - [Message Commands](#message-commands)
20
+ - [Task Commands](#task-commands)
21
+ - [Terminal Share Commands](#terminal-share-commands)
22
+ - [Notification Commands](#notification-commands)
20
23
  - [Shell Commands](#shell-commands)
21
- - [Single-Command Mode](#single-command-mode)
24
+ - [`.tncproject` Auto-Boot](#tncproject-auto-boot)
25
+ - [Notification Window](#notification-window)
22
26
  - [Built-in Shell Features](#built-in-shell-features)
27
+ - [Single-Command Mode](#single-command-mode)
23
28
  - [Examples](#examples)
24
- - [Environment Variables](#environment-variables)
25
29
 
26
30
  ---
27
31
 
28
32
  ## Features
29
33
 
30
- - 🚀 **Custom Shell** — Full-featured interactive command-line interface
31
- - 🔌 **WebSocket Integration** — Real-time communication with ThinkNCollab servers
32
- - 👥 **Room Collaboration** — Join rooms and collaborate with teammates live
33
- - 💬 **Messaging** — Send and receive messages in real-time
34
- - 🔔 **Notifications** — Get notified of tasks, uploads, and room events
35
- - 📁 **File System** — Built-in file system commands (ls, cd, pwd, cat, mkdir)
36
- - ⚡ **Command System** — Extensible command registration by category
37
- - 🔧 **Aliases** — Create and manage custom command shortcuts
38
- - 📊 **Variables** — Shell variable support (`set`, `$VAR`)
39
- - 📜 **History** — Persistent command history across sessions
40
- - 🎨 **Colored Output** — Beautiful chalk-powered terminal output
34
+ - 🚀 **Custom Shell** — Full-featured interactive REPL with persistent history
35
+ - 🔌 **WebSocket Integration** — Real-time bidirectional sync with ThinkNCollab servers
36
+ - 👥 **Room Collaboration** — Join rooms, chat, and see who's online in real time
37
+ - 📋 **Task Management** — Accept, start, complete, and reject tasks from the CLI
38
+ - 📺 **Terminal Sharing** — Share your live terminal session with teammates (read + write access)
39
+ - 🔔 **Notification Window** — Background TCP-based popup window for live events
40
+ - 🔑 **`.tncproject` Auto-Boot** — Drop a config file in your project root to auto-login and join a room on shell start
41
+ - 🛡️ **Shell Token Auth** — Secure HMAC-SHA256 token validation for shell connections
42
+ - 📁 **File System** — Built-in `ls`, `cd`, `pwd`, plus passthrough to your system shell
43
+ - 📜 **History** — Persisted command history at `~/.thinknsh_history`
44
+ - 🎨 **Colored Output** — chalk-powered terminal output
41
45
 
42
46
  ---
43
47
 
@@ -51,7 +55,7 @@ npm install -g thinkncollab-shell
51
55
  npm install thinkncollab-shell
52
56
  ```
53
57
 
54
- After global install, the `thinknsh` binary is available everywhere on your system.
58
+ After a global install the `thinknsh` binary is available everywhere on your system.
55
59
 
56
60
  ---
57
61
 
@@ -61,16 +65,16 @@ After global install, the `thinknsh` binary is available everywhere on your syst
61
65
  # 1. Start the interactive shell
62
66
  thinknsh
63
67
 
64
- # 2. Log in to your ThinkNCollab account
68
+ # 2. Log in
65
69
  thinknsh> login
66
70
 
67
71
  # 3. Join a room
68
- thinknsh> join my-room
72
+ thinknsh> join <room-id>
69
73
 
70
74
  # 4. Send a message
71
75
  thinknsh> say Hello team!
72
76
 
73
- # 5. Check your status
77
+ # 5. Check session status
74
78
  thinknsh> status
75
79
  ```
76
80
 
@@ -78,7 +82,7 @@ thinknsh> status
78
82
 
79
83
  ## Configuration
80
84
 
81
- By default `thinknsh` connects to `https://thinkncollab.com`. In production, set environment variables before starting the shell:
85
+ By default `thinknsh` connects to `https://thinkncollab.com`. Override the server in any session using environment variables:
82
86
 
83
87
  ```bash
84
88
  export THINKNCOLLAB_SERVER=https://thinkncollab.com
@@ -87,22 +91,45 @@ export THINKNCOLLAB_WS_URL=https://thinkncollab.com
87
91
  thinknsh
88
92
  ```
89
93
 
90
- Or inline for a single session:
94
+ Or inline for a single run:
91
95
 
92
96
  ```bash
93
97
  THINKNCOLLAB_SERVER=https://thinkncollab.com thinknsh
94
98
  ```
95
99
 
100
+ Session credentials are saved to `~/.thinkncollab/session.json` and are automatically restored on the next launch — you only need to `login` once.
101
+
102
+ ---
103
+
104
+ ## Environment Variables
105
+
106
+ | Variable | Default | Description |
107
+ |---|---|---|
108
+ | `THINKNCOLLAB_SERVER` | `https://thinkncollab.com` | Base URL for both REST and WebSocket |
109
+ | `THINKNCOLLAB_API_URL` | `https://thinkncollab.com` | REST API base URL (overrides SERVER for API calls) |
110
+ | `THINKNCOLLAB_WS_URL` | `https://thinkncollab.com` | WebSocket server URL |
111
+ | `THINKNCOLLAB_AUTO_CONNECT` | `false` | Set to `true` to auto-connect WebSocket on shell start |
112
+ | `THINKNSH_NOTIFY_PORT` | auto-assigned | TCP port for the notification window (set automatically) |
113
+
114
+ In production all three URL variables typically point to the same host:
115
+
116
+ ```bash
117
+ export THINKNCOLLAB_SERVER=https://thinkncollab.com
118
+ export THINKNCOLLAB_API_URL=https://thinkncollab.com
119
+ export THINKNCOLLAB_WS_URL=https://thinkncollab.com
120
+ export THINKNCOLLAB_AUTO_CONNECT=true
121
+ ```
122
+
96
123
  ---
97
124
 
98
125
  ## CLI Flags
99
126
 
100
- These flags are used **before** entering the interactive shell (passed directly to the `thinknsh` binary).
127
+ These flags are used **before** entering the interactive shell.
101
128
 
102
129
  | Flag | Alias | Description |
103
- |------|-------|-------------|
104
- | `--help` | `-h` | Show help message and exit |
105
- | `--version` | `-v` | Print the installed version and exit |
130
+ |---|---|---|
131
+ | `--help` | `-h` | Show help and exit |
132
+ | `--version` | `-v` | Print installed version and exit |
106
133
 
107
134
  ```bash
108
135
  thinknsh --help
@@ -113,22 +140,30 @@ thinknsh --version
113
140
 
114
141
  ## Interactive Shell
115
142
 
116
- Running `thinknsh` with no arguments starts the **interactive shell** — a persistent REPL where you stay logged in, maintain a WebSocket connection, and run commands one after another.
143
+ Running `thinknsh` with no arguments starts the interactive shell. A notification window opens automatically in a new terminal (on macOS, Windows, and most Linux DEs).
117
144
 
118
145
  ```
119
146
  $ thinknsh
120
147
 
121
- ████████╗██╗ ██╗██╗███╗ ██╗██╗ ██╗███╗ ██╗
122
- ╚══██╔╝██║ ██║██║████╗ ██║██║ ██╔╝████╗ ██║
123
- ██║ ███████║██║██╔██╗ ██║█████╔╝ ██╔██╗ ██║
124
- ██║ ██╔══██║██║██║╚██╗██║██╔═██╗ ██║╚██╗██║
125
- ██║ ██║ ██║██║██║ ╚████║██║ ██╗██║ ╚████║
126
- ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═══╝
148
+ ████████╗██╗ ██╗██╗███╗ ██╗██╗ ██╗███╗ ██╗ ...
149
+ ╔══════════════════════════════════════════════════════╗
150
+ ║ ThinkNCollab Shell v0.0.5 ║
151
+ ║ Type 'help' for commands ║
152
+ ╚══════════════════════════════════════════════════════╝
153
+
154
+ Notification server ready on port 7379
155
+ Notification window opening...
127
156
 
128
- thinknsh> _
157
+ username@thinknsh:~ $
129
158
  ```
130
159
 
131
- Type `help` inside the shell to list all available commands at any time.
160
+ The prompt shows your current room and connection state:
161
+
162
+ ```
163
+ [room-abc123] ● username@thinknsh:~/projects $
164
+ ```
165
+
166
+ Type `help` at any time to list all available commands.
132
167
 
133
168
  ---
134
169
 
@@ -137,117 +172,190 @@ Type `help` inside the shell to list all available commands at any time.
137
172
  ### Auth Commands
138
173
 
139
174
  #### `login`
140
- Authenticate with your ThinkNCollab account. Prompts for email and password interactively.
175
+ Authenticate interactively with your ThinkNCollab account. Credentials are saved and restored automatically on subsequent launches.
141
176
 
142
- ```bash
177
+ ```
143
178
  thinknsh> login
144
- # Enter your email: you@example.com
145
- # Enter your password: ********
146
- # ✅ Logged in as you@example.com
179
+ Email : you@example.com
180
+ Password: ********
181
+ ✅ Logged in as You
147
182
  ```
148
183
 
149
184
  #### `logout`
150
- End your current session and clear saved credentials.
185
+ End the current session and clear saved credentials.
151
186
 
152
- ```bash
187
+ ```
153
188
  thinknsh> logout
154
- # ✅ Logged out successfully
189
+ ✅ Logged out successfully
155
190
  ```
156
191
 
157
192
  #### `whoami`
158
- Display information about the currently authenticated user.
193
+ Display the currently authenticated user.
159
194
 
160
- ```bash
195
+ ```
161
196
  thinknsh> whoami
162
- # 👤 Logged in as: Ramanh (raman@thinkncollab.com)
163
- # 🏢 Team: ThinkNCollab Core
197
+ 👤 Logged in as: Raman Singh (raman@thinkncollab.com)
164
198
  ```
165
199
 
166
200
  ---
167
201
 
168
- ### Team Commands
202
+ ### Room Commands
169
203
 
170
- #### `myteam`
171
- Show details about your current team — name, plan, member count.
204
+ #### `join <room-id>`
205
+ Join a collaboration room. Establishes a WebSocket connection, loads the last 30 messages, and starts streaming live events.
172
206
 
173
- ```bash
174
- thinknsh> myteam
175
- # 🏢 Team: ThinkNCollab Core
176
- # 📋 Plan: Pro
177
- # 👥 Members: 8
207
+ ```
208
+ thinknsh> join room-abc123
209
+ ✅ Joined: My Project Room
178
210
  ```
179
211
 
180
- #### `teammates`
181
- List all members in your team with their online status.
212
+ #### `leave`
213
+ Leave the current room and disconnect from its event stream.
182
214
 
183
- ```bash
184
- thinknsh> teammates
185
- # 👥 Team Members:
186
- # 🟢 Raman Singh (you)
187
- # 🟢 Omkar Yadav
188
- # 🔴 Radhika Chauhan (offline)
189
- # 🟡 -------------- (away)
215
+ ```
216
+ thinknsh> leave
190
217
  ```
191
218
 
192
- #### `invite <email>`
193
- Send a team invitation to an email address.
219
+ #### `rooms`
220
+ List all rooms you have access to.
194
221
 
195
- ```bash
196
- thinknsh> invite newmember@example.com
197
- # ✅ Invitation sent to newmember@example.com
222
+ ```
223
+ thinknsh> rooms
224
+ [1] frontend-team (ID: room-abc123) 👥 4 members
225
+ [2] backend-infra (ID: room-def456) 👥 2 members
198
226
  ```
199
227
 
200
228
  ---
201
229
 
202
- ### Room Commands
230
+ ### Message Commands
203
231
 
204
- #### `join <room-id>`
205
- Join a collaboration room. Establishes a WebSocket connection and streams live activity.
232
+ #### `say <message>` / `msg <message>`
233
+ Send a message to the room you are currently in. No quotes needed for multi-word messages.
206
234
 
207
- ```bash
208
- thinknsh> join room-abc123
209
- # 🚪 Joined room: room-abc123
210
- # 👥 Members online: 3
211
- # 📜 Recent activity loaded
235
+ ```
236
+ thinknsh> say PR is up for review — branch feature/auth-fix
212
237
  ```
213
238
 
214
- You will automatically receive real-time notifications for messages, task updates, and file uploads while inside a room.
239
+ ---
215
240
 
216
- #### `leave`
217
- Leave the currently active room and disconnect from its WebSocket stream.
241
+ ### Task Commands
242
+
243
+ These commands require you to be logged in and in a room. They emit real-time events to all room members and update the [Shell Users presence page](https://thinkncollab.com) instantly.
244
+
245
+ #### `task list`
246
+ Show tasks assigned to you in the current room.
218
247
 
219
- ```bash
220
- thinknsh> leave
221
- # 👋 Left room: room-abc123
248
+ ```
249
+ thinknsh> task list
250
+ [1] Fix login redirect bug — high · pending
251
+ [2] Write API documentation — medium · in-progress
252
+ [3] Review onboarding flow — low · pending
222
253
  ```
223
254
 
224
- #### `rooms`
225
- List all rooms available to you — showing name, ID, and member count.
255
+ #### `task accept <task-id>`
256
+ Mark a task as accepted. Emits a `task:accepted` event to the room — teammates see it live on the board.
226
257
 
227
- ```bash
228
- thinknsh> rooms
229
- # 📁 Your Rooms:
230
- # [1] frontend-team (ID: room-abc123) 👥 4 members
231
- # [2] backend-infra (ID: room-def456) 👥 2 members
232
- # [3] design-review (ID: room-ghi789) 👥 6 members
258
+ ```
259
+ thinknsh> task accept 64f1a2b3c4d5e6f7a8b9c0d1
260
+ ✅ Task accepted: Fix login redirect bug
261
+ ```
262
+
263
+ #### `task start <task-id>`
264
+ Mark a task as in-progress and broadcast a `task:started` event. Your active task appears on the Shell Users presence page for all teammates to see.
265
+
266
+ ```
267
+ thinknsh> task start 64f1a2b3c4d5e6f7a8b9c0d1
268
+ ▶ Started: Fix login redirect bug
269
+ ```
270
+
271
+ #### `task complete <task-id>`
272
+ Mark a task as completed. Emits `task:completed` — the card on the board animates green for all viewers and your active task slot clears on the presence page.
273
+
274
+ ```
275
+ thinknsh> task complete 64f1a2b3c4d5e6f7a8b9c0d1
276
+ ✓ Completed: Fix login redirect bug
277
+ ```
278
+
279
+ #### `task reject <task-id>`
280
+ Reject a task assignment. Emits `task:rejected` to the room.
281
+
282
+ ```
283
+ thinknsh> task reject 64f1a2b3c4d5e6f7a8b9c0d1
284
+ ✕ Rejected: Fix login redirect bug
233
285
  ```
234
286
 
235
287
  ---
236
288
 
237
- ### Message Commands
289
+ ### Terminal Share Commands
238
290
 
239
- #### `say <message>`
240
- Send a message to the room you are currently in. Requires you to be in a room (use `join` first).
291
+ Terminal sharing lets you stream your live shell session to teammates. Viewers watch in real time; you can optionally grant write access to specific users.
292
+
293
+ #### `share start`
294
+ Start sharing your terminal in the current room. A session ID is created and room members are notified.
241
295
 
242
- ```bash
243
- thinknsh> say Hey team, PR is ready for review!
244
- # 💬 [You → frontend-team]: Hey team, PR is ready for review!
296
+ ```
297
+ thinknsh> share start
298
+ 📺 Terminal share started
299
+ Session : ts-7x9k2m
300
+ Room : frontend-team
245
301
  ```
246
302
 
247
- Supports multi-word messages — no quotes needed.
303
+ #### `share stop`
304
+ End the current sharing session. All viewers are disconnected.
248
305
 
249
- ```bash
250
- thinknsh> say Pushing the hotfix now, give me 5 minutes
306
+ ```
307
+ thinknsh> share stop
308
+ 📺 Terminal share ended
309
+ ```
310
+
311
+ #### `share grant <user-id>`
312
+ Grant write access to a viewer. They can now send input to your shell.
313
+
314
+ ```
315
+ thinknsh> share grant 64f1a2b3c4d5e6f7a8b9c0d1
316
+ ✍️ Write access granted
317
+ ```
318
+
319
+ #### `share revoke <user-id>`
320
+ Revoke write access from a user (they remain a read-only viewer).
321
+
322
+ ```
323
+ thinknsh> share revoke 64f1a2b3c4d5e6f7a8b9c0d1
324
+ ```
325
+
326
+ #### `share kick <user-id>`
327
+ Remove a viewer from the session entirely.
328
+
329
+ ```
330
+ thinknsh> share kick 64f1a2b3c4d5e6f7a8b9c0d1
331
+ ```
332
+
333
+ #### `share status`
334
+ List current viewers and which ones have write access.
335
+
336
+ ```
337
+ thinknsh> share status
338
+ Viewers : 2
339
+ 👁 Priya Sharma (read-only)
340
+ ✍ Alex Kumar (write)
341
+ ```
342
+
343
+ ---
344
+
345
+ ### Notification Commands
346
+
347
+ #### `notify <message>`
348
+ Send a push notification to all other members in the current room. The message appears in their notification feed instantly.
349
+
350
+ ```
351
+ thinknsh> notify Staging deploy complete — please re-test
352
+ 📢 Notification sent to 3 member(s)
353
+ ```
354
+
355
+ Supports optional type and title:
356
+
357
+ ```
358
+ thinknsh> notify type=task_progress title="Build Done" All tests passing
251
359
  ```
252
360
 
253
361
  ---
@@ -255,148 +363,183 @@ thinknsh> say Pushing the hotfix now, give me 5 minutes
255
363
  ### Shell Commands
256
364
 
257
365
  #### `status`
258
- Show a full overview of your current shell session: auth status, active room, WebSocket connection, server URL, and version.
366
+ Show a full overview of your session.
259
367
 
260
- ```bash
368
+ ```
261
369
  thinknsh> status
262
- # ──────────────────────────────────────
263
- # ThinkNCollab Shell — Session Status
264
- # ──────────────────────────────────────
265
- # User : Raman Singh
266
- # Email : raman@example.com
267
- # Server : https://app.thinkncollab.com
268
- # WebSocket : ✅ Connected
269
- # Active Room: frontend-team (room-abc123)
270
- # Version : 1.2.0
271
- # ──────────────────────────────────────
370
+ WebSocket : ✓ Connected
371
+ Socket ID : abc123...
372
+ Room : frontend-team
373
+ Auth : ✓ Logged in
374
+ User : Raman Singh
272
375
  ```
273
376
 
274
377
  #### `help`
275
- List all registered commands grouped by category, with descriptions.
276
-
277
- ```bash
278
- thinknsh> help
279
- ```
378
+ List all registered commands grouped by category.
280
379
 
281
380
  #### `clear`
282
381
  Clear the terminal screen.
283
382
 
284
- ```bash
285
- thinknsh> clear
286
- ```
383
+ #### `cd <path>`
384
+ Change the working directory. Supports `~`, `..`, absolute and relative paths.
287
385
 
288
- #### `exit` / `quit`
289
- Exit the interactive shell gracefully.
386
+ #### `ls [-a]`
387
+ List files in the current directory. Pass `-a` to include hidden files.
290
388
 
291
- ```bash
292
- thinknsh> exit
389
+ #### `pwd`
390
+ Print the current working directory.
391
+
392
+ #### `history`
393
+ Show the full command history for this session.
394
+
395
+ #### `set [key value]`
396
+ Set a shell variable. Run with no arguments to list all variables.
397
+
398
+ ```
399
+ thinknsh> set ROOM room-abc123
400
+ thinknsh> join $ROOM
293
401
  ```
294
402
 
403
+ #### `unset <key>`
404
+ Delete a shell variable.
405
+
406
+ #### `connect` / `disconnect`
407
+ Manually connect or disconnect the WebSocket.
408
+
409
+ #### `exit` / `quit`
410
+ Exit the shell gracefully (saves history, closes TCP notification server, disconnects WebSocket).
411
+
295
412
  ---
296
413
 
297
- ## Single-Command Mode
414
+ ## `.tncproject` Auto-Boot
298
415
 
299
- You can run **any command as a one-liner** without entering the interactive shell. The shell executes the command and exits immediately — great for scripting or CI pipelines.
416
+ Place a `.tncproject` file in your project root to auto-login and auto-join a room when `thinknsh` starts in that directory — no manual `login` or `join` needed.
300
417
 
301
- ```bash
302
- thinknsh status
303
- thinknsh whoami
304
- thinknsh join room-abc123
305
- thinknsh say "Deployment complete ✅"
306
- thinknsh rooms
418
+ ```
419
+ .tncproject
307
420
  ```
308
421
 
309
- Multi-word commands work naturally:
422
+ On startup the shell sends the encrypted config to the server, receives a shell token, saves the session, connects WebSocket, and joins the project room automatically:
310
423
 
311
- ```bash
312
- thinknsh say Build passed. Deploying to staging now.
313
- thinknsh invite contractor@example.com
314
424
  ```
425
+ 📄 tncproject found
426
+ Room : room-abc123
427
+ File : /home/user/myproject/.tncproject
428
+
429
+ ✅ Raman Singh → room "My Project Room"
430
+ ```
431
+
432
+ If `.tncproject` auth fails, the shell falls back to manual login.
433
+
434
+ ---
435
+
436
+ ## Notification Window
437
+
438
+ When `thinknsh` starts it launches a background TCP notification server on an auto-assigned port (default start: `7379`) and opens a second terminal window to display live events — messages, task updates, user joins/leaves — without interrupting your main shell prompt.
439
+
440
+ On **VS Code** (Windows) the notification window cannot be auto-spawned. The shell prints the command to run it manually:
441
+
442
+ ```
443
+ VS Code detected — open a new terminal tab and run:
444
+ $env:THINKNSH_NOTIFY_PORT=7379; node "path/to/notification-window.js"
445
+ ```
446
+
447
+ On **macOS** it opens in a new Terminal.app window. On **Linux** it tries `gnome-terminal`, `xterm`, and `konsole` in order.
315
448
 
316
449
  ---
317
450
 
318
451
  ## Built-in Shell Features
319
452
 
320
- ### Command History
321
- The interactive shell remembers your previously run commands across sessions. Use the **Up/Down arrow keys** to navigate history.
453
+ ### Persistent History
454
+ Command history is saved to `~/.thinknsh_history` (up to 1000 entries) and restored on every launch. Use **Up/Down arrows** to navigate.
322
455
 
323
- ### Aliases
324
- Create shortcuts for frequently used commands:
456
+ ### Session Persistence
457
+ After `login`, your session token is saved to `~/.thinkncollab/session.json`. The next time you start `thinknsh` you are already authenticated — no password prompt.
325
458
 
459
+ ### Shell Variables
326
460
  ```bash
327
- thinknsh> alias fe="join room-abc123"
328
- thinknsh> fe # runs: join room-abc123
461
+ thinknsh> set ROOM room-abc123
462
+ thinknsh> join $ROOM
329
463
  ```
330
464
 
331
- ### Shell Variables
332
- Set and use variables within the shell:
465
+ ### Aliases
466
+ Built-in aliases: `ll` → `ls -la`, `..` → `cd ..`, `~` → `cd ~`.
467
+
468
+ ### System Shell Passthrough
469
+ Any command that is not a `thinknsh` built-in runs directly in your system shell (`bash` / `cmd.exe`):
333
470
 
334
471
  ```bash
335
- thinknsh> set ROOM=room-abc123
336
- thinknsh> join $ROOM
472
+ thinknsh> git status
473
+ thinknsh> npm install
474
+ thinknsh> python manage.py migrate
337
475
  ```
338
476
 
339
- ### Tab Completion
340
- Press `Tab` to autocomplete commands and room names.
477
+ > **Note:** On Windows, `open`, `which`, `grep`, `touch`, and `cat` are blocked (not available in cmd.exe) — use Windows equivalents or WSL.
341
478
 
342
- ### Piping & Chaining (Single-command mode)
343
- Chain commands using `&&` in your terminal:
479
+ ### Quote Parsing
480
+ Single and double quotes are supported for arguments with spaces:
344
481
 
345
482
  ```bash
346
- thinknsh login && thinknsh join room-abc123 && thinknsh status
483
+ thinknsh> say "Deployment done — all green ✅"
484
+ thinknsh> notify "title=Release v2.1" Pushed to prod
347
485
  ```
348
486
 
349
487
  ---
350
488
 
351
- ## Examples
489
+ ## Single-Command Mode
490
+
491
+ Run any command as a one-liner without entering the interactive shell:
352
492
 
353
493
  ```bash
354
- # Check who you are
494
+ thinknsh status
355
495
  thinknsh whoami
356
-
357
- # See all your rooms, then join one
358
496
  thinknsh rooms
359
497
  thinknsh join room-abc123
498
+ thinknsh say "Deployment complete ✅"
499
+ thinknsh task list
500
+ thinknsh notify "All tests passing"
501
+ ```
502
+
503
+ Chain with `&&` for scripting:
360
504
 
361
- # Send a quick message without opening the shell
362
- thinknsh say "Hotfix deployed to production"
505
+ ```bash
506
+ thinknsh login && thinknsh join room-abc123 && thinknsh say "I'm online"
507
+ ```
363
508
 
364
- # Invite a new member
365
- thinknsh invite dev@company.com
509
+ ---
366
510
 
511
+ ## Examples
512
+
513
+ ```bash
367
514
  # Full interactive session
368
515
  thinknsh
369
516
  thinknsh> login
370
517
  thinknsh> rooms
371
- thinknsh> join frontend-team
518
+ thinknsh> join room-abc123
372
519
  thinknsh> say Good morning everyone 🚀
373
- thinknsh> teammates
520
+ thinknsh> task list
521
+ thinknsh> task accept 64f1a...
522
+ thinknsh> task start 64f1a...
523
+ thinknsh> task complete 64f1a...
524
+ thinknsh> share start
525
+ thinknsh> share grant 64f2b...
526
+ thinknsh> share stop
527
+ thinknsh> notify "Daily standup in 5 mins"
374
528
  thinknsh> status
375
529
  thinknsh> exit
376
- ```
377
530
 
378
- ---
379
-
380
- ## Environment Variables
531
+ # .tncproject auto-boot (no login needed)
532
+ cd ~/myproject # contains .tncproject
533
+ thinknsh # auto-logs in + auto-joins room
381
534
 
382
- | Variable | Default | Description |
383
- |----------|---------|-------------|
384
- | `THINKNCOLLAB_SERVER` | `https://thinkncollab.com` | Main server URL (REST + WebSocket base) |
385
- | `THINKNCOLLAB_API_URL` | `https://thinkncollab.com` | REST API base URL (overrides SERVER for API calls) |
386
- | `THINKNCOLLAB_WS_URL` | `https://thinkncollab.com` | WebSocket server URL |
387
- | `THINKNCOLLAB_AUTO_CONNECT` | `false` | Set to `true` to auto-connect WebSocket on shell start |
388
-
389
- In production, all three URL variables typically point to the same host:
390
-
391
- ```bash
392
- export THINKNCOLLAB_SERVER=https://app.thinkncollab.com
393
- export THINKNCOLLAB_API_URL=https://app.thinkncollab.com
394
- export THINKNCOLLAB_WS_URL=https://app.thinkncollab.com
395
- export THINKNCOLLAB_AUTO_CONNECT=true
535
+ # Quick one-liners from CI / scripts
536
+ thinknsh say "Build #142 passed ✅"
537
+ thinknsh notify "Hotfix deployed to production"
538
+ thinknsh task complete $TASK_ID
396
539
  ```
397
540
 
398
541
  ---
399
542
 
400
543
  ## License
401
544
 
402
- MIT © ThinkNCollab
545
+ © ThinkNCollab