tacticremote 1.6.6 → 1.8.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/LICENSE +28 -0
- package/README.md +33 -41
- package/bin/tacticremote.js +41 -101
- package/package.json +30 -41
- package/bin/tactic-remote-server.js +0 -636
- package/lib/authChallengeManager.js +0 -134
- package/lib/bonjourPublisher.js +0 -68
- package/lib/errorCodes.js +0 -127
- package/lib/execSafe.js +0 -218
- package/lib/fileService.js +0 -177
- package/lib/hookInstaller.js +0 -239
- package/lib/outputParser.js +0 -106
- package/lib/rateLimiter.js +0 -111
- package/lib/tmuxManager.js +0 -671
- package/lib/uploadService.js +0 -366
- package/lib/validators.js +0 -350
- package/middleware/authMiddleware.js +0 -152
- package/routes/httpHandler.js +0 -111
- package/routes/wsHandler.js +0 -1040
- package/server.js +0 -342
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Proprietary Software License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TacticSpace Tech (https://tacticspacetech.com/). All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and associated documentation files (the "Software") are proprietary
|
|
6
|
+
and confidential. Unauthorized copying, modification, distribution, or use of
|
|
7
|
+
this Software, via any medium, is strictly prohibited.
|
|
8
|
+
|
|
9
|
+
The Software is provided for personal, non-commercial use only. You may:
|
|
10
|
+
- Download and use the Software for personal purposes
|
|
11
|
+
- Report bugs and suggest improvements
|
|
12
|
+
|
|
13
|
+
You may NOT:
|
|
14
|
+
- Copy, modify, or distribute the source code
|
|
15
|
+
- Reverse engineer, decompile, or disassemble the Software
|
|
16
|
+
- Use the Software for commercial purposes without written permission
|
|
17
|
+
- Sublicense, sell, or transfer the Software to third parties
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
|
|
27
|
+
For licensing inquiries, visit https://tacticspacetech.com/ or contact
|
|
28
|
+
through the repository.
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TacticRemote
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Control Claude Code (and other AI coding agents) from your iPhone or iPad.
|
|
4
|
+
|
|
5
|
+
[Website](https://tacticremote.com) · [iOS App](https://apps.apple.com/app/id6748739057) · [Issues](https://github.com/TacticSpaceTech/TacticRemote/issues)
|
|
4
6
|
|
|
5
7
|
## Quick Start
|
|
6
8
|
|
|
@@ -8,56 +10,46 @@ Server component for [Tactic Remote](https://tacticremote.com) — control Claud
|
|
|
8
10
|
npx tacticremote
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
**Alternative install via Homebrew:**
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
brew install TacticSpaceTech/tap/tacticremote
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
[](https://apps.apple.com/app/tactic-remote-ai-coding/id6758008464)
|
|
20
|
-
|
|
21
|
-
## Prerequisites
|
|
22
|
-
|
|
23
|
-
- **Node.js** 16+
|
|
24
|
-
- **tmux** — install with `brew install tmux` (macOS) or `sudo apt install tmux` (Linux)
|
|
25
|
-
- **Claude Code CLI** — install from [claude.ai/code](https://claude.ai/code)
|
|
13
|
+
The server starts on port 8765 and advertises itself via mDNS. Open the TacticRemote app on your iPhone or iPad and tap **Pair** — it will find your Mac automatically on the same Wi-Fi network.
|
|
26
14
|
|
|
27
15
|
## Options
|
|
28
16
|
|
|
29
17
|
```
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
18
|
+
-p, --port <n> Port to listen on [8765]
|
|
19
|
+
--path <dir> Allowed base directory [$HOME]
|
|
20
|
+
--api-key <key> Require authentication on connect
|
|
21
|
+
--tunnel Enable Cloudflare tunnel (public access)
|
|
22
|
+
--install-hooks Install Claude Code hooks (for notifications)
|
|
23
|
+
--no-hooks Skip hook installation
|
|
24
|
+
--remove-hooks Remove installed hooks and exit
|
|
25
|
+
--no-bonjour Disable mDNS discovery
|
|
26
|
+
--no-qr Don't show QR code at startup
|
|
27
|
+
--no-interactive Skip interactive prompts
|
|
28
|
+
--no-color Disable colored output
|
|
29
|
+
-v, --version Show version
|
|
30
|
+
-h, --help Show help
|
|
39
31
|
```
|
|
40
32
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| Variable | Description |
|
|
44
|
-
|----------|-------------|
|
|
45
|
-
| `PORT` | Server port (default: 8765) |
|
|
46
|
-
| `CLAUDE_REMOTE_API_KEY` | Authentication key |
|
|
47
|
-
| `CLAUDE_REMOTE_ALLOWED_PATH` | Base directory for file operations |
|
|
33
|
+
Examples:
|
|
48
34
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
```bash
|
|
36
|
+
npx tacticremote # default
|
|
37
|
+
npx tacticremote --tunnel --api-key mysecret # public access via Cloudflare tunnel
|
|
38
|
+
npx tacticremote -p 9000 --path ~/projects # custom port + restricted path
|
|
53
39
|
```
|
|
54
40
|
|
|
55
|
-
|
|
41
|
+
## Supported Platforms
|
|
56
42
|
|
|
57
|
-
|
|
43
|
+
- macOS — Apple Silicon (arm64) and Intel (x64)
|
|
44
|
+
- Linux — arm64 and x64
|
|
45
|
+
- Windows — x64
|
|
58
46
|
|
|
59
|
-
|
|
47
|
+
`npm` automatically downloads only the binary matching your platform; no extra setup required.
|
|
60
48
|
|
|
61
49
|
## License
|
|
62
50
|
|
|
63
|
-
|
|
51
|
+
TacticRemote is **proprietary software**. See [LICENSE](./LICENSE) for the full terms.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
© 2026 Shanghai TacticSpace Technology Co., Ltd. All rights reserved.
|
package/bin/tacticremote.js
CHANGED
|
@@ -1,124 +1,64 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
2
|
'use strict';
|
|
4
3
|
|
|
5
|
-
const os = require('os');
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const https = require('https');
|
|
9
|
-
const http = require('http');
|
|
10
|
-
const zlib = require('zlib');
|
|
11
4
|
const { spawn } = require('child_process');
|
|
5
|
+
const path = require('path');
|
|
12
6
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
if (arch !== 'arm64' && arch !== 'x64') {
|
|
26
|
-
console.error(` Unsupported architecture: ${arch}`);
|
|
27
|
-
console.error(' Supported: arm64, x64');
|
|
28
|
-
process.exit(1);
|
|
29
|
-
}
|
|
30
|
-
return `${platform}-${arch}`;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function getBinaryName() {
|
|
34
|
-
return `tacticremote-${getPlatformKey()}`;
|
|
7
|
+
const SUPPORTED = new Set([
|
|
8
|
+
'darwin-arm64',
|
|
9
|
+
'darwin-x64',
|
|
10
|
+
'linux-arm64',
|
|
11
|
+
'linux-x64',
|
|
12
|
+
'win32-x64',
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
function platformPackageName() {
|
|
16
|
+
const key = `${process.platform}-${process.arch}`;
|
|
17
|
+
if (!SUPPORTED.has(key)) return null;
|
|
18
|
+
return `@tacticremote/server-${key}`;
|
|
35
19
|
}
|
|
36
20
|
|
|
37
|
-
function
|
|
38
|
-
|
|
21
|
+
function resolveBinary(pkg) {
|
|
22
|
+
const pkgJsonPath = require.resolve(`${pkg}/package.json`);
|
|
23
|
+
const pkgDir = path.dirname(pkgJsonPath);
|
|
24
|
+
const exe = process.platform === 'win32' ? 'tacticremote-server.exe' : 'tacticremote-server';
|
|
25
|
+
return path.join(pkgDir, 'bin', exe);
|
|
39
26
|
}
|
|
40
27
|
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
if (res.statusCode !== 200) {
|
|
50
|
-
reject(new Error(`Download failed: HTTP ${res.statusCode}`));
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const chunks = [];
|
|
54
|
-
res.on('data', (chunk) => chunks.push(chunk));
|
|
55
|
-
res.on('end', () => resolve(Buffer.concat(chunks)));
|
|
56
|
-
res.on('error', reject);
|
|
57
|
-
}).on('error', reject);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async function ensureBinary() {
|
|
62
|
-
const binaryPath = getBinaryPath();
|
|
63
|
-
|
|
64
|
-
if (fs.existsSync(binaryPath)) {
|
|
65
|
-
return binaryPath;
|
|
28
|
+
function main() {
|
|
29
|
+
const pkg = platformPackageName();
|
|
30
|
+
if (!pkg) {
|
|
31
|
+
console.error(`tacticremote: unsupported platform ${process.platform}-${process.arch}`);
|
|
32
|
+
console.error('Supported: darwin/linux/win32 × arm64/x64');
|
|
33
|
+
console.error('See https://tacticremote.com for installation help.');
|
|
34
|
+
process.exit(1);
|
|
66
35
|
}
|
|
67
36
|
|
|
68
|
-
|
|
69
|
-
const url = `https://github.com/${REPO}/releases/download/cli-v${VERSION}/${binaryName}.gz`;
|
|
70
|
-
|
|
71
|
-
console.log('');
|
|
72
|
-
console.log(` Downloading tacticremote v${VERSION} for ${getPlatformKey()}...`);
|
|
73
|
-
console.log(` ${url}`);
|
|
74
|
-
console.log('');
|
|
75
|
-
|
|
37
|
+
let binPath;
|
|
76
38
|
try {
|
|
77
|
-
|
|
78
|
-
const binary = zlib.gunzipSync(gzData);
|
|
79
|
-
|
|
80
|
-
fs.mkdirSync(CACHE_DIR, { recursive: true });
|
|
81
|
-
fs.writeFileSync(binaryPath, binary, { mode: 0o755 });
|
|
82
|
-
|
|
83
|
-
console.log(` Cached at ${binaryPath}`);
|
|
84
|
-
console.log('');
|
|
85
|
-
|
|
86
|
-
return binaryPath;
|
|
39
|
+
binPath = resolveBinary(pkg);
|
|
87
40
|
} catch (err) {
|
|
88
|
-
console.error(`
|
|
89
|
-
console.error('');
|
|
90
|
-
console.error('
|
|
91
|
-
console.error(` https://github.com/${REPO}/releases`);
|
|
41
|
+
console.error(`tacticremote: failed to locate platform package "${pkg}".`);
|
|
42
|
+
console.error('This usually means npm skipped the optional dependency. Try reinstalling:');
|
|
43
|
+
console.error(' npm install -g tacticremote');
|
|
92
44
|
console.error('');
|
|
45
|
+
console.error('If the issue persists, please report it at:');
|
|
46
|
+
console.error(' https://github.com/TacticSpaceTech/TacticRemote/issues');
|
|
93
47
|
process.exit(1);
|
|
94
48
|
}
|
|
95
|
-
}
|
|
96
49
|
|
|
97
|
-
|
|
98
|
-
// Pass-through flags that don't need the binary
|
|
99
|
-
const args = process.argv.slice(2);
|
|
100
|
-
if (args.includes('--version') || args.includes('-v')) {
|
|
101
|
-
console.log(VERSION);
|
|
102
|
-
process.exit(0);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const binaryPath = await ensureBinary();
|
|
106
|
-
|
|
107
|
-
const child = spawn(binaryPath, args, {
|
|
108
|
-
stdio: 'inherit',
|
|
109
|
-
env: process.env
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
child.on('exit', (code) => process.exit(code || 0));
|
|
50
|
+
const child = spawn(binPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
113
51
|
child.on('error', (err) => {
|
|
114
|
-
console.error(`
|
|
52
|
+
console.error(`tacticremote: failed to launch server binary: ${err.message}`);
|
|
115
53
|
process.exit(1);
|
|
116
54
|
});
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
55
|
+
child.on('exit', (code, signal) => {
|
|
56
|
+
if (signal) {
|
|
57
|
+
process.kill(process.pid, signal);
|
|
58
|
+
} else {
|
|
59
|
+
process.exit(code ?? 0);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
122
62
|
}
|
|
123
63
|
|
|
124
64
|
main();
|
package/package.json
CHANGED
|
@@ -1,20 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tacticremote",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Control
|
|
3
|
+
"version": "1.8.1",
|
|
4
|
+
"description": "Control AI coding agents from your iPhone or iPad — Tactic Remote CLI",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
5
6
|
"bin": {
|
|
6
|
-
"tacticremote": "./bin/
|
|
7
|
+
"tacticremote": "./bin/tacticremote.js"
|
|
7
8
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/tacticremote.js",
|
|
11
|
+
"LICENSE",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=16"
|
|
16
|
+
},
|
|
17
|
+
"optionalDependencies": {
|
|
18
|
+
"@tacticremote/server-darwin-arm64": "1.8.1",
|
|
19
|
+
"@tacticremote/server-darwin-x64": "1.8.1",
|
|
20
|
+
"@tacticremote/server-linux-arm64": "1.8.1",
|
|
21
|
+
"@tacticremote/server-linux-x64": "1.8.1",
|
|
22
|
+
"@tacticremote/server-win32-x64": "1.8.1"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/TacticSpaceTech/TacticRemote"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://tacticremote.com",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/TacticSpaceTech/TacticRemote/issues"
|
|
14
31
|
},
|
|
15
32
|
"keywords": [
|
|
16
33
|
"claude-code",
|
|
17
34
|
"claude",
|
|
35
|
+
"codex",
|
|
36
|
+
"amp",
|
|
37
|
+
"ai-coding",
|
|
18
38
|
"remote",
|
|
19
39
|
"terminal",
|
|
20
40
|
"tmux",
|
|
@@ -23,36 +43,5 @@
|
|
|
23
43
|
"websocket",
|
|
24
44
|
"mobile"
|
|
25
45
|
],
|
|
26
|
-
"author": "TacticSpace Tech <support@tacticremote.com>"
|
|
27
|
-
"license": "MIT",
|
|
28
|
-
"repository": {
|
|
29
|
-
"type": "git",
|
|
30
|
-
"url": "https://github.com/TacticSpaceTech/TacticRemote"
|
|
31
|
-
},
|
|
32
|
-
"homepage": "https://tacticremote.com",
|
|
33
|
-
"bugs": {
|
|
34
|
-
"url": "https://github.com/TacticSpaceTech/TacticRemote/issues"
|
|
35
|
-
},
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=16.0.0"
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"ws": "^8.14.2",
|
|
41
|
-
"bonjour-service": "^1.2.1",
|
|
42
|
-
"qrcode-terminal": "^0.12.0"
|
|
43
|
-
},
|
|
44
|
-
"devDependencies": {
|
|
45
|
-
"eslint": "^8.57.0",
|
|
46
|
-
"jest": "^30.2.0",
|
|
47
|
-
"prettier": "^3.2.5"
|
|
48
|
-
},
|
|
49
|
-
"files": [
|
|
50
|
-
"bin/",
|
|
51
|
-
"lib/",
|
|
52
|
-
"middleware/",
|
|
53
|
-
"routes/",
|
|
54
|
-
"server.js",
|
|
55
|
-
"README.md",
|
|
56
|
-
"LICENSE"
|
|
57
|
-
]
|
|
46
|
+
"author": "TacticSpace Tech <support@tacticremote.com>"
|
|
58
47
|
}
|