npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@r5n/hydra

v0.5.8

Published

A tool for spawning multiple local GitHub self-hosted runners

Readme


Overview

Tired of manually setting up GitHub Actions runners? Hydra transforms hours of tedious work into a single command. Create, manage, and monitor dozens of self-hosted runners with the simplicity you've been craving.

✨ Why Hydra?

  • 🚀 Lightning Fast - Create 20 runners in the time it takes to manually create 1
  • 🔧 Smart Profiles - Define once, deploy anywhere with reusable configs
  • 📊 Live Insights - See exactly what your runners are doing in real-time
  • 🏃 73KB of Pure Speed - Installs before your coffee finishes brewing
  • 🎯 Works Everywhere - macOS, Linux, Windows - we've got you covered

🎯 What Can You Do?

$ hydra create -t $TOKEN -u https://github.com/myorg/repo -m 10 -l "gpu,docker"
⠋ Downloading runner package... (2.1s)
✔ Created runner gpu-runner-1
✔ Created runner gpu-runner-2
✔ Created runner gpu-runner-3
✔ Created runner gpu-runner-4
✔ Created runner gpu-runner-5
✔ Created runner gpu-runner-6
✔ Created runner gpu-runner-7
✔ Created runner gpu-runner-8
✔ Created runner gpu-runner-9
✔ Created runner gpu-runner-10
✅ All 10 runners created successfully in 8.3s
$ hydra status -p production
┌─────────────────┬─────────┬───────────┬──────────────┐
│ Name            │ Status  │ Busy      │ Labels       │
├─────────────────┼─────────┼───────────┼──────────────┤
│ prod-runner-1   │ ✅ Idle │ No        │ linux,docker │
│ prod-runner-2   │ ✅ Idle │ No        │ linux,docker │
│ prod-runner-3   │ 🔄 Busy │ Yes (2m)  │ linux,docker │
│ prod-runner-4   │ ✅ Idle │ No        │ linux,docker │
│ prod-runner-5   │ ❌ Offline │ -      │ linux,docker │
└─────────────────┴─────────┴───────────┴──────────────┘
Summary: 3 idle, 1 busy, 1 offline
$ hydra status -p production
🔍 Checking runner status...
✅ Runner 1: Online (idle)
✅ Runner 2: Online (busy - job #1234)
✅ Runner 3: Online (idle)
   ✓ Created runner-4
   ✓ Created runner-5

🔍 Monitoring continues... (press Ctrl+C to stop)

📦 Installation

# Using Bun (recommended)
bun add -g @r5n/hydra
hydra --help

# Direct usage (no installation)
bunx @r5n/hydra --help

🚀 Quick Start

1. Initialize Configuration

# Interactive setup
hydra init

# Use TOML format
hydra init --toml

2. Create Runners

# Basic usage
hydra create -t YOUR_TOKEN -u https://github.com/org/repo

# Create multiple runners with labels
hydra create -t YOUR_TOKEN -u REPO_URL -m 3 -l "docker,gpu"

# Using a profile
hydra create -p production -t YOUR_TOKEN

3. Monitor Status

# Check runner status
hydra status -t YOUR_TOKEN -u REPO_URL

# JSON output for automation
hydra status -t YOUR_TOKEN -u REPO_URL --json

📖 Commands

hydra init

Initialize a new configuration file with profiles.

Options:

  • -t, --toml - Use TOML format instead of JSON

hydra create

Create and register new GitHub runner machines.

Options:

  • -t, --token - GitHub Personal Access Token (required)
  • -u, --url - GitHub repository/organization URL (required)
  • -m, --numberOfMachines - Number of runners to create (default: 1)
  • -n, --name - Runner name prefix (default: "runner")
  • -l, --labels - Comma-separated custom labels
  • -d, --directory - Runners directory (default: "./gh-runners")
  • -o, --os - Operating system: osx, linux, windows (default: "osx")
  • -O, --overwrite - Overwrite existing runners
  • -p, --profile - Use configuration profile
  • -c, --config - Configuration file path

hydra run

Start existing GitHub runner machines.

Options:

  • -t, --token - GitHub Personal Access Token (required)
  • -u, --url - GitHub repository/organization URL (required)
  • -m, --numberOfMachines - Number of runners (default: 1)
  • -n, --name - Runner name prefix
  • -d, --directory - Runners directory
  • -p, --profile - Use configuration profile
  • -c, --config - Configuration file path

hydra remove

Remove GitHub runner machines.

Options:

  • -t, --token - GitHub Personal Access Token (required)
  • -u, --url - GitHub repository/organization URL (required)
  • -m, --numberOfMachines - Number of runners (default: 1)
  • -n, --name - Runner name prefix
  • -d, --directory - Runners directory
  • -f, --force - Force removal without unregistering
  • -p, --profile - Use configuration profile
  • -c, --config - Configuration file path

hydra status

Check the status of GitHub runner machines.

Options:

  • -t, --token - GitHub Personal Access Token (required)
  • -u, --url - GitHub repository/organization URL (required)
  • -d, --directory - Runners directory
  • -j, --json - Output as JSON
  • -p, --profile - Use configuration profile
  • -c, --config - Configuration file path

hydra help

Show help information for commands.

hydra help
hydra help create
hydra create --help

🔧 Configuration

The Magic of Profiles 🎭

Stop typing the same commands over and over. Profiles let you define your runner configurations once and reuse them everywhere:

Example: hydra.json

{
  "profiles": {
    "default": {
      "name": "runner",
      "numberOfMachines": 1,
      "directory": "./gh-runners",
      "os": "osx"
    },
    "production": {
      "url": "https://github.com/org/repo",
      "name": "prod-runner",
      "numberOfMachines": 3,
      "labels": "production,linux,docker",
      "directory": "/opt/runners/prod",
      "os": "linux"
    },
    "development": {
      "url": "https://github.com/org/dev-repo",
      "name": "dev-runner",
      "numberOfMachines": 2,
      "labels": "development,test",
      "directory": "./dev-runners"
    }
  },
  "defaultProfile": "default"
}

Example: hydra.toml

defaultProfile = "default"

[profiles.default]
name = "runner"
numberOfMachines = 1
directory = "./gh-runners"
os = "linux"

[profiles.production]
url = "https://github.com/org/repo"
name = "prod-runner"
numberOfMachines = 3
labels = "production,linux,docker"
directory = "/opt/runners/prod"
os = "linux"

Environment Variables

  • GITHUB_PERSONAL_ACCESS_TOKEN - Default token if not provided via CLI
  • HYDRA_CONFIG - Default configuration file path

📂 Directory Structure

./gh-runners/              # Default runner directory
├── machines/
│   ├── 1/                # Runner instance 1
│   │   ├── _diag/        # Diagnostics logs
│   │   ├── _work/        # Job working directory
│   │   ├── config.sh     # Runner configuration
│   │   └── run.sh        # Runner execution script
│   ├── 2/                # Runner instance 2
│   └── .../
└── actions-runner-*.tar.gz  # Downloaded runner package

🔐 Security

Token Requirements

  • Repository runners: Token needs repo scope
  • Organization runners: Token needs admin:org scope
  • Tokens are never stored in configuration files
  • Use environment variables for automation

Best Practices

  1. Never commit tokens to version control
  2. Use read-only tokens when possible
  3. Rotate tokens regularly

📊 Examples

CI/CD Pipeline Setup

# Development environment
hydra create -p development -t $GITHUB_TOKEN -m 2

# Production with specific labels
hydra create -p production -t $GITHUB_TOKEN -l "deploy,production"

# Temporary test runners
hydra create -t $GITHUB_TOKEN -u $REPO_URL -n "test" -m 5
hydra remove -t $GITHUB_TOKEN -u $REPO_URL -n "test" -m 5

Monitoring Script

#!/bin/bash
# Check runner status and alert if offline

STATUS=$(hydra status -p production -t $GITHUB_TOKEN --json)
OFFLINE=$(echo $STATUS | jq '[.[] | select(.status == "offline")] | length')

if [ $OFFLINE -gt 0 ]; then
  echo "Alert: $OFFLINE runners are offline!"
fi

🐛 Troubleshooting

Common Issues

  1. "Invalid GitHub token"

    • Verify token permissions (repo/admin:org scope)
    • Check token expiration
  2. "Runner configuration failed"

    • Check network connectivity
    • Verify GitHub URL format
    • Ensure write permissions in runner directory
  3. "No runners found"

    • Verify runner directory path
    • Check if runners were created successfully
    • Ensure profile name is correct

Debug Mode

# Run with debug logging
DEBUG=* hydra create -t TOKEN -u URL

# Check runner diagnostics (if needed)
cat ./gh-runners/machines/1/_diag/*.log

🤝 Contributing

Contributions are welcome! Please see the main repository for contribution guidelines.

📄 License

Licensed under the Apache License, Version 2.0. See LICENSE for details.