Skip to content

gettyimages/pwsh-gitlab

 
 

GitlabCli

GitHub license Platforms PowerShell Gallery Version PowerShell Gallery CodeQL GitHub CI Status

Interact with GitLab via PowerShell.

📖 Full Documentation — Browse cmdlets, examples, and guides.

Installation

PowerShell Gallery

Install-Module -Name GitlabCli

Docker

docker run -it ghcr.io/chris-peterson/pwsh-gitlab/gitlab-cli

Quick Start

📖 See the Quick Start Guide for setup instructions.

Features at a Glance

Category What You Can Do
Projects Create, clone, archive, manage variables and settings
Merge Requests Create, review, approve, and merge
Pipelines Trigger, monitor, and manage CI/CD
Groups Organize projects, manage membership
And more... Issues, Runners, Environments, GraphQL, etc.

Highlights

Context-Aware Commands

Run commands from within a git repo — the module automatically detects your project. Use . for ProjectId or BranchName to use local git context:

~/src/myproject> Get-GitlabPipeline -Latest
~/src/myproject> New-GitlabMergeRequest
~/src/myproject> Get-GitlabBranch .

Convenient Aliases

pipelines          # Get-GitlabPipeline
jobs               # Get-GitlabJob
mr                 # Get or create merge request
build              # New-GitlabPipeline
go                 # Open-InBrowser

Pipeline to Browser

Get-GitlabProject | Get-GitlabPipeline -Latest | Open-InBrowser

Common Parameters

Paging

Parameter Description
-MaxPages Maximum number of pages to return (default: $global:GitlabDefaultMaxPages)
-All Return all pages. NOTE: Overrides -MaxPages
-Recurse Recurse child objects (e.g. Get-GitlabProject -GroupId 'mygroup' -Recurse). NOTE: Implies -All pages

Safety

Mutable operations support ShouldProcess:

Parameter Description
-WhatIf Preview actions without executing
-Confirm Prompt for confirmation before executing

Navigation

Parameter Description
-Follow Open URL in browser after creating a resource
-Wait Wait for long-running operations (e.g. pipelines) to complete
-Select Select subset of response (shortcut for Select-Object -ExpandProperty)

Documentation

📖 chris-peterson.github.io/pwsh-gitlab

Contributing

Contributions welcome! Please see the GitHub repository for issues and pull requests.

References

About

Interact with GitLab via PowerShell

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 99.8%
  • Other 0.2%