PromptGitX: AI Git Assistant for Reviews, Reports, and Workflows
Project description
PromptGitX
PromptGitX is an AI-powered Git review assistant packaged as a Python CLI. It helps you inspect commits, staged changes, branches, and pull requests from the terminal, then produces structured review reports in terminal, JSON, TXT, DOCX, or PDF formats.
Highlights
- Review staged changes, commits, commit ranges, pull requests, and recent history.
- Generate structured AI review reports with risk, recommendation, grouped issues, and changed-line references.
- Save reports as
.txt,.json,.docx, or.pdf. - Configure Groq, OpenAI, Anthropic, Gemini, or local Ollama models from the CLI.
- Use up to five fallback models per provider during one review run.
- Ask PromptGitX usage questions and generate review reports through the scoped
chatcommand. - Run as a normal Python package with a
promptgitxconsole command.
Installation
Install from PyPI:
python3 -m pip install promptgitx
Check the installed version:
promptgitx --version
View available commands:
promptgitx --help
Quick Start
Configure an LLM provider:
promptgitx config
Review staged changes:
promptgitx analyze --staged
Review the latest commit:
promptgitx analyze --last
Save a PDF report:
promptgitx analyze --last --save review.pdf
Save to a specific path:
promptgitx analyze --staged --save ./reports/staged-review.pdf
Commands
promptgitx config
Configure the LLM provider used by PromptGitX.
Interactive setup:
promptgitx config
Configure directly with options:
promptgitx config --provider groq --models MODEL_NAME --api-key YOUR_API_KEY
promptgitx config --provider openai --models MODEL_NAME --api-key YOUR_API_KEY
promptgitx config --provider anthropic --models MODEL_NAME --api-key YOUR_API_KEY
promptgitx config --provider gemini --models MODEL_NAME --api-key YOUR_API_KEY
promptgitx config --provider ollama --models MODEL_NAME --base-url http://localhost:11434
Switch to an already configured provider:
promptgitx config --use groq
Reset saved PromptGitX configuration:
promptgitx config --reset
promptgitx analyze
Generate an AI review report for one Git target.
Examples:
promptgitx analyze --staged
promptgitx analyze --last
promptgitx analyze --last-n 3
promptgitx analyze --commit COMMIT_HASH
promptgitx analyze --compare main..feature-branch
promptgitx analyze --pr 123
Use only one review target at a time. For example, use --staged or --last, not both.
Output examples:
promptgitx analyze --last --summary
promptgitx analyze --last --json
promptgitx analyze --last --save report.txt
promptgitx analyze --last --save report.json
promptgitx analyze --last --save report.docx
promptgitx analyze --last --save report.pdf
If --save is not passed, PromptGitX displays the report and then asks whether you want to save it.
promptgitx chat
Start a scoped PromptGitX chat:
promptgitx chat
The chat command answers questions about PromptGitX CLI usage and can generate review reports conversationally. If a report request is missing details, PromptGitX asks a follow-up question and remembers the pending report request.
Examples:
PromptGitX> make me a PR report
PromptGitX> 2
PromptGitX> review my staged changes
PromptGitX> create a report for the last 3 commits
PromptGitX> compare main..feature-branch
Chat report generation preserves the same terminal report styling as promptgitx analyze. It does not execute repository-changing Git operations such as push, commit, checkout, merge, or rebase.
CLI Reference
Global options:
| Option | Description |
|---|---|
--version |
Show the installed PromptGitX version and exit. |
--help |
Show CLI help. |
promptgitx config options:
| Option | Short | Description |
|---|---|---|
--provider |
-p |
Provider to configure: groq, openai, anthropic, gemini, or ollama. |
--models |
-m |
Comma-separated list of up to five model names. |
--api-key |
none | API key for cloud providers. |
--base-url |
none | Base URL for local providers like Ollama. |
--use |
-u |
Switch to an already configured provider. |
--reset |
-r |
Remove saved PromptGitX configuration. |
promptgitx analyze target options:
| Option | Short | Description |
|---|---|---|
--commit |
-c |
Review one commit by SHA, tag, or revision. |
--commits |
-C |
Review multiple commits. Can be provided more than once. |
--compare |
-p |
Review a range such as main..feature-branch. |
--pr |
-P |
Review a GitHub pull request by number. Requires the GitHub CLI. |
--last |
-l |
Review the latest commit. |
--last-n |
-n |
Review the last N commits. |
--staged |
-s |
Review currently staged changes. |
promptgitx analyze output options:
| Option | Description |
|---|---|
--json |
Print the raw structured JSON report. |
--summary |
Print only the short summary and final recommendation. |
--save |
Save the report to .txt, .json, .docx, or .pdf. |
Configuration
PromptGitX stores its provider settings at:
~/.promptgitx/.env
This keeps your API keys in one user-level location instead of creating .env files in whichever project directory you run the CLI from.
To use a different config file intentionally, set PROMPTGITX_ENV_PATH:
PROMPTGITX_ENV_PATH=/path/to/promptgitx.env promptgitx analyze --last
The config file stores values such as:
CURRENT_PROVIDER=GROQ
GROQ_API_KEY=...
GROQ_MODEL_1=MODEL_NAME
The active model appears in the welcome screen as:
Model: <PROVIDER> | <MODEL_NAME>
Model Fallbacks
Each provider can store up to five model names. PromptGitX starts with model 1. If a model call fails during a review run, PromptGitX advances to the next configured model and continues the run with that fallback.
Example:
promptgitx config --provider groq --models MODEL_1,MODEL_2
Report Formats
PromptGitX can print or save reports in these formats:
| Format | Usage |
|---|---|
| Terminal | Default formatted report in the terminal. |
| JSON | --json or --save report.json. Useful for scripts. |
| TXT | --save report.txt. Plain text report. |
| DOCX | --save report.docx. Word-compatible document. |
--save report.pdf. Styled PDF report. |
When saving to a path, PromptGitX creates missing parent folders when possible:
promptgitx analyze --last --save ./reports/latest-review.pdf
How Analysis Works
The analyze command uses a LangGraph workflow:
load_diff
-> parse_diff
-> split_large_chunks
-> review_chunks
-> merge_file_reviews
-> final_report
What happens internally:
load_diffcollects the requested Git diff usinggitorgh.parse_diffturns raw diffs into file-level chunks and changed-line references.split_large_chunkssplits oversized diffs by hunks instead of silently trimming content.review_chunkssends review chunks to the configured LLM.merge_file_reviewscombines chunk-level findings back into file-level findings.final_reportbuilds the final structured report and output data.
PromptGitX keeps large hunks intact where possible so line references do not get corrupted by arbitrary slicing.
Chat Report Flow
The chat command uses a LangGraph chat workflow:
classify_chat_intent
-> promptgitx_query
-> promptgitx_report_generation
-> git_github_question
-> git_workflow_execution
For report generation, chat extracts the report target with an LLM-backed structured request parser. It supports natural follow-ups such as:
PromptGitX> make me a report
PromptGitX> staged changes
or:
PromptGitX> make me a PR report
PromptGitX> second pr
Repository-changing Git/GitHub requests are routed separately from report generation.
Requirements
- Python 3.10 or newer.
- Git installed and available on
PATH. - GitHub CLI
ghforpromptgitx analyze --pr. - An API key for a cloud LLM provider, or a running Ollama server for local models.
Local Development
Clone the repository:
git clone https://github.com/abhinava-max/promptGit.git
cd promptGit
Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
Install in editable mode:
python3 -m pip install -e .
Run from the installed console command:
promptgitx --help
Run directly from source:
python3 src/promptgitx/main.py --help
Project Links
- Source: https://github.com/abhinava-max/promptGit
- Issues: https://github.com/abhinava-max/promptGit/issues
- PyPI: https://pypi.org/project/promptgitx/
Status
PromptGitX is in early development. The review workflow and report exporters are functional, and the CLI surface may still evolve between minor versions.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 promptgitx-0.8.2.tar.gz.
File metadata
- Download URL: promptgitx-0.8.2.tar.gz
- Upload date:
- Size: 49.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b8cc777b789f0f4a443569e3c4996898951dcb2c5576317ed229a997a61ba80
|
|
| MD5 |
83a018ee4a04575481c833c2b5e27b08
|
|
| BLAKE2b-256 |
00ee4808ccc159a1818371eb73f42eff313aa6cee34a7a67eca84bbf387c4033
|
Provenance
The following attestation bundles were made for promptgitx-0.8.2.tar.gz:
Publisher:
publish.yml on abhinava-max/promptGit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
promptgitx-0.8.2.tar.gz -
Subject digest:
6b8cc777b789f0f4a443569e3c4996898951dcb2c5576317ed229a997a61ba80 - Sigstore transparency entry: 1583613891
- Sigstore integration time:
-
Permalink:
abhinava-max/promptGit@31a0cd4e1cf74b990a61bd73af20426e2fe737ba -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/abhinava-max
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@31a0cd4e1cf74b990a61bd73af20426e2fe737ba -
Trigger Event:
release
-
Statement type:
File details
Details for the file promptgitx-0.8.2-py3-none-any.whl.
File metadata
- Download URL: promptgitx-0.8.2-py3-none-any.whl
- Upload date:
- Size: 57.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0e2f8d33b94b828e60c1a85698df3a78ce2c990c3eaddf92ea7a252d7df06c5
|
|
| MD5 |
3382e3ab2329bf188c6a1025aa7f107b
|
|
| BLAKE2b-256 |
f96f8ec26baed794d22e251267a217a6f7e5947e870067179ca939bd06c35957
|
Provenance
The following attestation bundles were made for promptgitx-0.8.2-py3-none-any.whl:
Publisher:
publish.yml on abhinava-max/promptGit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
promptgitx-0.8.2-py3-none-any.whl -
Subject digest:
c0e2f8d33b94b828e60c1a85698df3a78ce2c990c3eaddf92ea7a252d7df06c5 - Sigstore transparency entry: 1583613973
- Sigstore integration time:
-
Permalink:
abhinava-max/promptGit@31a0cd4e1cf74b990a61bd73af20426e2fe737ba -
Branch / Tag:
refs/tags/v0.8.2 - Owner: https://github.com/abhinava-max
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@31a0cd4e1cf74b990a61bd73af20426e2fe737ba -
Trigger Event:
release
-
Statement type: