fix: remove -race flag and fix shell chain logic in CI pipeline
-race requires CGO/gcc not available in Alpine. Parenthesized || true to prevent chain logic interference.
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
gitlink-cli
The official GitLink CLI tool — built for humans and AI Agents. Supports macOS, Linux, and Windows. Covers repository management, issue tracking, pull requests, webhooks, member collaboration, CI/CD, and AI-powered workflows, with 40+ commands and AI Agent Skills.
中文文档
Install · AI Agent Skills · Auth · Commands · Contributing
Contributors
wangyue111
wbtiger
Mengz
yangsai
mengcheng
muel
Leo77
yingjie
topshare
dtwdtw
recorder
Why gitlink-cli?
npm install -g @gitlink-ai/cliin one command, binary auto-downloadednpm installGITLINK_TOKENenv var, from install to first API call in just 3 stepsGITLINK_TOKENenv var for CI/CD & non-interactive environments, auto git remote context resolutionFeatures
Installation & Quick Start
Requirements
npm/npx) — for npm installationQuick Start (Human Users)
Install
From npm (recommended):
The binary is auto-downloaded for your platform during
postinstall. No extra steps needed.From source:
Requires Go 1.26+.
Configure & Use
Quick Start (AI Agent)
Step 1 — Install
Step 2 — Configure
Step 3 — Login
For interactive environments:
For non-interactive environments (CI/CD, Trae sandbox, MCP, etc.):
Step 4 — Verify
Usage Examples
Repository Operations
Webhook Management
Member Management
Issue Management
issue +view,issue +update,issue +close, andissue +commentprefer--number/-nfor the issue number shown in the web URL.--id/-iis accepted as a compatibility alias for the same web issue number, not the global database ID.Label Management
Pull Requests
Branch Management
Release Management
CI/CD Operations
Pipeline Operations
Search
Workflow Agent Commands
workflowprovides rule-based repository analysis for maintainers and AI Agents. It currently supports:workflow +triageworkflow +healthworkflow +pr-summaryworkflow +repo-reportworkflow +pr-summarydefaults totablewhen--formatis omitted.workflow +repo-reportdefaults tomarkdownwhen--formatis omitted.Examples:
Output formats:
jsonfor scripts and AI Agentstablefor terminal reviewmarkdownfor Issue comments, PR comments, release notes, and competition write-upsSafety:
workflow +pr-summarydoes not comment, approve, reject, or merge pull requests.workflow +repo-reportaggregates health, issue triage, and PR review summary signals without remote writes.Raw API
For endpoints not covered by shortcuts, use the Raw API directly:
Global Parameters
--owner--owner Gitlink--repo--repo forgeplus--format--format json--debug--debugAutomatic context resolution: When running inside a git repository,
--ownerand--repoare automatically resolved fromgit remote origin.Branch Conventions
gitlink-cli supports bidirectional code sync between GitHub and GitLink:
mainmasterPush to GitLink from local:
AI Agent Skills
The
skills/directory contains Agent Skill files for AI-automated GitLink operations.See skills/README.md for details.
gitlink-sharedgitlink-repogitlink-issuegitlink-prgitlink-membergitlink-branchgitlink-releasegitlink-cigitlink-pipelinegitlink-searchgitlink-orggitlink-usergitlink-pmgitlink-workflowProject Structure
Documentation
FAQ
Q: How do I use gitlink-cli in scripts?
Use the
GITLINK_TOKENenvironment variable +--format jsonfor structured output:Q: How does automatic owner/repo resolution work?
When running inside a git repository, the CLI automatically resolves
--ownerand--repofromgit remote origin:Q: What if my token expires?
Re-authenticate:
Q: How do I use gitlink-cli in CI/CD or non-interactive environments (e.g. Trae sandbox)?
Set the
GITLINK_TOKENenvironment variable — noauth loginneeded:Priority:
GITLINK_TOKENenv var > keyring/file stored token. When the env var is not set, the original interactive login flow works as before.Q: What if npm installs successfully but
gitlink-clireports a missing binary?Reinstall first:
If the error persists, check whether the release page contains the asset for your platform, for example
gitlink-cli_<version>_windows_amd64.zipon Windows x64. You can also download the binary manually from the release page or build from source withgo install ..Q: Where are credentials stored on Windows?
gitlink-cli uses Windows Credential Manager for secure token storage. If Credential Manager is unavailable, it automatically falls back to file storage (
~/.config/gitlink-cli/credentials).Q: Where can I find the full API reference?
See skills/gitlink-shared/REFERENCE.md.
License
MulanPSL-2.0