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
Metadata
Release files for promptgitx 0.8.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 | |
|---|---|---|---|
| promptgitx-0.8.3.tar.gz | 50.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| promptgitx-0.8.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 107.4 kB
Release files / promptgitx-0.8.3.tar.gz
| Download URL | promptgitx-0.8.3.tar.gz |
|---|---|
| Size | 50.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
199831714d31224c2da2027af428ec09f9995d397dc9995dd11a4f347c620cce
|
|
BLAKE2b-256 checksum How to use checksums |
7f7279d2a042a36bc0663bd520b5d7c4e30ca5a6fc4de8bc8620a095098c9cc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency logRelease files / promptgitx-0.8.3-py3-none-any.whl
| Download URL | promptgitx-0.8.3-py3-none-any.whl |
|---|---|
| Size | 57.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
100b97243b9f3c5a36fa7fcdfa6a570e57265ea277863d8cf66b372dad84b892
|
|
BLAKE2b-256 checksum How to use checksums |
7a75bdeb4fe0e6593f29ef9487b972a0ba261f0e9195eea448a9b2f5f2dbf36b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.
Transparency log