@humanu/orchestra 0.5.2
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 +18 -0
- package/bin/orchestra-macos-arm64 +0 -0
- package/bin/orchestra-macos-intel +0 -0
- package/install.js +155 -0
- package/package.json +52 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Orchestra
|
|
2
|
+
|
|
3
|
+
Orchestra is a terminal-first orchestrator that combines a Rust-powered TUI (`gwr`) and Bash CLI (`gw`) for AI-driven Git worktree and tmux session management.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @humanu/orchestra
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
gwr # Launch the Rust TUI
|
|
15
|
+
gw # Use the CLI interface
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
For full documentation and release notes, visit https://github.com/humanunsupervised/orchestra
|
|
Binary file
|
|
Binary file
|
package/install.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const os = require('os');
|
|
7
|
+
|
|
8
|
+
const BINARY_NAME = 'gw-tui';
|
|
9
|
+
const SUPPORTED_PLATFORMS = {
|
|
10
|
+
'darwin-x64': 'macos-x64',
|
|
11
|
+
'darwin-arm64': 'macos-arm64',
|
|
12
|
+
'linux-x64': 'linux-x64',
|
|
13
|
+
'linux-arm64': 'linux-arm64'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
function getPlatform() {
|
|
17
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
18
|
+
if (!SUPPORTED_PLATFORMS[platform]) {
|
|
19
|
+
console.error(`Unsupported platform: ${platform}`);
|
|
20
|
+
console.error('Supported platforms:', Object.keys(SUPPORTED_PLATFORMS).join(', '));
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
return SUPPORTED_PLATFORMS[platform];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function downloadPrebuiltBinary() {
|
|
27
|
+
const platform = getPlatform();
|
|
28
|
+
const binaryPath = path.join(__dirname, 'dist', BINARY_NAME);
|
|
29
|
+
const prebuiltPath = path.join(__dirname, 'dist', 'prebuilt', platform, BINARY_NAME);
|
|
30
|
+
|
|
31
|
+
// Check if prebuilt binary exists
|
|
32
|
+
if (fs.existsSync(prebuiltPath)) {
|
|
33
|
+
console.log(`Using prebuilt binary for ${platform}`);
|
|
34
|
+
fs.copyFileSync(prebuiltPath, binaryPath);
|
|
35
|
+
fs.chmodSync(binaryPath, 0o755);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function buildFromSource() {
|
|
43
|
+
console.log('Building from source...');
|
|
44
|
+
|
|
45
|
+
// Check for Rust
|
|
46
|
+
try {
|
|
47
|
+
execSync('cargo --version', { stdio: 'ignore' });
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error('Rust is not installed. Please install Rust from https://rustup.rs/');
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Build the Rust binary
|
|
54
|
+
try {
|
|
55
|
+
console.log('Building gw-tui...');
|
|
56
|
+
// Go up two directories to find gw-tui (npm package is in install/npm/)
|
|
57
|
+
const projectRoot = path.join(__dirname, '..', '..');
|
|
58
|
+
execSync('cd gw-tui && cargo build --release', {
|
|
59
|
+
stdio: 'inherit',
|
|
60
|
+
cwd: projectRoot
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Copy the built binary to dist
|
|
64
|
+
const sourcePath = path.join(projectRoot, 'gw-tui', 'target', 'release', BINARY_NAME);
|
|
65
|
+
const destPath = path.join(__dirname, 'dist', BINARY_NAME);
|
|
66
|
+
|
|
67
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
68
|
+
fs.chmodSync(destPath, 0o755);
|
|
69
|
+
|
|
70
|
+
console.log('Successfully built from source');
|
|
71
|
+
} catch (error) {
|
|
72
|
+
console.error('Failed to build from source:', error.message);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function setupShellWrappers() {
|
|
78
|
+
console.log('\n📝 Shell wrapper functions needed for directory switching:');
|
|
79
|
+
console.log('Add these to your ~/.bashrc or ~/.zshrc:\n');
|
|
80
|
+
|
|
81
|
+
const installPath = __dirname;
|
|
82
|
+
|
|
83
|
+
console.log(`# GW Orchestrator shell wrappers
|
|
84
|
+
gwr() {
|
|
85
|
+
local out="$(${path.join(installPath, 'dist', 'gwr.sh')} "$@")"
|
|
86
|
+
local status=$?
|
|
87
|
+
local cd_line="$(echo "$out" | grep -m1 '^cd')"
|
|
88
|
+
[[ -n $cd_line ]] && eval "$cd_line"
|
|
89
|
+
echo "$out" | grep -v '^cd'
|
|
90
|
+
return $status
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
gw() {
|
|
94
|
+
local out="$(${path.join(installPath, 'dist', 'gw.sh')} "$@")"
|
|
95
|
+
local status=$?
|
|
96
|
+
local cd_line="$(echo "$out" | grep -m1 '^cd')"
|
|
97
|
+
[[ -n $cd_line ]] && eval "$cd_line"
|
|
98
|
+
echo "$out" | grep -v '^cd'
|
|
99
|
+
return $status
|
|
100
|
+
}`);
|
|
101
|
+
|
|
102
|
+
console.log('\nThen run: source ~/.bashrc (or source ~/.zshrc)');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function main() {
|
|
106
|
+
console.log('Installing gw-orchestrator...\n');
|
|
107
|
+
|
|
108
|
+
// Create dist directory if it doesn't exist
|
|
109
|
+
const distDir = path.join(__dirname, 'dist');
|
|
110
|
+
if (!fs.existsSync(distDir)) {
|
|
111
|
+
fs.mkdirSync(distDir, { recursive: true });
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Copy shell scripts to dist (from project root, since npm package is in install/npm/)
|
|
115
|
+
const projectRoot = path.join(__dirname, '..', '..');
|
|
116
|
+
const shellScripts = ['gwr.sh', 'gw.sh', 'gw-bridge.sh', 'commands.sh'];
|
|
117
|
+
const apiDir = path.join(projectRoot, 'api');
|
|
118
|
+
|
|
119
|
+
shellScripts.forEach(script => {
|
|
120
|
+
const sourcePath = path.join(projectRoot, script);
|
|
121
|
+
const destPath = path.join(distDir, script);
|
|
122
|
+
if (fs.existsSync(sourcePath)) {
|
|
123
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
124
|
+
fs.chmodSync(destPath, 0o755);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// Copy api directory
|
|
129
|
+
const distApiDir = path.join(distDir, 'api');
|
|
130
|
+
if (!fs.existsSync(distApiDir)) {
|
|
131
|
+
fs.mkdirSync(distApiDir, { recursive: true });
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (fs.existsSync(apiDir)) {
|
|
135
|
+
fs.readdirSync(apiDir).forEach(file => {
|
|
136
|
+
const sourcePath = path.join(apiDir, file);
|
|
137
|
+
const destPath = path.join(distApiDir, file);
|
|
138
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
139
|
+
fs.chmodSync(destPath, 0o755);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Try to use prebuilt binary, otherwise build from source
|
|
144
|
+
if (!downloadPrebuiltBinary()) {
|
|
145
|
+
buildFromSource();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
console.log('\n✅ Installation complete!');
|
|
149
|
+
|
|
150
|
+
// Setup shell wrappers
|
|
151
|
+
setupShellWrappers();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Run installation
|
|
155
|
+
main();
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@humanu/orchestra",
|
|
3
|
+
"version": "0.5.2",
|
|
4
|
+
"description": "AI-powered Git worktree and tmux session manager with modern TUI",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"git",
|
|
7
|
+
"worktree",
|
|
8
|
+
"tmux",
|
|
9
|
+
"terminal",
|
|
10
|
+
"tui",
|
|
11
|
+
"ai",
|
|
12
|
+
"orchestrator",
|
|
13
|
+
"cli",
|
|
14
|
+
"opencode",
|
|
15
|
+
"claude"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://github.com/humanunsupervised/orchestra",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/humanunsupervised/orchestra/issues"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/humanunsupervised/orchestra.git"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"author": "Human Unsupervised",
|
|
27
|
+
"main": "install.js",
|
|
28
|
+
"bin": {
|
|
29
|
+
"orchestra": "./install.js",
|
|
30
|
+
"gwr": "./install.js",
|
|
31
|
+
"gw": "./install.js"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"bin/",
|
|
35
|
+
"install.js",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"postinstall": "node install.js"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=14.0.0"
|
|
43
|
+
},
|
|
44
|
+
"os": [
|
|
45
|
+
"darwin",
|
|
46
|
+
"linux"
|
|
47
|
+
],
|
|
48
|
+
"cpu": [
|
|
49
|
+
"x64",
|
|
50
|
+
"arm64"
|
|
51
|
+
]
|
|
52
|
+
}
|