gitpr-cli 0.0.33__tar.gz → 0.0.35__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitpr_cli-0.0.33/gitpr_cli.egg-info → gitpr_cli-0.0.35}/PKG-INFO +40 -2
- gitpr_cli-0.0.33/PKG-INFO → gitpr_cli-0.0.35/README.md +457 -438
- gitpr_cli-0.0.33/README.md → gitpr_cli-0.0.35/gitpr_cli.egg-info/PKG-INFO +476 -419
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/gitpr_cli.egg-info/SOURCES.txt +1 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/config.py +48 -22
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/core.py +194 -29
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/main.py +162 -42
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/mcp_server.py +606 -33
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/ui/pr_publish_app.py +75 -15
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/updater.py +2 -2
- gitpr_cli-0.0.35/tests/test_core.py +254 -0
- gitpr_cli-0.0.35/tests/test_mcp_server.py +882 -0
- gitpr_cli-0.0.35/tests/test_plugins.py +297 -0
- gitpr_cli-0.0.33/tests/test_core.py +0 -29
- gitpr_cli-0.0.33/tests/test_mcp_server.py +0 -403
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/LICENSE +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/gitpr_cli.egg-info/dependency_links.txt +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/gitpr_cli.egg-info/entry_points.txt +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/gitpr_cli.egg-info/requires.txt +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/gitpr_cli.egg-info/top_level.txt +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/pyproject.toml +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/setup.cfg +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/__init__.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/ai_providers.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/blame_engine.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/cache.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/chat_memory.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/github_api.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/i18n.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/issue_engine.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/linter_engine.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/metrics.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/security.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/spinner.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/tui_issue.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/ui/__init__.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/ui/chat_app.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/ui/help_screen.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/ui/issue_app.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/ui/metrics_app.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/src/ui/pr_publish_help.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_blame_metrics.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_chat_backend.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_install_wizard.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_linter_metrics.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_mcp_prompts.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_metrics.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_pre_save.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_skill_command.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_smart_excludes.py +0 -0
- {gitpr_cli-0.0.33 → gitpr_cli-0.0.35}/tests/test_thinking_words.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitpr-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.35
|
|
4
4
|
Summary: AI-powered PR automation, commit messages, and code review (Gemini, DeepSeek, and Ollama)
|
|
5
5
|
Author-email: Natan Fiuza <contato@natanfiuza.dev.br>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -162,7 +162,10 @@ You can pass the following *flags* for specific actions:
|
|
|
162
162
|
* `--lang <code>`: Forces the interface language for this execution (e.g.: `en_us`, `pt_br`). Overrides `GITPR_LANG` in `.env` without persisting the change.
|
|
163
163
|
* `-ch` or `--chat`: Opens the **Interactive Pair Programming Chat** — a TUI terminal where the AI sees your current diff and maintains a contextual conversation. Features memory per branch, slash commands (`/explain`, `/tests`, `/optimize`, `/clear`), auto-patching (F5), diff refresh (F2), and session export (F6).
|
|
164
164
|
* `-l` or `--linter`: Runs **only the local static linter** (no AI calls). Ideal for use in CI/CD pipelines to block non-compliant code.
|
|
165
|
+
* `--status`: Lists uncommitted file changes categorized as **new**, **modified**, and **deleted** — fast, no AI, no network. 📖 [Full docs](https://github.com/natanfiuza/gitpr/blob/main/docs/git-status.md)
|
|
166
|
+
* `--no-unstaged-check`: Skips the unstaged files verification before AI processing for a single invocation. Equivalent to `GITPR_SKIP_UNSTAGED_CHECK=true` for one run. 📖 [Full docs](https://github.com/natanfiuza/gitpr/blob/main/docs/git-status.md)
|
|
165
167
|
* `--mcp`: Starts GitPR as an **MCP server** (Model Context Protocol) on stdio transport. Enables integration with VS Code, Cursor, Claude Desktop, and other MCP-compatible editors — exposing all GitPR AI capabilities as 10 annotated tools, 15 resources, and 7 pre-built prompts directly inside your IDE. Also available as the standalone `gitpr-mcp` command.
|
|
168
|
+
* `--plugins`: Lists all **globally installed plugins** — custom linter packs from `~/.gitpr/plugins/linter/` and MCP prompt templates from `~/.gitpr/plugins/prompts/`. These plugins apply across all your projects without duplication. 📖 [Full docs](https://github.com/natanfiuza/gitpr/blob/main/docs/plugins-system.md)
|
|
166
169
|
* `--install`: **Interactive Setup Wizard.** Runs a guided 4-step setup: downloads skill templates, installs Git hooks, configures MCP for detected editors, and checks/requests your AI provider API key. Each step asks for confirmation before proceeding.
|
|
167
170
|
* `-ih` or `--installhooks`: Automatically installs **local Git Hooks** (`pre-commit` and `prepare-commit-msg`) in your repository.
|
|
168
171
|
* `-s` or `--skill`: Creates the AI context template files (`.gitpr.commit.md`, `.gitpr.pr.md`, `.gitpr.review.md`, `.gitpr.filereview.md`, `.gitpr.issue.md`, `.gitpr.blame.md`) and the Linter (`.gitpr.linter.yml`) at the project root.
|
|
@@ -170,7 +173,7 @@ You can pass the following *flags* for specific actions:
|
|
|
170
173
|
* **New Code Issue (`gitpr -is`):** Reads the current `git diff`. **Why use:** Ideal for quickly documenting the task you just finished programming, before committing.
|
|
171
174
|
* **Epic/Release Issue (`gitpr -is -ht`):** Reads the full history of the current branch (Git Log + PR Cache). **Why use:** Ideal for generating consolidated documentation of an entire release or a large *feature* that took several days/commits to complete.
|
|
172
175
|
* **Archaeological/Technical Debt Issue (`gitpr -is -b file:lines`):** Reads the timeline of a specific business rule. **Why use:** Ideal for documenting technical debt, explaining how a legacy code block evolved and why it needs to be refactored.
|
|
173
|
-
* **PR Publisher (default):** Running `gitpr` generates the PR description with AI, saves the `.md` file to `.gitpr/reports/pr_desc/`, and opens an interactive terminal interface (TUI) to review, edit, and publish the Pull Request directly to GitHub via REST API. Before generation, it checks for unstaged files and offers a modal to manage them. Use `--no-publish` to save only the PR file locally without opening the publisher, or `--no-edit` to auto-commit pending changes (with lint validation), auto-push, and publish immediately — handling existing PR updates
|
|
176
|
+
* **PR Publisher (default):** Running `gitpr` generates the PR description with AI, saves the `.md` file to `.gitpr/reports/pr_desc/`, and opens an interactive terminal interface (TUI) to review, edit, and publish the Pull Request directly to GitHub via REST API. Before generation, it checks for unstaged files and offers a modal to manage them. Use `--no-publish` to save only the PR file locally without opening the publisher, or `--no-edit` to auto-commit pending changes (with lint validation), auto-push, and publish immediately — handling existing PR updates, optional auto-merge, and clear error feedback when merge conflicts occur. Use `--base <branch>` to change the target branch. 📖 [Full docs](https://github.com/natanfiuza/gitpr/blob/main/docs/pull-request-publication.md)
|
|
174
177
|
* `-h` or `--help`: Shows the general help with all options. Use together with another flag for **contextual help** (e.g.: `gitpr -h --issue`, `gitpr -h --linter`) with a direct link to the detailed documentation of each feature.
|
|
175
178
|
* `-u` or `--update`: Checks and installs the latest version of GitPR (Auto-Updater).
|
|
176
179
|
|
|
@@ -319,6 +322,25 @@ Once configured, use natural language in your editor's AI chat:
|
|
|
319
322
|
| `run_linter` | Static linter against `.gitpr.linter.yml` |
|
|
320
323
|
| `analyze_blame` | Git blame + AI classification |
|
|
321
324
|
| `generate_issue` | Structured issue from diff, history, or blame |
|
|
325
|
+
| `list_unstaged_files` | Uncommitted file changes categorized (new/modified/deleted) |
|
|
326
|
+
| `analyze_unstaged_diff` | Unstaged diff only (working tree vs index) |
|
|
327
|
+
|
|
328
|
+
### Direct CLI Invocation
|
|
329
|
+
|
|
330
|
+
All GitPR MCP tools can be invoked directly from the terminal without starting the stdio server:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# List all available tools with their parameter signatures
|
|
334
|
+
gitpr-mcp --tool
|
|
335
|
+
|
|
336
|
+
# Invoke a specific tool
|
|
337
|
+
gitpr-mcp --tool get_git_context
|
|
338
|
+
gitpr-mcp --tool review_code
|
|
339
|
+
gitpr-mcp --tool generate_commit_message --tool-args '{"diff_text":"..."}'
|
|
340
|
+
gitpr-mcp --tool analyze_blame --tool-args '{"file_path":"src/main.py","start_line":"270","end_line":"284"}'
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
This is useful for scripting, CI/CD pipelines, and one-off queries where you don't need a persistent MCP server. JSON output goes to stdout; all diagnostic messages go to stderr — safe for piping.
|
|
322
344
|
|
|
323
345
|
📖 **Full documentation:** [docs/mcp-integration.md](https://github.com/natanfiuza/gitpr/blob/main/docs/mcp-integration.md) — available in 5 languages (EN, PT-BR, PT-PT, ES, FR).
|
|
324
346
|
|
|
@@ -340,6 +362,22 @@ GitPR automatically removes non-code files from your `git diff` before sending t
|
|
|
340
362
|
- ✅ **Higher-quality analysis** — AI focuses on code changes, not markup
|
|
341
363
|
- ✅ **Zero configuration** — works automatically on every run, managed remotely
|
|
342
364
|
|
|
365
|
+
**Project-local configuration:** Each project can define extra exclusions at `.gitpr/conf/gitpr.smart-excludes.json`. The file is auto-seeded on first run and merged with the global list at runtime:
|
|
366
|
+
|
|
367
|
+
```json
|
|
368
|
+
{
|
|
369
|
+
"_comment": "Project-specific Smart Excludes.",
|
|
370
|
+
"excludes": [
|
|
371
|
+
"dist/",
|
|
372
|
+
"*.pyc",
|
|
373
|
+
"build/",
|
|
374
|
+
"node_modules/"
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Add framework-specific build artifacts, generated folders, or any pattern that only applies to this project. The file is safe to commit — your team gets the same exclusions.
|
|
380
|
+
|
|
343
381
|
> 📖 **Full documentation:** [docs/smart-excludes.md](https://github.com/natanfiuza/gitpr/blob/main/docs/smart-excludes.md) — available in 5 languages (EN, PT-BR, PT-PT, FR, ES).
|
|
344
382
|
|
|
345
383
|
## 📁 Output Directory Structure
|