The official GitLink CLI tool — built for humans and AI Agents. Supports macOS, Linux, and Windows. Covers repository management, issue tracking, pull requests, CI/CD, and AI-powered workflows, with 40+ commands and 12 AI Agent Skills.
Agent-Native Design — 12 structured Skills out of the box, compatible with Claude Code, OpenClaw, and other AI platforms — Agents can operate GitLink with zero extra setup
Wide Coverage — Repository, Issue, PR, Branch, Release, CI, Org, Search, User — all core domains covered
AI-Friendly & Optimized — Every command is tested with real Agents, featuring concise parameters, smart defaults, and structured output
Cross-Platform — Runs on macOS, Linux, and Windows (x64/arm64), install via npm install -g @gitlink-ai/cli in one command, binary auto-downloaded
Open Source, Zero Barriers — MulanPSL-2.0 license, ready to use, just npm install
Up and Running in 3 Minutes — Interactive login or GITLINK_TOKEN env var, from install to first API call in just 3 steps
Secure & Controllable — OS-native keychain credential storage, GITLINK_TOKEN env var for CI/CD & non-interactive environments, auto git remote context resolution
Three-Layer Architecture — Shortcuts (human & AI friendly) → Raw API (full coverage) → Config (configuration management)
Features
Category
Capabilities
📦 Repo
List, create, fork, delete repositories, view repo info
Supported platforms: macOS, Linux, Windows (x64/arm64)
Go 1.26+ — only required for building from source
Quick Start (Human Users)
Note for AI assistants: If you are an AI Agent helping the user with installation, jump directly to Quick Start (AI Agent), which contains all the steps you need to complete.
# List builds
gitlink-cli ci +list --owner Gitlink --repo forgeplus
# View build log
gitlink-cli ci +log --owner Gitlink --repo forgeplus -i <build_id>
# Restart a build
gitlink-cli ci +restart --owner Gitlink --repo forgeplus -i <build_id>
Wiki Management
# List wiki pages
gitlink-cli wiki +list --owner Gitlink --repo forgeplus
# View a wiki page
gitlink-cli wiki +view --owner Gitlink --repo forgeplus --title "Getting Started"
# Create a wiki page
gitlink-cli wiki +create --title "New Page" --content "Page content"
# Update a wiki page (overwrite)
gitlink-cli wiki +update --title "New Page" --cover "Updated content" --owner Gitlink --repo forgeplus
# Append content to a wiki page
gitlink-cli wiki +update --title "New Page" --add "Appended content" --owner Gitlink --repo forgeplus
# Delete a wiki page
gitlink-cli wiki +delete --title "New Page" --owner Gitlink --repo forgeplus
For endpoints not covered by shortcuts, use the Raw API directly:
# GET request
gitlink-cli api GET /users/me
# POST request
gitlink-cli api POST /Gitlink/forgeplus/issues --body '{"subject":"test","description":"..."}'
# With query parameters
gitlink-cli api GET /Gitlink/forgeplus/commits --query 'page=1&limit=5'
Global Parameters
Parameter
Description
Example
--owner
Repository owner
--owner Gitlink
--repo
Repository name
--repo forgeplus
--format
Output format (json/table/yaml)
--format json
--debug
Enable debug output
--debug
Automatic context resolution: When running inside a git repository, --owner and --repo are automatically resolved from git remote origin.
Branch Conventions
gitlink-cli supports bidirectional code sync between GitHub and GitLink:
When running inside a git repository, the CLI automatically resolves --owner and --repo from git remote origin:
cd ~/my-gitlink-project
gitlink-cli issue +list # Automatically uses the current repository
Q: What if my token expires?
Re-authenticate:
# Username/password login
gitlink-cli auth login
# Or use a private token (generate at GitLink web → Settings → Private Tokens)
gitlink-cli auth login --token
Q: How do I use gitlink-cli in CI/CD or non-interactive environments (e.g. Trae sandbox)?
Set the GITLINK_TOKEN environment variable — no auth login needed:
export GITLINK_TOKEN="your-private-token"
gitlink-cli repo +list # Ready to use
gitlink-cli auth status # Shows "✓ Logged in via GITLINK_TOKEN environment variable"
Priority: GITLINK_TOKEN env 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-cli reports a missing binary?
Reinstall first:
npm install -g @gitlink-ai/cli
If the error persists, check whether the release page contains the asset for your platform, for example gitlink-cli_<version>_windows_amd64.zip on Windows x64. You can also download the binary manually from the release page or build from source with go 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).
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, CI/CD, and AI-powered workflows, with 40+ commands and 12 AI Agent Skills.
中文文档
Install · AI Agent Skills · Auth · Commands · Contributing
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
Quick Start (Human Users)
Install
一键安装(推荐) — 无需 npm、无需 Go:
From npm:
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
Installation & Uninstallation
Detailed install guide: doc/INSTALL.md
Detailed uninstall guide: doc/UNINSTALL.md
Quick Install
Linux/macOS:
curl -sSL https://www.gitlink.org.cn/Gitlink/gitlink-cli/raw/master/install.sh | bashWindows PowerShell:
powershell -NoProfile -ExecutionPolicy Bypass -File install.ps1npm:
npm install -g @gitlink-ai/cliQuick Uninstall
Linux/macOS:
bash uninstall.shWindows PowerShell:
.\uninstall.ps1npm:
npm uninstall -g @gitlink-ai/cliUsage Examples
Repository Operations
Issue Management
Issue Metadata & Comments
Pull Requests
File & Code Operations
Milestone Management
PR Enhanced Operations
Branch Management
Board (Kanban)
Webhook Management
Release Management
CI/CD Operations
Wiki Management
Search
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 12 Agent Skill files for AI-automated GitLink operations.See skills/README.md for details.
gitlink-sharedgitlink-repogitlink-issuegitlink-prgitlink-branchgitlink-releasegitlink-cigitlink-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