Skip to content

Multi Forge Support

Griffen Fargo edited this page Jun 10, 2026 · 1 revision

Multi-Forge Support

As of 0.70, coco's forge-aware commands work across multiple git forges instead of GitHub only. Coco auto-detects which forge a repository lives on from its git remote and drives the matching forge CLI — so the same commands, flags, filters, and keybindings work whether you're on GitHub, GitHub Enterprise, or GitLab.

Supported Forges

Forge CLI Notes
GitHub gh Behavior unchanged from earlier releases
GitHub Enterprise gh Self-hosted GitHub; uses gh's host configuration
GitLab glab gitlab.com and self-hosted GitLab; PRs map to merge requests

Forge Detection

Coco picks the forge from the host of the git remote, using these heuristics:

Remote host Detected forge
github.com GitHub
gitlab.com, or any host containing gitlab (e.g. gitlab.acme.com) GitLab
Any host containing github (e.g. github.acme.com) GitHub Enterprise

Self-hosted vanity hosts — forgeHosts

A self-hosted instance on a vanity hostname that contains neither github nor gitlab (e.g. git.acme.com, code.internal.example) can't be auto-detected. Map it explicitly with the forgeHosts config key — keys are hostnames, values are "github" or "gitlab":

{
  "forgeHosts": {
    "git.acme.com": "gitlab",
    "code.internal.example": "github"
  }
}

A "github" mapping drives gh (with its GitHub Enterprise host configuration); a "gitlab" mapping drives glab. Hosts whose name already contains github or gitlab are detected automatically and need no entry.

See Configuration Overview for where forgeHosts sits in the config schema and priority order.

CLI Requirements

Coco doesn't talk to forge APIs directly — it shells out to the forge's official CLI, reusing whatever authentication that CLI already has. Install and authenticate the one matching your remote:

GitHub / GitHub Enterprise — gh

# Install — https://cli.github.com/
brew install gh          # macOS (see the site for Windows / Linux)

# Authenticate
gh auth login

# Verify
gh auth status

GitLab — glab

# Install — https://gitlab.com/gitlab-org/cli
brew install glab        # macOS (see the project page for Windows / Linux)

# Authenticate
glab auth login

# Verify
glab auth status

When the matching CLI is missing or unauthenticated, coco surfaces a friendly empty state rather than a stack trace. See Troubleshooting for the recovery steps.

What Works

Commands

The forge-aware commands work across all three forges with the same flags, filters, and --json output:

Command GitHub / GitHub Enterprise GitLab
coco prs Lists pull requests Lists merge requests
coco issues Lists issues Lists issues
coco pr create Opens a pull request Opens a merge request (and pushes the source branch)

--mine / --author @me work on GitLab — they map to GitLab's scope filter. See the Command Reference for the full flag list.

TUI — the full coco ui triage workstation

The entire coco ui triage experience is multi-forge — the same keybindings regardless of forge:

  • Triage views: g P (PR / MR triage) and g i (issue triage).
  • Inspectors: body, comments, approvals, and pipeline / status-check state hydrate per cursor-rest.
  • Per-row mutating actions:
    • PRs / MRs: merge, approve, close, comment, label, assign.
    • Issues: comment, label, assign, close, reopen.

See Issue & PR Triage for the complete action-key reference and filter-preset cycling.

GitLab Specifics / Limitations

GitLab maps cleanly onto coco's model with a few differences worth knowing:

  • PRs are merge requests. Everywhere coco says "PR" on a GitLab remote, it operates on merge requests.
  • Request changes posts a note. GitLab has no native "request changes" review verb, so the request-changes action (R in the PR triage view) posts a note prefixed Requested changes: instead of a formal review event.
  • Merge strategies. Merging an MR supports squash and rebase strategies.
  • Push on create. coco pr create pushes the source branch automatically before opening the merge request.

GitHub and GitHub Enterprise behavior is unchanged from earlier releases.

Related

Clone this wiki locally