codehydra 0.0.1-placeholder
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 +21 -0
- package/README.md +41 -0
- package/codehydra.js +138 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 CodeHydra
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# CodeHydra
|
|
2
|
+
|
|
3
|
+
Multi-workspace IDE for parallel AI agent development.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Run directly without installation
|
|
9
|
+
npx codehydra
|
|
10
|
+
|
|
11
|
+
# Or install globally
|
|
12
|
+
npm install -g codehydra
|
|
13
|
+
codehydra
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- Run multiple AI agents simultaneously in isolated git worktrees
|
|
19
|
+
- Real-time status monitoring across all workspaces
|
|
20
|
+
- Keyboard-driven navigation (Alt+X shortcut mode)
|
|
21
|
+
- Full VS Code integration via code-server
|
|
22
|
+
- Built-in voice dictation
|
|
23
|
+
|
|
24
|
+
## How It Works
|
|
25
|
+
|
|
26
|
+
This package downloads the appropriate CodeHydra binary for your platform from GitHub Releases on first run, caches it locally, and executes it with any passed arguments.
|
|
27
|
+
|
|
28
|
+
Supported platforms:
|
|
29
|
+
|
|
30
|
+
- Linux x64
|
|
31
|
+
- macOS x64 and arm64
|
|
32
|
+
- Windows x64
|
|
33
|
+
|
|
34
|
+
## Links
|
|
35
|
+
|
|
36
|
+
- [GitHub Repository](https://github.com/stefanhoelzl/codehydra)
|
|
37
|
+
- [Releases](https://github.com/stefanhoelzl/codehydra/releases)
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
MIT
|
package/codehydra.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// CodeHydra launcher for npm
|
|
3
|
+
// Downloads and caches the appropriate binary from GitHub Releases
|
|
4
|
+
|
|
5
|
+
const https = require("https");
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const os = require("os");
|
|
9
|
+
const { execSync, spawn } = require("child_process");
|
|
10
|
+
|
|
11
|
+
const VERSION = require("./package.json").version;
|
|
12
|
+
const REPO = "stefanhoelzl/codehydra";
|
|
13
|
+
|
|
14
|
+
// Platform/arch to GitHub asset mapping
|
|
15
|
+
const ASSET_MAP = {
|
|
16
|
+
"linux-x64": "CodeHydra-linux-x64.AppImage",
|
|
17
|
+
"darwin-x64": "CodeHydra-darwin-x64.zip",
|
|
18
|
+
"darwin-arm64": "CodeHydra-darwin-arm64.zip",
|
|
19
|
+
"win32-x64": "CodeHydra-win-portable-x64.zip",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function getCacheDir() {
|
|
23
|
+
const platform = os.platform();
|
|
24
|
+
if (platform === "linux") {
|
|
25
|
+
return path.join(
|
|
26
|
+
process.env.XDG_DATA_HOME || path.join(os.homedir(), ".local", "share"),
|
|
27
|
+
"codehydra",
|
|
28
|
+
"releases",
|
|
29
|
+
VERSION
|
|
30
|
+
);
|
|
31
|
+
} else if (platform === "darwin") {
|
|
32
|
+
return path.join(
|
|
33
|
+
os.homedir(),
|
|
34
|
+
"Library",
|
|
35
|
+
"Application Support",
|
|
36
|
+
"Codehydra",
|
|
37
|
+
"releases",
|
|
38
|
+
VERSION
|
|
39
|
+
);
|
|
40
|
+
} else if (platform === "win32") {
|
|
41
|
+
return path.join(
|
|
42
|
+
process.env.LOCALAPPDATA || path.join(os.homedir(), "AppData", "Local"),
|
|
43
|
+
"Codehydra",
|
|
44
|
+
"releases",
|
|
45
|
+
VERSION
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function getAssetName() {
|
|
52
|
+
const key = `${os.platform()}-${os.arch()}`;
|
|
53
|
+
const asset = ASSET_MAP[key];
|
|
54
|
+
if (!asset) {
|
|
55
|
+
throw new Error(`Unsupported platform: ${key}`);
|
|
56
|
+
}
|
|
57
|
+
return asset;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function getBinaryPath(cacheDir, assetName) {
|
|
61
|
+
const platform = os.platform();
|
|
62
|
+
if (platform === "win32") {
|
|
63
|
+
return path.join(cacheDir, "CodeHydra-win-portable-x64", "CodeHydra.exe");
|
|
64
|
+
} else if (platform === "darwin") {
|
|
65
|
+
const appName = assetName.replace(".zip", "");
|
|
66
|
+
return path.join(cacheDir, appName, "CodeHydra.app", "Contents", "MacOS", "CodeHydra");
|
|
67
|
+
}
|
|
68
|
+
return path.join(cacheDir, assetName);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function download(url, destPath) {
|
|
72
|
+
return new Promise((resolve, reject) => {
|
|
73
|
+
const tmpPath = destPath + ".tmp";
|
|
74
|
+
https
|
|
75
|
+
.get(url, { headers: { "User-Agent": `codehydra-npm/${VERSION}` } }, (res) => {
|
|
76
|
+
if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
|
|
77
|
+
download(res.headers.location, destPath).then(resolve).catch(reject);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (res.statusCode !== 200) {
|
|
81
|
+
reject(new Error(`HTTP ${res.statusCode}: ${res.statusMessage}`));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const file = fs.createWriteStream(tmpPath);
|
|
85
|
+
res.pipe(file);
|
|
86
|
+
file.on("finish", () => {
|
|
87
|
+
file.close(() => {
|
|
88
|
+
fs.renameSync(tmpPath, destPath);
|
|
89
|
+
resolve();
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
file.on("error", reject);
|
|
93
|
+
res.on("error", reject);
|
|
94
|
+
})
|
|
95
|
+
.on("error", reject);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async function main() {
|
|
100
|
+
const cacheDir = getCacheDir();
|
|
101
|
+
const assetName = getAssetName();
|
|
102
|
+
const binaryPath = getBinaryPath(cacheDir, assetName);
|
|
103
|
+
|
|
104
|
+
if (!fs.existsSync(binaryPath)) {
|
|
105
|
+
console.log(`Downloading CodeHydra ${VERSION}...`);
|
|
106
|
+
fs.mkdirSync(cacheDir, { recursive: true });
|
|
107
|
+
|
|
108
|
+
const downloadUrl = `https://github.com/${REPO}/releases/download/v${VERSION}/${assetName}`;
|
|
109
|
+
const downloadPath = path.join(cacheDir, assetName);
|
|
110
|
+
await download(downloadUrl, downloadPath);
|
|
111
|
+
|
|
112
|
+
if (assetName.endsWith(".zip")) {
|
|
113
|
+
console.log("Extracting...");
|
|
114
|
+
if (os.platform() === "win32") {
|
|
115
|
+
execSync(
|
|
116
|
+
`powershell -Command "Expand-Archive -Path '${downloadPath}' -DestinationPath '${cacheDir}' -Force"`,
|
|
117
|
+
{ stdio: "pipe" }
|
|
118
|
+
);
|
|
119
|
+
} else {
|
|
120
|
+
execSync(`unzip -q -o "${downloadPath}" -d "${cacheDir}"`, { stdio: "pipe" });
|
|
121
|
+
}
|
|
122
|
+
fs.unlinkSync(downloadPath);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (os.platform() !== "win32") {
|
|
126
|
+
fs.chmodSync(binaryPath, 0o755);
|
|
127
|
+
}
|
|
128
|
+
console.log("Done!\n");
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const child = spawn(binaryPath, process.argv.slice(2), { stdio: "inherit" });
|
|
132
|
+
child.on("exit", (code) => process.exit(code || 0));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
main().catch((err) => {
|
|
136
|
+
console.error(err.message);
|
|
137
|
+
process.exit(1);
|
|
138
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "codehydra",
|
|
3
|
+
"version": "0.0.1-placeholder",
|
|
4
|
+
"description": "Multi-workspace IDE for parallel AI agent development",
|
|
5
|
+
"bin": {
|
|
6
|
+
"codehydra": "./codehydra.js"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/stefanhoelzl/codehydra.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ai",
|
|
14
|
+
"agent",
|
|
15
|
+
"ide",
|
|
16
|
+
"vscode",
|
|
17
|
+
"git",
|
|
18
|
+
"worktree"
|
|
19
|
+
],
|
|
20
|
+
"author": "Stefan Hoelzl",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/stefanhoelzl/codehydra/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/stefanhoelzl/codehydra#readme",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=18.0.0"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"codehydra.js",
|
|
31
|
+
"README.md"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"test": "echo \"Manual testing required - see planning/NPM_PYPI_LAUNCHERS.md\" && exit 0"
|
|
35
|
+
}
|
|
36
|
+
}
|