Interact with GitLab via PowerShell.
π Full Documentation β Browse cmdlets, examples, and guides.
Install-Module -Name GitlabClidocker run -it ghcr.io/chris-peterson/pwsh-gitlab/gitlab-cliπ See the Quick Start Guide for setup instructions.
| 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. |
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 .pipelines # Get-GitlabPipeline
jobs # Get-GitlabJob
mr # Get or create merge request
build # New-GitlabPipeline
go # Open-InBrowserGet-GitlabProject | Get-GitlabPipeline -Latest | Open-InBrowser| 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 |
Mutable operations support ShouldProcess:
| Parameter | Description |
|---|---|
-WhatIf |
Preview actions without executing |
-Confirm |
Prompt for confirmation before executing |
| 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) |
π chris-peterson.github.io/pwsh-gitlab
Contributions welcome! Please see the GitHub repository for issues and pull requests.
- GitLab REST API Documentation
- PowerShell Gallery Package
- PSGitLab β Inspiration (now archived)
- powershell-yaml β Dependency