Documentation

thinknsh CLI Reference

Interactive terminal shell for ThinkNCollab rooms, real-time file sharing, native sandboxes, and notifications.

Interactive Terminal Sandbox

thinknsh Command Runner

bash · thinkncollab-shell v0.0.10
$ thinknsh rooms join room-01
Connecting to ThinkNCollab gateway (sfu.thinkncollab.com)...
✔ Joined room: #backend-team (room-01)
Members online: 8 | Active sandboxes: 2 | Last activity: 1m ago
⚡ Session synced. Context active in current shell.
$

Installation & Login

Install thinkncollab-shell globally via npm (Node.js 18+ required).

bash
npm install -g thinkncollab-shell
# Authenticate once (credentials stored encrypted in ~/.tncrc)
thinknsh login
# Verify session
thinknsh whoami

Quick Start

bash
# 1. List accessible rooms
thinknsh rooms
# 2. Join a collaboration room
thinknsh rooms join <room-id>
# 3. Push local changes to room
thinknsh push ./src --room <room-id> --all
# 4. Stream real-time room notifications
thinknsh notifications watch

Rooms Management

CommandOptionsDescription
thinknsh rooms--allList rooms you belong to
thinknsh rooms join <id>-Connect terminal context to a room
thinknsh rooms create <name>--privateCreate a new collaboration room
thinknsh rooms info <id>-Inspect room members, files, and activity

Files & Real-Time Push

CommandOptionsDescription
thinknsh push <path>--room <id> --allPush file or directory to room
thinknsh pull <file>--room <id>Pull latest version from room
thinknsh files--room <id>List active files in room
thinknsh files history <file>--room <id>Inspect version history
thinknsh files diff <file>--v1 <n> --v2 <m>Diff two file revisions
bash
# Push entire directory with diff tracking
thinknsh push ./src --room room-01 --all
# Inspect recent revisions
thinknsh files history index.js --room room-01

Notifications

CommandDescription
thinknsh notificationsList unread notifications
thinknsh notifications watchLive streaming terminal panel (Ctrl+C to exit)
thinknsh notifications mark-readMark all notifications as read
thinknsh notifications clearPurge read notifications

Project Linking (tncproject)

Bind your local project root to a ThinkNCollab room for automatic context detection.

CommandDescription
thinknsh tncproject initInitialize .tncproject config in current directory
thinknsh tncproject link <room-id>Bind current project folder to room
thinknsh tncproject statusView linked room and project metadata
thinknsh tncproject unlinkRemove room binding
bash
# One-time setup inside your project directory
thinknsh tncproject init
thinknsh tncproject link room-01
# Future runs in this folder auto-connect
thinknsh

Native Sandboxes & State Sync

Zero-overhead native micro-containers, sub-2ms SIGSTOP process freezing, and database state sync.

CommandOptionsDescription
thinknsh dev--port 3000 --env devLaunch isolated native sandbox container
thinknsh list--all --jsonList active sandboxes with CPU & RAM stats
thinknsh logs <id>-f --tail 100Stream container stdout & stderr
thinknsh freeze <id>-Suspend container process (drops RAM to 0 MB)
thinknsh resume <id>-Resume frozen container in < 2ms
thinknsh snapshot create[name]Create point-in-time Copy-on-Write disk snapshot
thinknsh snapshot restore <id>-Roll back filesystem to snapshot
thinknsh room share--no-mongoBatch export Atlas + Redis keys and broadcast to room
thinknsh room pull--forcePull peer state and run 3-way AST merge

Automated Workflows & Testing

Define test runners evaluated by the server judge before task completion.

HTTP Probe Spec

code
{
"type": "http",
"method": "GET",
"endpoint": "/api/health",
"expect": { "status": 200, "body": { "status": { "eq": "ok" } } }
}

UI Automation Spec

code
{
"url": "https://thinkncollab.com/signin",
"selector": ".dashboard-grid",
"actions": [
{ "action": "fill", "selector": "input[type='email']", "value": "dev@test.com" },
{ "action": "click", "selector": "button[type='submit']" }
]
}

Troubleshooting & Diagnostics

bash
thinknsh system:info # Print system environment & Node version
thinknsh diagnose # Probe API connectivity & token validity
thinknsh cache:clear # Flush local cache
thinknsh token:refresh # Refresh expired credentials

FAQ

What is the difference between thinknsh and tnc-cli?

thinknsh is the interactive terminal shell for rooms, real-time push, and sandboxes. tnc-cli is the Git-integrated task management CLI.

Where is auth config stored?

Stored encrypted in ~/.tncrc. Never commit this file to version control.

How to authenticate in CI/CD pipelines?

Export TNC_EMAIL and TNC_TOKEN environment variables and run thinknsh login --ci.

Get Help & Community

ChannelAction
Docs/mcpdocs and /clidocs online reference
GitHubReport bugs and submit PRs on github.com/thinkncollab
DiscordJoin our developer community server
SupportDirect email: support@thinkncollab.com