Tycho Git - Multi-Forge Sovereign CLI Adapter
- TypeScript 100%
| src | ||
| .gitignore | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Tycho Git (@tycho-ops/git)
Multi-Forge Sovereign Adapter for the Tycho Ecosystem
Hexagonal Architecture (Ports & Adapters) for Forgejo, GitHub, GitLab, and Bitbucket
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
-
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.
- Inspects
-
Multi-Forge Portability:
Forge Driver Engine Under the hood Forgejo / Gitea ForgejoDriverteaCLI + Direct native REST API v1GitHub GitHubDriverghCLIGitLab GitLabDriverglabCLIBitbucket Cloud BitbucketDriverNative HTTP REST API v2 -
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.