A CLI tool to generate conventional commit messages using AI, with full awareness of staged changes and project context.
Using uv (recommended):
git clone https://github.com/geavenx/memo.git
cd memo
uv tool install .Or with pip:
git clone https://github.com/geavenx/memo.git
cd memo
pip install .-
Stage your changes:
git add . -
Generate a commit message:
memo generate
-
Follow the interactive prompts to review, edit, or commit.
- AI-Powered Generation: Uses OpenAI GPT or Google Gemini models to generate meaningful commit messages
- Context-Aware: Analyzes staged changes, project structure, and commit history for relevant messages
- Conventional Commits: Follows the conventional commit specification
- Interactive Mode: Review and edit generated messages before committing
- Flexible Configuration: Customize behavior through project-specific or global configuration files
- Multiple AI Models: Support for various AI providers and models
git clone https://github.com/geavenx/memo.git
cd memo
uv tool install .git clone https://github.com/geavenx/memo.git
cd memo
pip install .git clone https://github.com/geavenx/memo.git
cd memo
uv syncMemo provides flexible API key management for AI providers.
Use the built-in authentication commands for secure, persistent storage:
# Set your API keys
memo auth set openai sk-your-openai-api-key
memo auth set google your-google-api-key
# Verify configuration
memo auth listexport OPENAI_API_KEY="your-openai-api-key"
export GOOGLE_API_KEY="your-google-api-key"Create a .env file in your project, home directory, or ~/.memo/:
OPENAI_API_KEY=your-openai-api-key
GOOGLE_API_KEY=your-google-api-keyNote: CLI-managed keys work anywhere you run memo, even when installed globally with uv tool install or pip install.
Basic usage:
memo generateWith specific AI model:
memo generate --model gpt-4.1-mini
memo generate --model gemini-2.5-proNon-interactive mode (output only):
memo generate --no-interactiveView current configuration:
memo config showSet configuration values:
memo config set default_model gemini-2.5-pro
memo config set commit_rules.max_subject_length 50Reset configuration:
memo config resetManage API keys securely through the CLI:
# Set API keys
memo auth set openai sk-your-api-key
memo auth set google your-google-api-key
# View configured keys (masked)
memo auth show
memo auth show openai
# List provider status
memo auth list
# Remove keys
memo auth remove openaiCheck system status:
memo statusShows git repository status, configuration, AI provider availability, and authentication status.
Memo supports flexible configuration through JSON files. You can configure:
- AI model selection
- Interactive mode behavior
- Conventional commit rules
- Project structure context
- Commit history analysis
- Project-specific:
.memo.jsonin your project directory - User-global:
~/.memo.jsonin your home directory
Create a .memo.json file in your project:
{
"default_model": "gemini-2.5-pro",
"interactive_mode": true,
"commit_rules": {
"max_subject_length": 72,
"require_scope": true
}
}For comprehensive configuration options and examples, see the Configuration Guide.
- gemini-2.5-flash (default): Fast, efficient Google model
- gpt-4.1-mini: OpenAI very efficient model
- gemini-2.0-flash: Ancestor of the "Fast, efficient Google model"
- gemini-2.5-pro: Advanced Google model (slow because of
reasoning)
When enabled (default), Memo presents options after generating a commit message:
- Accept: Commit immediately with the generated message
- Regenerate: Generate a new message
- Edit: Open git's commit editor with the generated message
- Deny: Exit without committing
# Make changes to your code
git add .
memo generate
# Follow interactive prompts# Create project configuration
echo '{
"default_model": "gemini-2.5-pro",
"commit_rules": {
"require_scope": true,
"max_subject_length": 72
}
}' > .memo.json
# Commit the configuration
git add .memo.json
git commit -m "feat: add memo configuration for team standards"# Non-interactive mode for scripts
memo generate --no-interactive > commit_message.txt
git commit -F commit_message.txt- Python 3.11+
- uv package manager
git clone <repository-url>
cd memo
uv syncuv run pytest tests/# Linting
uvx ruff check --fix .
# Formatting
uvx ruff format .- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run tests and linting
- Submit a pull request
MIT License - see LICENSE file for details.
- For usage questions, see the Configuration Guide
- For detailed usage examples, see docs/usage.md
- For bugs and feature requests, open an issue