Hyperforge
Multi-forge repository management with declarative configuration.
Overview
Hyperforge syncs repositories across GitHub, Codeberg, and GitLab using direct API calls. It maintains a local state (LocalForge) that tracks your repos and their forge configurations.
Key features:
- Declarative config: Define repos in YAML, sync to forges
- Multi-forge: Origin + mirrors pattern (e.g., GitHub origin, Codeberg mirror)
- Direct API: No Pulumi - uses ForgePort adapters for each forge
- Workspace operations: Diff, sync, verify across all repos
Quick Start
# List repos for an org
# Import existing repos from GitHub
# Check what would change
# Apply changes
Commands
Repo Management
# List repos in LocalForge
# Create a new repo
# Update repo settings
# Delete repo from LocalForge
# Import repos from a forge
Workspace Operations
# Diff local state vs remote forge
# Sync local state to remote forge
# Verify workspace configuration
Git Operations
# Initialize a repo for multi-forge sync
# Push to all configured forges
# Check git status
Meta
# Show status
# Show version
Configuration
Config lives in ~/.config/hyperforge/:
~/.config/hyperforge/
├── config.yaml # Global config, org definitions
└── orgs/
└── <org>/
└── repos.yaml # Repo configurations for this org
Global Config (config.yaml)
default_org: hypermemetic
secret_provider: keychain
organizations:
hypermemetic:
owner: hypermemetic
owner_type: user # user | org (affects API endpoints)
ssh_key: hypermemetic
origin: github
forges:
- github
- codeberg
default_visibility: public
Repo Config (orgs/<org>/repos.yaml)
repos:
- name: my-tool
origin: github
visibility: public
description: "My awesome tool"
mirrors:
- codeberg
protected: false
Architecture
Hyperforge is a Plexus RPC activation that integrates with substrate:
┌─────────────────────────────────────────┐
│ substrate (Plexus RPC server) │
│ └─ hyperforge activation │
│ ├─ HyperforgeHub (methods) │
│ ├─ LocalForge (local state) │
│ └─ ForgePort adapters │
│ ├─ GitHubAdapter │
│ ├─ CodebergAdapter │
│ └─ GitLabAdapter │
└─────────────────────────────────────────┘
ForgePort Trait
Authentication
Tokens are retrieved from the secrets auth hub:
# Set a token
# Tokens are stored at:
# - github/<org>/token
# - codeberg/<org>/token
# - gitlab/<org>/token
Sync Model
Origin + Mirrors
Each repo has one origin forge and optional mirrors:
- Origin: Source of truth, where repo is primarily managed
- Mirrors: Read-only copies synced from origin
Diff Operations
workspace_diff compares LocalForge state against a remote forge:
| Status | Meaning |
|---|---|
in_sync |
Local and remote match |
to_create |
Exists locally, not on remote |
to_update |
Metadata differs |
to_delete |
Marked for deletion locally |
Sync Operations
workspace_sync applies local state to remote:
- Creates repos that exist locally but not remotely
- Updates repos where metadata differs
- Deletes repos marked for removal
Known Issues
User vs Org Accounts
Codeberg/GitHub have different API endpoints for user accounts vs organizations. If sync fails with "org does not exist", add owner_type: user to your org config.
See docs/architecture/16676594318971935743_owner-type-enum.md for the planned fix.
Development
Building
Testing
Running Standalone
# As standalone server (port 4446)
# With custom port
License
AGPL-3.0-only
Related Projects
- plexus-core (hub-core): Activation system infrastructure
- plexus-transport (hub-transport): WebSocket/stdio transport
- plexus-macros (hub-macro): Procedural macros for activations
- synapse: CLI client for Plexus RPC servers
- substrate: Reference Plexus RPC server with built-in activations