Sayless
Your intelligent Git companion that streamlines repository workflows through AI. Sayless handles everything from commit messages to PR management, making version control more intuitive and efficient.
Overview
Sayless is a powerful AI-powered Git automation tool that enhances your development workflow by:
- Generating meaningful commit messages that follow best practices
- Creating contextual branch names based on your changes
- Managing pull requests with AI-generated descriptions and insights
- Providing semantic search across your commit history
- Generating comprehensive summaries of repository changes
Core Capabilities
Intelligent Git Operations
- Generate precise commit messages that capture the essence of your changes
- Create meaningful branch names based on your work context
- Get instant PR descriptions that highlight key changes and impact
- Search your entire commit history using natural language
Repository Insights
- Get clear summaries of codebase changes over time
- Understand the impact of specific commits or PRs
- Track development progress with automated reports
- Export insights for team reviews and documentation
Flexible AI Integration
- Use OpenAI for cloud-based processing
- Run everything locally with Ollama for complete privacy
- Switch between providers seamlessly based on your needs
Installation
Prerequisites
- Python 3.7+
- Git
- OpenAI API key (for cloud features) or Ollama (for local processing)
Install via pip
pip install sayless
Initial Configuration
Using OpenAI (Recommended)
# Set your OpenAI API key
sayless config --openai-key YOUR_API_KEY
# Or use environment variable
export OPENAI_API_KEY=your_api_key
Using Ollama (Local AI)
- Install Ollama from ollama.ai
- Switch to Ollama:
sayless switch ollama
Usage Guide
Quick Start
# Generate commits
sl g # Generate commit from staged changes
sl g -a # Stage all changes and commit
# Branch management
sl branch "Add auth" # Create and switch to a contextual branch
sl branches # List branches with summaries
# Pull requests
sl pr create # Create a PR with smart title and description
sl pr list --details # List PRs with AI insights
# Search and analyze
sl search "auth fixes" # Find relevant commits
sl since 1w # Summarize last week's changes
Commit Message Generation
Sayless helps you write better commit messages by analyzing your changes:
# Stage specific files
git add file1.js file2.js
sl g # Generate commit message
# Stage and commit all changes
sl g -a # Equivalent to: git add . && sayless generate
# Preview without committing
sl g --preview # Show message without creating commit
Best Practices
- Stage related changes together for more focused commit messages
- Use
--previewto review and refine messages before committing - Let Sayless handle conventional commit formatting automatically
Branch Management
Create meaningful branch names and track changes effectively:
# Create branch from description
sl branch "Implement user authentication system"
# Creates: feat/implement-user-authentication-system
# Generate branch name from staged changes
git add .
sl branch -g # AI analyzes changes and creates branch
# List branches with AI insights
sl branches --details # Shows branch summaries and analysis
Advanced Branch Options
# Create without switching
sl branch "Add logging" --no-checkout
# Auto-stage and generate name
sl branch -g -a # Stages changes and generates name
# Custom branch type
sl branch "Fix login bug" # Creates: fix/login-bug
sl branch "Update docs" # Creates: docs/update-docs
Pull Request Management
Create and manage PRs with AI-generated content:
# Create PR with AI-generated title and description
sl pr create
# Target specific base branch
sl pr create --base develop
# Create with detailed AI insights
sl pr create --details
# List PRs with analysis
sl pr list --details
PR Best Practices
- Stage all relevant changes before creating PR
- Use
--detailsfor additional context and impact analysis - Review AI-generated content before confirming PR creation
Repository Analysis
Get insights into your codebase and changes:
# Analyze specific commit
sl summary <commit-hash> --detailed
# Summarize recent changes
sl since 1d # Last 24 hours
sl since 1w # Last week
sl since 1m # Last month
sl since 2023-01-01 # Since specific date
# Save analysis to file
sl since 1w --save # Exports to markdown file
Semantic Search
Search through your commit history using natural language:
# Search commits
sl search "authentication improvements"
sl search "bug fixes in login system"
sl search "performance optimizations"
# Index all commits before searching
sl search "database changes" --index-all
# Limit results
sl search "API updates" --limit 10
Advanced Configuration
AI Provider Settings
OpenAI Configuration
# Switch to OpenAI
sl switch openai --key YOUR_API_KEY
# Change model
sl switch openai --model gpt-4
Ollama Configuration
# Switch to Ollama
sl switch ollama
# Change model
sl switch ollama --model llama2
Environment Variables
OPENAI_API_KEY: Your OpenAI API keyGITHUB_TOKEN: GitHub token for PR operations
Integration with CI/CD
Sayless can be integrated into your CI/CD pipelines:
# Non-interactive commit generation
sl g -a --yes
# Automated PR creation
sl pr create --no-confirm --base main
Troubleshooting
Common Issues
- OpenAI API Issues
# Verify API key
sl config --show
# Switch to Ollama temporarily
sl switch ollama
- Git Repository Issues
# Check git status
git status
# Ensure changes are staged
git add .
- PR Creation Issues
# Verify GitHub token
export GITHUB_TOKEN=your_token
# Check repository access
sl pr list
Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create your feature branch (
sl branch "Add new feature") - Commit your changes (
sl g -a) - Push to your fork
- Create a Pull Request (
sl pr create)
License
MIT License - See LICENSE for details.
Support
- GitHub Issues: Report bugs and request features
- Documentation: sayless.dev
- Community: Join our Discord
Metadata
Release files for sayless 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sayless-0.2.0.tar.gz | 31.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sayless-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.5 kB
Release files / sayless-0.2.0.tar.gz
| Download URL | sayless-0.2.0.tar.gz |
|---|---|
| Size | 31.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
81bee76dd45b2a7aef8fdfa1404fbf1682125aefb67ee88dc003d1895fd0d9c0
|
|
BLAKE2b-256 checksum How to use checksums |
f51d06c1d4fb4cce14aa7c400bc3f88fc7874eee4a28ccdf2baf9d96da0cc6c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.6
|
Release files / sayless-0.2.0-py3-none-any.whl
| Download URL | sayless-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83a7f807a60b5144316186966eed11be18e92baa546e19362f7b6d37e1595271
|
|
BLAKE2b-256 checksum How to use checksums |
9f4be216bd0aa7282f5824adf85503a26da755b8e4d746b5952e1816f3e15ac0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.6
|