@r5n/hydra 0.3.0 → 0.3.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/README.md +7 -34
- package/dist/cli.js +77 -69
- package/package.json +2 -3
- package/schema.json +1 -1
package/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<a href="https://github.com/r5n-labs">
|
|
3
3
|
<img src="https://avatars.githubusercontent.com/u/186854676?s=200&v=4" alt="R5N Labs" width="100" height="100">
|
|
4
4
|
</a>
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
<h1>Hydra</h1>
|
|
7
7
|
<p><strong>GitHub Self-Hosted Runner Manager</strong></p>
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
<p>
|
|
10
10
|
<a href="https://www.npmjs.com/package/@r5n/hydra">
|
|
11
11
|
<img src="https://img.shields.io/npm/v/@r5n/hydra.svg" alt="npm version">
|
|
@@ -29,7 +29,6 @@ Hydra is a powerful CLI tool for managing multiple GitHub self-hosted runners lo
|
|
|
29
29
|
- 🔧 **Profile-Based Configuration** - Store and reuse configurations with JSON/TOML support
|
|
30
30
|
- 📊 **Real-Time Status Monitoring** - Check runner status with formatted or JSON output
|
|
31
31
|
- 🏃 **Zero Runtime Dependencies** - Fully bundled (~80KB) for optimal performance
|
|
32
|
-
- 🔐 **Secure Token Handling** - Support for environment variables and CLI arguments
|
|
33
32
|
- 🎯 **Cross-Platform Support** - Works on macOS, Linux, and Windows
|
|
34
33
|
|
|
35
34
|
## 📦 Installation
|
|
@@ -37,16 +36,10 @@ Hydra is a powerful CLI tool for managing multiple GitHub self-hosted runners lo
|
|
|
37
36
|
```bash
|
|
38
37
|
# Using Bun (recommended)
|
|
39
38
|
bun add -g @r5n/hydra
|
|
40
|
-
|
|
41
|
-
# Using npm
|
|
42
|
-
npm install -g @r5n/hydra
|
|
43
|
-
|
|
44
|
-
# Using yarn
|
|
45
|
-
yarn global add @r5n/hydra
|
|
39
|
+
hydra --help
|
|
46
40
|
|
|
47
41
|
# Direct usage (no installation)
|
|
48
42
|
bunx @r5n/hydra --help
|
|
49
|
-
npx @r5n/hydra --help
|
|
50
43
|
```
|
|
51
44
|
|
|
52
45
|
## 🚀 Quick Start
|
|
@@ -102,7 +95,7 @@ Create and register new GitHub runner machines.
|
|
|
102
95
|
- `-n, --name` - Runner name prefix (default: "runner")
|
|
103
96
|
- `-l, --labels` - Comma-separated custom labels
|
|
104
97
|
- `-d, --directory` - Runners directory (default: "./gh-runners")
|
|
105
|
-
- `-o, --os` - Operating system: osx, linux, windows (default: "
|
|
98
|
+
- `-o, --os` - Operating system: osx, linux, windows (default: "osx")
|
|
106
99
|
- `-O, --overwrite` - Overwrite existing runners
|
|
107
100
|
- `-p, --profile` - Use configuration profile
|
|
108
101
|
- `-c, --config` - Configuration file path
|
|
@@ -167,7 +160,7 @@ Hydra supports configuration profiles to simplify runner management across diffe
|
|
|
167
160
|
"name": "runner",
|
|
168
161
|
"numberOfMachines": 1,
|
|
169
162
|
"directory": "./gh-runners",
|
|
170
|
-
"os": "
|
|
163
|
+
"os": "osx"
|
|
171
164
|
},
|
|
172
165
|
"production": {
|
|
173
166
|
"url": "https://github.com/org/repo",
|
|
@@ -243,25 +236,6 @@ os = "linux"
|
|
|
243
236
|
1. Never commit tokens to version control
|
|
244
237
|
2. Use read-only tokens when possible
|
|
245
238
|
3. Rotate tokens regularly
|
|
246
|
-
4. Use profiles to avoid repetitive token entry
|
|
247
|
-
|
|
248
|
-
## 🏗️ Architecture
|
|
249
|
-
|
|
250
|
-
### Technology Stack
|
|
251
|
-
|
|
252
|
-
- **Runtime**: Bun
|
|
253
|
-
- **Workers**: Web Workers for parallel execution
|
|
254
|
-
- **Configuration**: JSON/TOML with schema validation
|
|
255
|
-
- **CLI Framework**: Custom with @clack/prompts
|
|
256
|
-
- **Bundle**: Fully self-contained with zero runtime dependencies
|
|
257
|
-
|
|
258
|
-
### How It Works
|
|
259
|
-
|
|
260
|
-
1. **Configuration Loading**: Searches for config files up the directory tree
|
|
261
|
-
2. **Runner Download**: Fetches appropriate runner package from GitHub
|
|
262
|
-
3. **Parallel Setup**: Uses workers to configure multiple runners simultaneously
|
|
263
|
-
4. **Process Management**: Monitors and manages runner processes
|
|
264
|
-
5. **Graceful Shutdown**: Cleanly terminates runners on exit
|
|
265
239
|
|
|
266
240
|
## 📊 Examples
|
|
267
241
|
|
|
@@ -272,7 +246,7 @@ os = "linux"
|
|
|
272
246
|
hydra create -p development -t $GITHUB_TOKEN -m 2
|
|
273
247
|
|
|
274
248
|
# Production with specific labels
|
|
275
|
-
hydra create -p production -t $GITHUB_TOKEN -l "deploy,production
|
|
249
|
+
hydra create -p production -t $GITHUB_TOKEN -l "deploy,production"
|
|
276
250
|
|
|
277
251
|
# Temporary test runners
|
|
278
252
|
hydra create -t $GITHUB_TOKEN -u $REPO_URL -n "test" -m 5
|
|
@@ -300,7 +274,6 @@ fi
|
|
|
300
274
|
1. **"Invalid GitHub token"**
|
|
301
275
|
- Verify token permissions (repo/admin:org scope)
|
|
302
276
|
- Check token expiration
|
|
303
|
-
- Ensure token is correctly passed
|
|
304
277
|
|
|
305
278
|
2. **"Runner configuration failed"**
|
|
306
279
|
- Check network connectivity
|
|
@@ -334,4 +307,4 @@ Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for detai
|
|
|
334
307
|
|
|
335
308
|
<div align="center">
|
|
336
309
|
Built with ❤️ by <a href="https://github.com/r5n-labs">R5N Labs</a>
|
|
337
|
-
</div>
|
|
310
|
+
</div>
|