Skip to main content

AI-powered Git commit message generator and repository analysis tool

Project description

Sayless 🤖

Sayless is an AI-powered Git commit message generator and repository analysis tool. It uses advanced AI models to generate meaningful commit messages, search through your commit history, and provide insightful summaries of your repository changes.

Features

🎯 Smart Commit Message Generation

  • Automatically generates meaningful commit messages based on your staged changes
  • Supports both OpenAI (GPT-4) and Ollama (local AI) for message generation
  • Preview mode to review generated messages before committing

🔍 Semantic Commit Search

  • Search through your commit history using natural language
  • AI-powered relevance scoring and grouping
  • Automatic commit indexing for fast searches
  • Detailed summaries of matching commits

📊 Repository Analysis

  • Generate summaries of changes over specific time periods
  • Detailed analysis of individual commits
  • Impact assessment and technical details for each commit
  • Export summaries to markdown files

🔄 Flexible AI Provider Support

  • OpenAI (GPT-4) for high-quality results
  • Ollama (local AI) for offline/private use
  • Automatic fallback between providers
  • Easy provider switching

Installation

  1. Ensure you have Python 3.7+ installed
  2. Install the package using pip:
pip install sayless

Configuration

Using OpenAI (Recommended)

# Set your OpenAI API key
sayless config --openai-key YOUR_API_KEY

# Or use the quick switch command
sayless switch openai --key YOUR_API_KEY

Using Ollama (Local AI)

  1. Install Ollama from ollama.ai
  2. Switch to Ollama:
sayless switch ollama

Usage

Generate Commit Messages

# Stage your changes first
git add .

# Generate and create a commit
sayless generate

# Preview without committing
sayless generate --preview

Search Commits

# Search for commits related to a topic
sayless search "fix authentication bug"

# Index all commits before searching
sayless search "api improvements" --index-all

# Limit search results
sayless search "database optimization" --limit 10

Analyze Changes

# Get detailed analysis of a specific commit
sayless summary <commit-hash> --detailed

# Summarize changes since last week
sayless since 1w

# Summarize changes between dates
sayless since 2023-01-01 --until 2023-12-31

# Save summary to file
sayless since 1m --save

Configuration Commands

# Show current configuration
sayless config --show

# Switch AI providers
sayless switch openai --key YOUR_API_KEY
sayless switch ollama

# Change models
sayless switch openai --model gpt-4
sayless switch ollama --model llama2

Requirements

  • Python 3.7+
  • Git
  • For OpenAI: Valid API key and internet connection
  • For Ollama: Local Ollama installation

Environment Variables

  • OPENAI_API_KEY: Your OpenAI API key (alternative to using --openai-key)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - feel free to use this in your own projects!

Support

If you encounter any issues or have questions, please open an issue on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sayless-0.1.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sayless-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file sayless-0.1.0.tar.gz.

File metadata

  • Download URL: sayless-0.1.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for sayless-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e7fb30b95c2ce410b10d372c2dfba9763e1872689962c960586e76951f9c7898
MD5 1947c18e65bf533c1d278c71a680a8f2
BLAKE2b-256 17221fba1b12935fb55c945f1b534f071a6c6f04685cea33d18121be9526578b

See more details on using hashes here.

File details

Details for the file sayless-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sayless-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for sayless-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39668f40e0710e43ec4be5313a01d369a4a4154d230727ead6b005afbdff254d
MD5 a22de134ebbebef9312e3042be1260c9
BLAKE2b-256 ab11e73c9677e85a90b2dac980c24a61c9be2e183c94e70da0f2de5ff669db16

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page