How rizlem/gitdiff works
DiffScribe turns a developer’s uncommitted Git diff into a Discord commit-message summary: the CLI identifies the author, cleans and chunks the diff, then posts it to Discord; the bot buffers the chunks, asks Groq for structured analysis, and publishes the formatted result. Configuration is shared by the CLI and bot. The bot excerpt is partial, so internal steps shown follow only the visible handling and API flow; no persistence layer is evident.
Main entry points: diff_cli.py Diff CLI · diff_analyzer_bot.py Message handler · config_loader.py Config loader · config.example.yaml Example config
Components 11
Local capture
- Diff CLI
src/diff_cli.py
Discord analysis
- Message handler
src/diff_analyzer_bot.py - Diff buffer
src/diff_analyzer_bot.py - Response parser
src/diff_analyzer_bot.py - Result embed
src/diff_analyzer_bot.py
Configuration
- Config loader
src/config_loader.py - Example config
config.example.yaml
Other components
- Developer
- Git repository
- Discord
- Groq API
Connections 13
- Developer → Diff CLI: runs
- Diff CLI → Git repository: reads diff
- Diff CLI → Config loader: loads config
- Diff CLI → Discord: posts chunks
- Discord → Message handler: dispatches messages
- Message handler → Diff buffer: buffers chunks
- Message handler → Groq API: requests analysis
- Groq API → Response parser: returns JSON
- Response parser → Result embed: provides fields
- Message handler → Discord: sends result
- Example config → Config loader: example settings
- Config loader → Diff CLI: returns settings
- Config loader → Message handler: returns settings