GitLab MR & Commit Analyzer
中文文档 | English
A command-line tool for intelligently collecting, analyzing, and summarizing GitLab Merge Requests and commit records.
Installation & Setup
Prerequisites
- Python 3.8+
- GitLab access
GITLAB_HOST(e.g.https://gitlab.example.com)GITLAB_TOKEN(PAT withread_apiorapiscope)
Recommended (optional)
- GitLab CLI (glab): recommended for better and faster diff retrieval
- install and authenticate:
glab auth login
- install and authenticate:
Install GitLab CLI (glab)
- macOS (Homebrew):
brew install glab
glab auth login
- Linux (APT, Ubuntu/Debian):
sudo apt update
sudo apt install -y glab
glab auth login
- Windows (Winget):
winget install --id GitLab.glab
glab auth login
Daily usage tip: use the short command
glpa(legacy:gl-pr-analyzer,gl-pr-ai).
Install
pip install gitlab-pr-analyzer
Configuration (Environment Variables)
| Variable | Description | Required |
|---|---|---|
GITLAB_HOST |
GitLab instance base URL | Yes |
GITLAB_TOKEN |
Personal Access Token | Yes |
GITLAB_INSTANCE_NAME |
Banner display name | No |
CURSOR_AGENT_PATH |
Path to cursor-agent for AI features | No (Yes for AI) |
Quick Start
# 0. Check connectivity (recommended after setting env vars)
glpa check
# 1. Interactive Mode (best for starting)
glpa interactive
# project path tip: from a URL like https://gitlab.example.com/group/subgroup/project use: --repo group/subgroup/project
# 2. Search with AI analysis (English output)
glpa search "authentication bug" --ai -r group/subgroup/project
# 3. Search with AI analysis (Chinese output)
glpa search "authentication bug" --ai -cn -r group/subgroup/project
# 4. Collect data
glpa collect --save-json -r group/subgroup/project
# 5. Generate report + export datasets
glpa traverse --days 7 --save-json -r group/subgroup/project
# optional: enable AI analysis for traverse
glpa traverse --days 7 --save-json --ai -cn -r group/subgroup/project
For detailed command usage, see USAGE.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gitlab_pr_analyzer-0.9.3.tar.gz
(25.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gitlab_pr_analyzer-0.9.3.tar.gz.
File metadata
- Download URL: gitlab_pr_analyzer-0.9.3.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25b3b06b32130de1aa7d32a19950c64bbed81450de0c44d4006ae26ab1da5989
|
|
| MD5 |
a50a4f8d57e4fd52ad1f78e0a77e8167
|
|
| BLAKE2b-256 |
68fe5b50b99d935f5a09d7b2581df78400a5d705d4911492c2a5627cd0924fc7
|
File details
Details for the file gitlab_pr_analyzer-0.9.3-py3-none-any.whl.
File metadata
- Download URL: gitlab_pr_analyzer-0.9.3-py3-none-any.whl
- Upload date:
- Size: 29.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76ec7a398ea7a533337adc1d56b898f03c446afd1314a63ddd4e299a8a9ff264
|
|
| MD5 |
fc1f93fc4357ca1b677fcdb108948db4
|
|
| BLAKE2b-256 |
f238db30828fbddebf8735d4bfb46583bfc38f8e6ead7ef76d4d1dcbc799ddd8
|