Tycho Git - Multi-Forge Sovereign CLI Adapter
  • TypeScript 100%
Find a file
2026-10-01 16:01:44 +02:00
src feat(passthrough): delegate native git commands directly and fix install hints for Linux 2026-10-01 16:01:44 +02:00
.gitignore feat(git): initial source code of Tycho Git multi-forge adapter 2026-10-01 14:31:30 +02:00
package.json chore(metadata): add Quatrain Technologies copyright 2026-10-01 15:44:57 +02:00
README.md feat(git): initial source code of Tycho Git multi-forge adapter 2026-10-01 14:31:30 +02:00
tsconfig.json feat(git): initial source code of Tycho Git multi-forge adapter 2026-10-01 14:31:30 +02:00

Tycho Git (@tycho-ops/git)

Multi-Forge Sovereign Adapter for the Tycho Ecosystem
Hexagonal Architecture (Ports & Adapters) for Forgejo, GitHub, GitLab, and Bitbucket

License: AGPL v3 TypeScript Runtime: Bun

tycho-git provides a unified, cross-platform CLI interface for developers and CI/CD pipelines across any Git forge. It eliminates cognitive overhead by abstracting the differences between GitHub (gh), Forgejo/Gitea (tea), GitLab (glab), and Bitbucket Cloud into a single standard developer vocabulary.


🏗️ Architecture: Core Adapter Pattern

flowchart TD
    CLI["tycho git <subcommand>"] --> Resolver["ForgeContextResolver\n(detects origin remote URL)"]
    
    Resolver -- "git.qtrn.io / codeberg" --> DriverFJ["ForgejoDriver\n(tea CLI + REST API v1)"]
    Resolver -- "github.com" --> DriverGH["GitHubDriver\n(gh CLI)"]
    Resolver -- "gitlab.com / self-hosted" --> DriverGL["GitLabDriver\n(glab CLI)"]
    Resolver -- "bitbucket.org" --> DriverBB["BitbucketDriver\n(REST API v2)"]
    Resolver -- "--forge=<name>" --> DriverForced["Explicit Driver"]

    subgraph Port ["Port Contract: GitForgeDriver"]
        DriverFJ -. implements .-> Contract["GitForgeDriver Interface"]
        DriverGH -. implements .-> Contract
        DriverGL -. implements .-> Contract
        DriverBB -. implements .-> Contract
    end

🚀 Key Capabilities

  1. Context Auto-Detection:

    • Inspects git config --get remote.origin.url
    • Dynamically resolves whether to talk to Forgejo (git.qtrn.io), GitHub, GitLab, or Bitbucket.
    • Zero configuration needed when switching between repositories.
  2. Multi-Forge Portability:

    Forge Driver Engine Under the hood
    Forgejo / Gitea ForgejoDriver tea CLI + Direct native REST API v1
    GitHub GitHubDriver gh CLI
    GitLab GitLabDriver glab CLI
    Bitbucket Cloud BitbucketDriver Native HTTP REST API v2
  3. Sovereign Mirror Replication:

    • tycho git mirror sync [remote] pushes all branches and tags from sovereign storage (git.qtrn.io) to cloud backup mirrors (GitHub / GitLab) in a single non-blocking command.

⚡ Quick Start & Commands

# 1. Pull Requests
tycho git pr list                  # List open PRs/MRs
tycho git pr view 12               # Inspect PR details
tycho git pr checkout 12           # Check out PR branch locally
tycho git pr merge 12 --squash     # Merge PR using squash

# 2. Repositories
tycho git repo view                # Show metadata, clone URLs, visibility
tycho git repo clone qtrn-io/core  # Clone repository

# 3. Authentication & Status
tycho git auth status              # Check logged-in user on active forge
tycho git whoami                   # Return username

# 4. Sovereign Mirror
tycho git mirror status            # Inspect configured remotes
tycho git mirror sync              # Bidirectional push to backup mirror

📜 License

GNU Affero General Public License v3.0 (AGPL-v3). Part of Tycho Ops.