This project sets up two open-source LLMs locally Mixtral-8x7B-Instruct and Phi-3 Mini. It uses Ollama to run AI summarization tasks entirely offline.
It includes a Node.js script that:
- Retrieves commit messages from your Git repo
- Sends them to the selected model
- Returns a press-release-style summary for changelogs, tag messages, etc.
- macOS (Apple Silicon preferred)
- Ollama installed and running locally
- Node.js v18+ (for native
fetch,fs/promisessupport)
brew install ollamaThen start the Ollama server manually:
ollama serve &Do not use brew services start ollama unless you want it running constantly.
Alternatively, there is a shell script included locally that you can source to add start / stop commands to your environment.
ollama pull mixtralollama pull phi3:miniThis script uses only built-in Node.js modules, but make sure you have Node 18+ installed:
node -vIf needed:
brew install nodeFrom inside any Git repo:
node summarize_commits.js [model]Where [model] is one of:
mixtralphi3:mini
If omitted, it will prompt you to choose interactively.
Alternatively, the included shell script -- assuming you sourced it earlier -- adds a summarize_commits command that can be run from any repo.
node summarize_commits.js mixtralProduces output like:
Introduced support for OAuth and fixed a session timeout bug affecting mobile users. Dependencies were also updated to improve stability.
- Uses
git describeandgit logto get commit messages since the last tag - Builds a natural-language prompt with that history
- Sends it to Ollama’s local model endpoint
- Streams and sanitizes the response
- Prints a one-paragraph customer-facing summary
- Uses raw
http.requestfor low-dependency local calls - Models are served on
http://localhost:11434by Ollama - Responses are newline-delimited JSON chunks
- Any malformed chunks or control characters are stripped before parsing
To remove models:
ollama rm mixtral
ollama rm phi3:miniTo stop Ollama:
ollama stop all