-
-
Notifications
You must be signed in to change notification settings - Fork 0
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.
| 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 |
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 |
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.
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:
# Install — https://cli.github.com/
brew install gh # macOS (see the site for Windows / Linux)
# Authenticate
gh auth login
# Verify
gh auth status# 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 statusWhen the matching CLI is missing or unauthenticated, coco surfaces a friendly empty state rather than a stack trace. See Troubleshooting for the recovery steps.
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.
The entire coco ui triage experience is multi-forge — the same keybindings regardless of forge:
-
Triage views:
g P(PR / MR triage) andg 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 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 (
Rin the PR triage view) posts a note prefixedRequested changes:instead of a formal review event. - Merge strategies. Merging an MR supports squash and rebase strategies.
-
Push on create.
coco pr createpushes the source branch automatically before opening the merge request.
GitHub and GitHub Enterprise behavior is unchanged from earlier releases.
-
Command Reference — full CLI flag reference for
coco prs/coco issues/coco pr create - Issue & PR Triage — the triage CLI + TUI guide and action keys
-
Configuration Overview — the
forgeHostsconfig key -
Troubleshooting —
gh/glabnot-installed / not-authenticated recovery