Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

glabglab 命令行

Agent Skill

glab 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

13,502

周安装

557

GitHub Stars

公开资料未说明

下载量

4,411
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:glab(glab 命令行)
来源仓库:https://github.com/bezkom/glab
安装命令:
openclaw skills install glab
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install glab

简介

从命令行管理 GitLab 项目:创建、审查、合并 MR;管理问题;监控并触发 CI/CD;支持自托管实例和自动化。

SKILL.md

name
glab
description
GitLab CLI for managing issues, merge requests, CI/CD pipelines, and repositories. Use when: (1) Creating, reviewing, or merging MRs, (2) Managing GitLab issues, (3) Monitoring or triggering CI/CD pipelines, (4) Working with self-hosted GitLab instances, (5) Automating GitLab workflows from the command line. Requires GITLAB_TOKEN (recommend minimal scopes). The glab api command enables arbitrary API calls - use read-only tokens when possible.
homepage
https://github.com/bezko/openclaw-skills/tree/main/skills/glab
metadata
openclaw
requires
bins
[glab, jq]
envs
description
GitLab personal access token. Recommend minimal scopes (read_api for read-only).
secret
true
required
true
description
GitLab instance hostname (e.g., gitlab.example.org). Defaults to gitlab.com.
required
false
description
Pipeline/MR wait timeout in seconds. Defaults vary by script.
required
false
description
Polling interval in seconds for watch scripts. Default 5-10s.
required
false
install
kind
brew
package
glab
label
Install glab via Homebrew
kind
apt
package
glab
label
Install glab via apt
kind
brew
package
jq
label
Install jq via Homebrew
kind
apt
package
jq
label
Install jq via apt

GitLab CLI (glab)

Official CLI for GitLab. Manage issues, merge requests, pipelines, and more from the terminal.

Source: Inspired by NikiforovAll/glab-skill on Smithery.

⚠️ Security Notice

The glab api command provides unrestricted GitLab API access with your token.

  • A compromised or overly-permissive token can delete projects, modify settings, expose secrets
  • Recommendation: Use tokens with minimal scopes:

- read_api - Read-only operations - api - Full access (only when write operations needed)

  • For automation, consider project-level tokens with limited scope
  • Never use tokens with sudo scope unless required

Prerequisites

Required binaries:

  • glab - GitLab CLI
  • jq - JSON processor (for scripts and API parsing)

Required credentials:

  • GITLAB_TOKEN - GitLab personal access token

Optional configuration:

  • GITLAB_HOST - Self-hosted GitLab instance (default: gitlab.com)
# Verify installation
glab --version
jq --version

# Authenticate (interactive)
glab auth login

# Or via environment
export GITLAB_TOKEN="glpat-xxxxxxxxxxxxxxxxxxxx"
export GITLAB_HOST="gitlab.example.org"  # for self-hosted

# Verify auth
glab auth status

Quick Reference

Merge Requests:

glab mr create --title "Fix" --description "Closes #123"
glab mr list --reviewer=@me          # MRs awaiting your review
glab mr checkout 123                  # Test MR locally
glab mr approve 123 && glab mr merge 123

Issues:

glab issue create --title "Bug" --label=bug
glab issue list --assignee=@me
glab issue close 456

CI/CD:

glab ci status                        # Current pipeline status
glab pipeline ci view                 # Watch pipeline live
glab ci lint                          # Validate .gitlab-ci.yml
glab ci retry                         # Retry failed pipeline

Working Outside Repo:

glab mr list -R owner/repo            # Specify repository

Advanced API Access:

See references/api-advanced.md for glab api usage. This command enables arbitrary GitLab API calls and should be used with appropriately-scoped tokens.

Core Workflows

Create and Merge MR

# 1. Push branch
git push -u origin feature-branch

# 2. Create MR
glab mr create --title "Add feature" --description "Implements X" --reviewer=alice,bob --label="enhancement"

# 3. After approval, merge
glab mr approve 123
glab mr merge 123 --remove-source-branch

Review MR

# List MRs for review
glab mr list --reviewer=@me

# Checkout and test
glab mr checkout 123

# Approve or comment
glab mr approve 123
glab mr note 123 -m "Looks good, just one suggestion..."

Monitor Pipeline

# Watch current branch pipeline
glab pipeline ci view

# Check specific pipeline
glab ci view 456

# View failed job logs
glab ci trace

# Retry
glab ci retry

Self-Hosted GitLab

# Set default host
export GITLAB_HOST=gitlab.example.org

# Or per-command
glab mr list -R gitlab.example.org/owner/repo

Scripts

ScriptDescription
glab-mr-await.shWait for MR approval and successful pipeline
glab-pipeline-watch.shMonitor pipeline with exit codes for CI
# Wait for MR to be approved and merged
./scripts/glab-mr-await.sh 123 --timeout 600

# Watch pipeline, exit 0 on success, 1 on failure
./scripts/glab-pipeline-watch.sh --timeout 300

Script environment variables:

  • TIMEOUT - Max wait time in seconds (default varies by script)
  • INTERVAL - Polling interval in seconds (default 5-10s)

Troubleshooting

ErrorFix
command not found: glabInstall glab
command not found: jqInstall jq
401 UnauthorizedSet GITLAB_TOKEN or run glab auth login
404 Project Not FoundVerify repo name and permissions
not a git repositoryUse -R owner/repo flag
source branch already has MRglab mr list to find existing

For detailed troubleshooting, see references/troubleshooting.md.

Progressive Disclosure

  • references/api-advanced.md - glab api usage with security considerations
  • references/commands-detailed.md - Full command reference with all flags
  • references/troubleshooting.md - Detailed error scenarios and solutions

Load these when you need specific flag details or are debugging issues.

Best Practices

  1. Always verify auth: glab auth status
  2. Use minimal-scope tokens for read operations
  3. Link MRs to issues: "Closes #123" in description
  4. Lint CI config before pushing: glab ci lint
  5. Use --output=json for scripting
  6. Most commands have --web to open in browser

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

84.87%
按下载量换算3,744

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills