ccmux-cli 0.2.5
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 +35 -0
- package/bin/cli.js +25 -0
- package/package.json +36 -0
- package/scripts/install.js +71 -0
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# ccmux
|
|
2
|
+
|
|
3
|
+
Claude Code Multiplexer — manage multiple Claude Code instances in TUI split panes.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g ccmux-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
ccmux # Launch in current directory
|
|
15
|
+
ccmux /path/to/project # Launch in specified directory
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- Multi-pane terminal splits (vertical/horizontal)
|
|
21
|
+
- File tree sidebar with syntax-highlighted preview
|
|
22
|
+
- Tab workspaces
|
|
23
|
+
- Claude Code auto-detection (pane border turns orange)
|
|
24
|
+
- Mouse support (click, drag resize, text selection)
|
|
25
|
+
- Terminal scrollback (10,000 lines)
|
|
26
|
+
- Cross-platform (Windows, macOS, Linux)
|
|
27
|
+
|
|
28
|
+
## Documentation
|
|
29
|
+
|
|
30
|
+
- [Docs](https://shin-sibainu.github.io/ccmux/)
|
|
31
|
+
- [GitHub](https://github.com/Shin-sibainu/ccmux)
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
MIT
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
|
|
7
|
+
const isWindows = process.platform === 'win32';
|
|
8
|
+
const binaryName = isWindows ? 'ccmux.exe' : 'ccmux';
|
|
9
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
10
|
+
|
|
11
|
+
if (!fs.existsSync(binaryPath)) {
|
|
12
|
+
console.error('ccmux binary not found. Try reinstalling: npm install -g ccmux-cli');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
execFileSync(binaryPath, process.argv.slice(2), {
|
|
18
|
+
stdio: 'inherit',
|
|
19
|
+
env: process.env,
|
|
20
|
+
});
|
|
21
|
+
} catch (err) {
|
|
22
|
+
if (err.status !== null) {
|
|
23
|
+
process.exit(err.status);
|
|
24
|
+
}
|
|
25
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ccmux-cli",
|
|
3
|
+
"version": "0.2.5",
|
|
4
|
+
"description": "Claude Code Multiplexer — manage multiple Claude Code instances in TUI split panes",
|
|
5
|
+
"bin": {
|
|
6
|
+
"ccmux": "bin/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node scripts/install.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"claude",
|
|
13
|
+
"claude-code",
|
|
14
|
+
"terminal",
|
|
15
|
+
"multiplexer",
|
|
16
|
+
"tui",
|
|
17
|
+
"pane",
|
|
18
|
+
"split",
|
|
19
|
+
"tmux"
|
|
20
|
+
],
|
|
21
|
+
"author": "Shin-sibainu",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/Shin-sibainu/ccmux"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://shin-sibainu.github.io/ccmux/",
|
|
28
|
+
"os": [
|
|
29
|
+
"win32",
|
|
30
|
+
"darwin",
|
|
31
|
+
"linux"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=16"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const https = require('https');
|
|
4
|
+
const { execSync } = require('child_process');
|
|
5
|
+
|
|
6
|
+
const VERSION = require('../package.json').version;
|
|
7
|
+
const REPO = 'Shin-sibainu/ccmux';
|
|
8
|
+
|
|
9
|
+
function getPlatformBinary() {
|
|
10
|
+
const platform = process.platform;
|
|
11
|
+
const arch = process.arch;
|
|
12
|
+
|
|
13
|
+
if (platform === 'win32' && arch === 'x64') return 'ccmux-windows-x64.exe';
|
|
14
|
+
if (platform === 'darwin' && arch === 'arm64') return 'ccmux-macos-arm64';
|
|
15
|
+
if (platform === 'darwin' && arch === 'x64') return 'ccmux-macos-x64';
|
|
16
|
+
if (platform === 'linux' && arch === 'x64') return 'ccmux-linux-x64';
|
|
17
|
+
|
|
18
|
+
console.error(`Unsupported platform: ${platform}-${arch}`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function download(url, dest) {
|
|
23
|
+
return new Promise((resolve, reject) => {
|
|
24
|
+
const follow = (url) => {
|
|
25
|
+
https.get(url, { headers: { 'User-Agent': 'ccmux-installer' } }, (res) => {
|
|
26
|
+
if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
|
|
27
|
+
follow(res.headers.location);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (res.statusCode !== 200) {
|
|
31
|
+
reject(new Error(`Download failed: HTTP ${res.statusCode}`));
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const file = fs.createWriteStream(dest);
|
|
35
|
+
res.pipe(file);
|
|
36
|
+
file.on('finish', () => {
|
|
37
|
+
file.close();
|
|
38
|
+
resolve();
|
|
39
|
+
});
|
|
40
|
+
}).on('error', reject);
|
|
41
|
+
};
|
|
42
|
+
follow(url);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async function main() {
|
|
47
|
+
const binaryName = getPlatformBinary();
|
|
48
|
+
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${binaryName}`;
|
|
49
|
+
const binDir = path.join(__dirname, '..', 'bin');
|
|
50
|
+
const isWindows = process.platform === 'win32';
|
|
51
|
+
const dest = path.join(binDir, isWindows ? 'ccmux.exe' : 'ccmux');
|
|
52
|
+
|
|
53
|
+
console.log(`Downloading ccmux v${VERSION} for ${process.platform}-${process.arch}...`);
|
|
54
|
+
|
|
55
|
+
try {
|
|
56
|
+
await download(url, dest);
|
|
57
|
+
|
|
58
|
+
if (!isWindows) {
|
|
59
|
+
fs.chmodSync(dest, 0o755);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
console.log('ccmux installed successfully!');
|
|
63
|
+
} catch (err) {
|
|
64
|
+
console.error(`Failed to download ccmux: ${err.message}`);
|
|
65
|
+
console.error(`URL: ${url}`);
|
|
66
|
+
console.error('You can download manually from: https://github.com/Shin-sibainu/ccmux/releases');
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
main();
|