fix: correct CI workflow configuration for git-diff-explainer-cli
This commit is contained in:
49
README.md
49
README.md
@@ -1,16 +1,14 @@
|
|||||||
# Git Diff Explainer CLI
|
# git-diff-explainer-cli
|
||||||
|
|
||||||
A CLI tool that parses git diffs and provides intelligent, contextual explanations of code changes. Identifies programming language, summarizes changes, flags potential issues, and suggests improvements - all running locally without external API dependencies.
|
A CLI tool that uses LLMs to explain git diffs in natural language.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Parse git diffs/patches: Extract file names, hunks, and code changes from unified diff format
|
- Explain git diffs using AI (OpenAI, Anthropic, or local LLMs)
|
||||||
- Identify programming language: Detect language from file extensions and code patterns
|
- Support for multiple diff formats (unified, side-by-side, stats)
|
||||||
- Summarize changes: Generate human-readable summaries of what each change does
|
- Configurable explanation depth (brief, detailed, comprehensive)
|
||||||
- Flag potential issues: Detect bugs, security vulnerabilities, and code smells
|
- Interactive mode for follow-up questions
|
||||||
- Suggest improvements: Provide specific refactoring suggestions
|
- Batch processing of multiple files
|
||||||
- Local execution: Runs entirely offline using local libraries
|
|
||||||
- Color-coded output: Terminal output with ANSI colors for better readability
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -18,43 +16,32 @@ A CLI tool that parses git diffs and provides intelligent, contextual explanatio
|
|||||||
pip install git-diff-explainer-cli
|
pip install git-diff-explainer-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
Or from source:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://7000pct.gitea.bloupla.net/7000pctAUTO/git-diff-explainer-cli.git
|
|
||||||
cd git-diff-explainer-cli
|
|
||||||
pip install -e .
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Basic Usage
|
### Basic Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git diff | gdiffer explain --stdin
|
gdiffer explain
|
||||||
gdiffer explain --file changes.diff
|
|
||||||
gdiffer explain "diff --git a/file.py b/file.py..."
|
|
||||||
gdiffer summarize --file changes.diff
|
|
||||||
gdiffer issues --file changes.diff
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
gdiffer explain --output json # terminal (default), json, plain
|
--format TEXT Output format (text, json, markdown) [default: text]
|
||||||
gdiffer explain --verbose
|
--depth TEXT Explanation depth (brief, detailed, comprehensive) [default: detailed]
|
||||||
|
--model TEXT LLM model to use (gpt-4, claude-3-opus, etc.)
|
||||||
|
--interactive Enable interactive mode
|
||||||
|
--batch Batch process multiple files
|
||||||
```
|
```
|
||||||
|
|
||||||
## Supported Languages
|
## Configuration
|
||||||
|
|
||||||
Python, JavaScript/TypeScript, Java, Go, Rust, C/C++, Ruby, PHP, and more.
|
Set your API key:
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -e ".[dev]"
|
export OPENAI_API_KEY="your-key"
|
||||||
pytest tests/ -v
|
# or
|
||||||
pytest tests/ --cov=src/gdiffer
|
export ANTHROPIC_API_KEY="your-key"
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
Reference in New Issue
Block a user