Sign In

@gaodes/pi-gitlab

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gaodes/pi-gitlab

Pi extension package for GitLab workflows via glab CLI with in-package skills.

latest
Source
npmnpm
Version
0.4.2
Version published
Weekly downloads
62
148%
Maintainers
1
Weekly downloads
 
Created
Source

@gaodes/pi-gitlab

Pi extension package for GitLab workflows using glab + in-package skills.

Install

npm install @gaodes/pi-gitlab

Requires glab >= 1.40.0 and a PI_GITLAB_TOKEN environment variable.

Quick Start

  • Ensure glab is installed and authenticated:

    glab auth status
    
  • Set PI_GITLAB_TOKEN and add a pi-gitlab configuration key to prime-settings.json (global or project). The extension blocks tool usage until both exist.

  • Run diagnostics:

    /gitlab-doctor
    

Tools

Read-only (Phase 1)

ToolDescription
gitlab_project_resolveResolve project path → numeric ID (with cache)
gitlab_mr_listList MRs with filters and pagination
gitlab_mr_viewView MR details, discussions, diff
gitlab_issue_listList issues with filters
gitlab_pipeline_statusCheck pipeline status for a ref
gitlab_job_logsFetch CI job logs (redacted by default)
gitlab_apiRaw glab API passthrough. Mutating methods require confirm:true; without confirmation, returns preview-only result and does not execute

Mutating (Phase 2 — require confirm:true)

ToolDescription
gitlab_mr_createCreate a merge request (title, description, draft, source/target branch)
gitlab_mr_mergeMerge an open merge request
gitlab_issue_createCreate an issue (title, description, labels, assignee, milestone)
gitlab_issue_closeClose an issue or mark it as resolved
gitlab_pipeline_runTrigger a pipeline for a branch or tag

All mutating tools require confirm: true to execute. Set confirm: false, dryRun: true to preview the operation without executing it.

Advanced (Phase 3)

ToolDescription
gitlab_release_listList releases for a project
gitlab_release_viewView details of a single release
gitlab_release_createCreate a release (confirm-gated mutating operation)
gitlab_mr_bulk_approveApprove multiple MRs matching a label/milestone filter (confirm-gated)
gitlab_force_push_safeForce-push with branch protection re-enable and confirmation gate

Setup guard

On load, the extension checks for:

  • PI_GITLAB_TOKEN environment variable (or the env var named by tokenEnv in settings).
  • pi-gitlab configuration in prime-settings.json (global or project).

If either is missing, all tool calls are blocked. Run /gitlab-doctor to launch the interactive setup wizard, save the pi-gitlab config key, and verify readiness.

Commands

  • /gitlab-doctor — Run diagnostics for glab, auth, API, and config

Skills

The package ships six in-package skills under skills/:

  • gitlab-assistant — Hub router for GitLab operations
  • gitlab-mr — MR lifecycle patterns (view, list, create, merge)
  • gitlab-issue — Issue triage patterns (list, create, close)
  • gitlab-pipeline — Pipeline diagnostics patterns (status, logs, run)
  • gitlab-release — Release listing, viewing, and creation via gitlab_api
  • gitlab-workflow — Cross-domain orchestration: release cuts, hotfixes, issue-to-MR flows

Deprecation

This package supersedes the legacy glab-gitlab skill. That skill is marked deprecated in Phase 3 and remains as a read-only fallback reference. New GitLab automation should use @gaodes/pi-gitlab exclusively.

Configuration

Key: pi-gitlab in ~/.pi/agent/prime-settings.json

{
  "pi-gitlab": {
    "hostname": "gitlab.example.com",
    "sshHostname": "gitlab-ssh.example.com",
    "sshPort": 22,
    "tokenEnv": "PI_GITLAB_TOKEN",
    "defaultProjectPath": null,
    "render": {
      "tableMaxRows": 25,
      "diffMaxLines": 400,
      "logTailLines": 200
    },
    "safety": {
      "requireConfirmForDelete": true,
      "previewMutatingApiCalls": true,
      "redactJobLogsByDefault": true,
      "minGlabVersion": "1.40.0"
    }
  }
}

Project Resolution

The project parameter is optional on all tools. Resolution order:

  • Explicit parameter
  • Git remote origin in CWD
  • defaultProjectPath from settings

Resolved IDs are cached in ~/.pi/agent/cache/pi-gitlab/projects.json.

[GitNexus] 1 related symbols found:

README.md (README.md)

Keywords

pi-package

FAQs

Package last updated on 01 Jun 2026

Related posts