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.
Metadata
Release files for gitlab-pr-analyzer 0.9.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gitlab_pr_analyzer-0.9.3.tar.gz | 25.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitlab_pr_analyzer-0.9.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.4 kB
Release files / gitlab_pr_analyzer-0.9.3.tar.gz
| Download URL | gitlab_pr_analyzer-0.9.3.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25b3b06b32130de1aa7d32a19950c64bbed81450de0c44d4006ae26ab1da5989
|
|
BLAKE2b-256 checksum How to use checksums |
68fe5b50b99d935f5a09d7b2581df78400a5d705d4911492c2a5627cd0924fc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / gitlab_pr_analyzer-0.9.3-py3-none-any.whl
| Download URL | gitlab_pr_analyzer-0.9.3-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76ec7a398ea7a533337adc1d56b898f03c446afd1314a63ddd4e299a8a9ff264
|
|
BLAKE2b-256 checksum How to use checksums |
f238db30828fbddebf8735d4bfb46583bfc38f8e6ead7ef76d4d1dcbc799ddd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|