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
|
||||
|
||||
- Parse git diffs/patches: Extract file names, hunks, and code changes from unified diff format
|
||||
- Identify programming language: Detect language from file extensions and code patterns
|
||||
- Summarize changes: Generate human-readable summaries of what each change does
|
||||
- Flag potential issues: Detect bugs, security vulnerabilities, and code smells
|
||||
- Suggest improvements: Provide specific refactoring suggestions
|
||||
- Local execution: Runs entirely offline using local libraries
|
||||
- Color-coded output: Terminal output with ANSI colors for better readability
|
||||
- Explain git diffs using AI (OpenAI, Anthropic, or local LLMs)
|
||||
- Support for multiple diff formats (unified, side-by-side, stats)
|
||||
- Configurable explanation depth (brief, detailed, comprehensive)
|
||||
- Interactive mode for follow-up questions
|
||||
- Batch processing of multiple files
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -18,43 +16,32 @@ A CLI tool that parses git diffs and provides intelligent, contextual explanatio
|
||||
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
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```bash
|
||||
git diff | gdiffer explain --stdin
|
||||
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
|
||||
gdiffer explain
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```bash
|
||||
gdiffer explain --output json # terminal (default), json, plain
|
||||
gdiffer explain --verbose
|
||||
--format TEXT Output format (text, json, markdown) [default: text]
|
||||
--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.
|
||||
|
||||
## Development
|
||||
Set your API key:
|
||||
|
||||
```bash
|
||||
pip install -e ".[dev]"
|
||||
pytest tests/ -v
|
||||
pytest tests/ --cov=src/gdiffer
|
||||
export OPENAI_API_KEY="your-key"
|
||||
# or
|
||||
export ANTHROPIC_API_KEY="your-key"
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Reference in New Issue
Block a user