gitpr-cli 0.0.35__tar.gz → 0.0.37__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.
Files changed (59) hide show
  1. {gitpr_cli-0.0.35/gitpr_cli.egg-info → gitpr_cli-0.0.37}/PKG-INFO +37 -7
  2. gitpr_cli-0.0.35/PKG-INFO → gitpr_cli-0.0.37/README.md +487 -476
  3. gitpr_cli-0.0.35/README.md → gitpr_cli-0.0.37/gitpr_cli.egg-info/PKG-INFO +506 -457
  4. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/gitpr_cli.egg-info/SOURCES.txt +6 -0
  5. gitpr_cli-0.0.37/src/__init__.py +1 -0
  6. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/ai_providers.py +158 -53
  7. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/blame_engine.py +174 -50
  8. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/cache.py +23 -9
  9. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/chat_memory.py +60 -39
  10. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/config.py +153 -25
  11. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/core.py +670 -178
  12. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/github_api.py +47 -11
  13. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/i18n.py +6 -4
  14. gitpr_cli-0.0.37/src/issue_engine.py +273 -0
  15. gitpr_cli-0.0.37/src/linter_engine.py +254 -0
  16. gitpr_cli-0.0.37/src/linter_wizard.py +206 -0
  17. gitpr_cli-0.0.37/src/main.py +1819 -0
  18. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/mcp_server.py +2268 -1790
  19. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/metrics.py +64 -24
  20. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/security.py +4 -1
  21. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/spinner.py +30 -20
  22. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/tui_issue.py +37 -11
  23. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/ui/chat_app.py +137 -49
  24. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/ui/help_screen.py +14 -11
  25. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/ui/issue_app.py +54 -26
  26. gitpr_cli-0.0.37/src/ui/linter_app.py +46 -0
  27. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/ui/metrics_app.py +23 -7
  28. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/ui/pr_publish_app.py +286 -179
  29. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/ui/pr_publish_help.py +15 -10
  30. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/updater.py +81 -28
  31. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_core.py +112 -0
  32. gitpr_cli-0.0.37/tests/test_external_linters.py +209 -0
  33. gitpr_cli-0.0.37/tests/test_i18n.py +169 -0
  34. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_linter_metrics.py +8 -4
  35. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_mcp_server.py +122 -28
  36. gitpr_cli-0.0.37/tests/test_mcp_server_e2e.py +247 -0
  37. gitpr_cli-0.0.37/tests/test_pr_publish_linter_modal.py +173 -0
  38. gitpr_cli-0.0.35/src/__init__.py +0 -1
  39. gitpr_cli-0.0.35/src/issue_engine.py +0 -168
  40. gitpr_cli-0.0.35/src/linter_engine.py +0 -125
  41. gitpr_cli-0.0.35/src/main.py +0 -1174
  42. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/LICENSE +0 -0
  43. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/gitpr_cli.egg-info/dependency_links.txt +0 -0
  44. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/gitpr_cli.egg-info/entry_points.txt +0 -0
  45. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/gitpr_cli.egg-info/requires.txt +0 -0
  46. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/gitpr_cli.egg-info/top_level.txt +0 -0
  47. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/pyproject.toml +0 -0
  48. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/setup.cfg +0 -0
  49. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/src/ui/__init__.py +0 -0
  50. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_blame_metrics.py +0 -0
  51. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_chat_backend.py +0 -0
  52. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_install_wizard.py +0 -0
  53. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_mcp_prompts.py +0 -0
  54. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_metrics.py +0 -0
  55. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_plugins.py +0 -0
  56. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_pre_save.py +0 -0
  57. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_skill_command.py +0 -0
  58. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/tests/test_smart_excludes.py +0 -0
  59. {gitpr_cli-0.0.35 → gitpr_cli-0.0.37}/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.35
3
+ Version: 0.0.37
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
@@ -24,7 +24,7 @@ Dynamic: license-file
24
24
  <img src="https://raw.githubusercontent.com/natanfiuza/gitpr/main/docs/logo.png" alt="GitPR Logo" width="150">
25
25
  </p>
26
26
 
27
- GitPR CLI is a command-line automation tool that uses **Google Gemini** and **DeepSeek** artificial intelligence to analyze your code changes (git diff) or entire files. The tool automatically generates commit messages in the *Conventional Commits* standard, detailed Pull Request descriptions, and deep Code Reviews aimed at reducing technical debt.
27
+ GitPR CLI is a command-line automation tool that uses **Google Gemini**, **DeepSeek**, and **Ollama** artificial intelligence to analyze your code changes (git diff) or entire files. The tool automatically generates commit messages in the *Conventional Commits* standard, detailed Pull Request descriptions, and deep Code Reviews aimed at reducing technical debt.
28
28
 
29
29
  🌐 **Website:** [gitpr.natanfiuza.dev.br](https://gitpr.natanfiuza.dev.br/) · 📂 **Repository:** [github.com/natanfiuza/gitpr](https://github.com/natanfiuza/gitpr)
30
30
 
@@ -164,7 +164,8 @@ You can pass the following *flags* for specific actions:
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
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
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)
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.
167
+ * `--linter-setup`: **Interactive external linter wizard.** Guides you through installing and configuring external linters (ESLint, PHPCS, Stylelint) as a Checkstyle XML bridge. 📖 [Full docs](https://github.com/natanfiuza/gitpr/blob/main/docs/linter-regras-customizadas.md)
168
+ * `--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 12 annotated tools, 15 resources, and 7 pre-built prompts directly inside your IDE. Also available as the standalone `gitpr-mcp` command.
168
169
  * `--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)
169
170
  * `--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.
170
171
  * `-ih` or `--installhooks`: Automatically installs **local Git Hooks** (`pre-commit` and `prepare-commit-msg`) in your repository.
@@ -208,14 +209,40 @@ rules:
208
209
 
209
210
  The Linter analyzes only the **added lines** in your `git diff`, ensuring a focused and extremely fast execution. If there are violations, they will appear highlighted at the top of your review file.
210
211
 
212
+ ### External Linters (Checkstyle Bridge)
213
+
214
+ If your project already uses tools like ESLint, PHP_CodeSniffer or Stylelint, GitPR can act as a bridge — running them in the background and filtering errors **only for the lines you changed** in your current diff. Any linter that emits reports in the `checkstyle` format is supported.
215
+
216
+ Instead of configuring the YAML manually, use the interactive wizard:
217
+
218
+ ```bash
219
+ gitpr --linter-setup
220
+ ```
221
+
222
+ The wizard shows pre-configured presets (PHPCS, ESLint, Stylelint — controlled remotely via `templates/gitpr.linter-presets.json`), guides you through the native installation command (e.g.: `npm install --save-dev eslint`), and injects the correct `external_linters` block into your `.gitpr.linter.yml`.
223
+
224
+ Every run — manual via `--linter` or automatic before commits — consolidates the Regex Rules and External Linters into a single Markdown report saved at `.gitpr/reports/linter/` (customizable via `OUTPUT_FILE_NAME_LINTER`). The report is generated only when violations are found — clean runs create no files.
225
+
226
+ ## 🤝 Co-Author Signature
227
+
228
+ Every commit message generated by GitPR automatically carries the co-author trailer:
229
+
230
+ ```text
231
+ Co-Authored-By: Gitpr-cli <gitpr@natanfiuza.dev.br>
232
+ ```
233
+
234
+ The trailer is appended programmatically (never by the AI) in all flows: console suggestion (`gitpr -c`), the `prepare-commit-msg` hook, auto-commit (`--no-edit`), the PR publication TUI, and the MCP `generate_commit_message` tool. It is idempotent — never duplicated when the message already contains it — and is hidden from the TUI edit screen, injected only when the commit is executed.
235
+
236
+ 📖 **Full documentation:** [docs/commit-message-ia.md](https://github.com/natanfiuza/gitpr/blob/main/docs/commit-message-ia.md)
237
+
211
238
  ## 🧠 Multi-Model Architecture (AI-Agnostic)
212
239
 
213
240
  GitPR is not tied to a single Artificial Intelligence. During initial setup, the user can choose their default engine. We currently support:
214
- * **Google Gemini** (Default: `gemini-2.5-flash`)
215
- * **DeepSeek** (Default: `deepseek-chat`)
241
+ * **Google Gemini** (Default: `gemini-pro-latest`)
242
+ * **DeepSeek** (Default: `deepseek-v4-pro`)
216
243
  * **Ollama** (Local) — run models locally without internet, fully compatible with the OpenAI API format
217
244
 
218
- You can dynamically switch models by configuring the `GEMINI_API_MODEL` or `DEEPSEEK_API_MODEL` variables in your `~/.gitpr/.env` file, or switch in real-time using the `--provider` flag.
245
+ You can dynamically switch models by configuring the `GEMINI_API_MODEL_PRIMARY` or `DEEPSEEK_API_MODEL_PRIMARY` variables in your `~/.gitpr/.env` file, or switch in real-time using the `--provider` flag.
219
246
 
220
247
  ## 🎯 Customizable "Skills" System (Prompt Engineering)
221
248
 
@@ -234,6 +261,7 @@ GitPR automatically detects your system language and displays messages in your n
234
261
 
235
262
  * **Auto-detection:** On first run, GitPR detects your OS language and saves it to `~/.gitpr/.env` (`GITPR_LANG`).
236
263
  * **Translation files:** Language packs are downloaded automatically from the official repository to `~/.gitpr/langs/`.
264
+ * **5 languages:** English, Portuguese (Brazil), Portuguese (Portugal), Spanish, and French. Packs are versioned (`__lang_version__`) and self-update automatically (OTA) when a new translation release ships.
237
265
  * **English fallback:** If a translation is missing, the English text is displayed directly.
238
266
  * **Developer API:** Use `from src.i18n import __` and wrap all user-facing strings with `__("Your text here")`.
239
267
  * **Placeholders:** Supports named parameters — `__("Downloading {file}...", file="template.md")`.
@@ -392,6 +420,7 @@ By default, GitPR saves all generated files in the `.gitpr/reports/` directory,
392
420
  | File Review | `.gitpr/reports/file_review/` |
393
421
  | Blame Report | `.gitpr/reports/blame/` |
394
422
  | Issue Draft | `.gitpr/reports/issue/` |
423
+ | Linter Report | `.gitpr/reports/linter/` |
395
424
 
396
425
  Directories are created automatically on first use. **Backward compatible:** if your `.env` already contains custom paths with directory separators (e.g., `OUTPUT_FILE_NAME=/home/user/prs/my_pr.md`), those are honored as-is — GitPR only redirects bare filenames to `.gitpr/reports/`.
397
426
 
@@ -411,7 +440,7 @@ If you want to implement GitPR as an automated quality barrier in your team, che
411
440
 
412
441
  * [**Local Git Hooks (Shift-Left)**](https://github.com/natanfiuza/gitpr/blob/main/docs/git-hooks-locais.md) — How to use `gitpr --installhooks` to create guardrails on the developer's machine and use AI to automatically write commit messages.
413
442
  * [**Hook Scripts Versioning & Auto-Sync**](https://github.com/natanfiuza/gitpr/blob/main/docs/hooks-versioning.md) — How the automatic versioning and i18n-aware synchronization system keeps your Git hooks up to date.
414
- * [**Customizable Static Linter**](https://github.com/natanfiuza/gitpr/blob/main/docs/linter-regras-customizadas.md) — How to create validation rules in `.gitpr.linter.yml` for CI/CD and pre-commit hooks.
443
+ * [**Customizable Static Linter**](https://github.com/natanfiuza/gitpr/blob/main/docs/linter-regras-customizadas.md) — How to create validation rules in `.gitpr.linter.yml`, bridge external linters (ESLint, PHPCS, Stylelint), and generate Markdown reports for CI/CD and pre-commit hooks.
415
444
  * [**CI/CD Integration (GitHub Actions)**](https://github.com/natanfiuza/gitpr/blob/main/docs/github-ci-linter.md) — How to run GitPR in the pipeline to block "Merge" of PRs with violations.
416
445
 
417
446
  ### Core Features
@@ -429,6 +458,7 @@ If you want to implement GitPR as an automated quality barrier in your team, che
429
458
  * [**Install Wizard**](https://github.com/natanfiuza/gitpr/blob/main/docs/install-wizard.md) — Step-by-step guided setup for configuring GitPR in a new project.
430
459
  * [**AI Providers**](https://github.com/natanfiuza/gitpr/blob/main/docs/providers-ia.md) — Configuration and selection between Google Gemini, DeepSeek, and Ollama.
431
460
  * [**Auto-Updater**](https://github.com/natanfiuza/gitpr/blob/main/docs/auto-update.md) — How GitPR's automatic update (hot-swap) works.
461
+ * [**Architecture**](https://github.com/natanfiuza/gitpr/blob/main/docs/ARCHITECTURE.md) — Project architecture, design patterns, and technical stack overview.
432
462
  * [**GitHub Token (PAT) Integration and Security**](https://github.com/natanfiuza/gitpr/blob/main/docs/github-pat-integration.md) — Understand how GitPR creates issues directly in the repository with authentication.
433
463
  * [**Internationalization (i18n)**](https://github.com/natanfiuza/gitpr/blob/main/docs/i18n_explanation.md) — Architecture, usage patterns, and how to add new languages.
434
464
  * [**MCP Integration**](https://github.com/natanfiuza/gitpr/blob/main/docs/mcp-integration.md) — Connect GitPR to VS Code, Cursor, and Claude Desktop via Model Context Protocol.