## A git commit message generator that doesn't interrupt Claude code flow.
```bash
git add . && git commit -am "ugh... what did I do? what do I even say here?" && git push -u origin dev
```
## ↓
```bash
gitme -u dev
```

```bash
gitme show
```

## Features
- Analyzes git diffs to generate contextually relevant commit messages
- Detects untracked files and prompts to add them
- Supports staged changes only or all modified files
- Direct commit and push to upstream branch with user confirmation on every step, extremely lightweight and fast.
- **Multiple AI Providers**: Choose between Anthropic or OpenAI, default is Anthropic
- Model options for both providers
- File changes and commit message history for logging, search and review at local
- Repository-specific message storage
## Installation
Install from PyPI:
```bash
pip install gitme-cli
```
Or install directly from GitHub:
```bash
pip install git+https://github.com/wangjing0/gitme.git
```
Or develop locally:
```bash
git clone https://github.com/wangjing0/gitme.git
cd gitme
pip install -e .
```
### AI Provider Setup
Choose one or both providers:
**For Anthropic Claude (default):**
```bash
export ANTHROPIC_API_KEY="your-anthropic-api-key-here"
```
**For OpenAI GPT (Optional):**
```bash
export OPENAI_API_KEY="your-openai-api-key-here"
```
**Note:** All `gitme` commands must be run from within a git repository directory. If you're not in a git repository, you'll see an error message prompting you to run `git init`.
### Basic Usage
```bash
# Generate message for staged changes (default - uses Anthropic Claude)
gitme
# Generate message for all changes
gitme -a
# Generate message and commit
gitme -c
# Generate message and commit and push to remote branch
gitme -u dev
```
```bash
# Use OpenAI instead of Anthropic (default)
gitme -p openai
# Use OpenAI with specific model
gitme -p openai -m gpt-4o
# Use Anthropic with specific model
gitme -m claude-3-5-haiku-latest
# Combine with other options
gitme -p openai -c # Use OpenAI and commit
```
### Untracked Files Handling
When you run `gitme`, it will automatically detect any untracked files in your repository and prompt you to add them to the staging area:
```bash
📁 Untracked files found:
new_feature.py
test_file.js
Do you want to add these untracked files to the staging area? [y/N]:
```
- Choose **y** to add all untracked files to staging and include them in the commit message generation
- Choose **N** to proceed without the untracked files (they won't be included in the analysis)
### Message History
```bash
# Show previous messages (includes provider/model info)
gitme show
# Show last 5 messages
gitme show -n 5
# Show from all repositories
gitme show -r
# Clear history
gitme show --clear
```
**Enhanced Message History Display:**
```
[1] 2025-07-20 10:30:45
💬 Message:
Add user authentication feature
- Modified auth.py
- Updated config.json
- Added login.html
🤖 AI Provider: Anthropic (claude-3-5-haiku-latest)
📝 Files changed: 3
[2] 2025-07-20 09:15:22
💬 Message:
Fix authentication bug
- Fixed login validation
🤖 AI Provider: Openai (gpt-4o-mini)
📝 Files changed: 1
```
## Options
### Generate Options
- `-s, --staged`: Analyze only staged changes
- `-a, --all`: Analyze all changes (staged and unstaged)
- `-p, --provider`: Choose AI provider (`anthropic` or `openai`, default: anthropic)
- `-m, --model`: Model to use (provider-specific)
- `-c, --commit`: Create commit with generated message (uses `git commit -a -m "auto-generated message"`)
### Show Options
- `-n, --limit`: Number of messages to show
- `-r, --all-repos`: Show messages from all repositories
- `--clear`: Clear message history
### Available Models
**Anthropic Claude:**
- `claude-3-5-haiku-latest` (default)
- `claude-3-haiku-20240307`
- `claude-3-sonnet-20240229`
**OpenAI GPT:**
- `gpt-4o-mini` (default when using OpenAI)
- `gpt-4o`
- `gpt-4`
## Privacy & Security Notice
⚠️ **Important**: When using `gitme` or `gitme generate`, your code changes will be sent to the selected AI provider (Anthropic Claude or OpenAI GPT) for processing. The tool does NOT send your entire codebase - only the diff contents of changed files.
**Please exercise caution when using this tool:**
- Avoid using it with repositories containing sensitive information, credentials, or proprietary code
- Review your changes before running the command to ensure no sensitive data is included
- Consider using `.gitignore` to exclude sensitive files from git tracking
- Be aware that different providers have different data handling policies
- Both Anthropic and OpenAI have their own privacy policies and data retention practices
## Requirements
- Python 3.8+
- Git
- At least one AI provider API key:
- Anthropic API key for Claude models
- OpenAI API key for GPT models, `openai` Python package for OpenAI support
## New Release
```bash
chmod +x release.sh && ./release.sh 0.4.4
```
## Contributing
Contributions are welcome! Please feel free to submit a pull request. ❤️ @wangjing0
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "gitme-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "git, commit, message, generator, ai, claude, openai",
"author": null,
"author_email": "Jing Wang <jingwang.physics@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f9/ba/01b5e207bec5704f2424b22860e26b05e6c6138e6411b109e9eee4e259de/gitme_cli-0.5.0.tar.gz",
"platform": null,
"description": "## A git commit message generator that doesn't interrupt Claude code flow.\n\n```bash\ngit add . && git commit -am \"ugh... what did I do? what do I even say here?\" && git push -u origin dev\n```\n## \u2193\n```bash\ngitme -u dev\n```\n\n```bash\ngitme show\n```\n\n\n\n## Features\n\n- Analyzes git diffs to generate contextually relevant commit messages\n- Detects untracked files and prompts to add them\n- Supports staged changes only or all modified files\n- Direct commit and push to upstream branch with user confirmation on every step, extremely lightweight and fast.\n- **Multiple AI Providers**: Choose between Anthropic or OpenAI, default is Anthropic\n- Model options for both providers\n- File changes and commit message history for logging, search and review at local\n- Repository-specific message storage\n\n## Installation\n\nInstall from PyPI:\n\n```bash\npip install gitme-cli\n```\n\nOr install directly from GitHub:\n\n```bash\npip install git+https://github.com/wangjing0/gitme.git\n```\n\nOr develop locally:\n\n```bash\ngit clone https://github.com/wangjing0/gitme.git\ncd gitme\npip install -e .\n```\n\n### AI Provider Setup\n\nChoose one or both providers:\n\n**For Anthropic Claude (default):**\n```bash\nexport ANTHROPIC_API_KEY=\"your-anthropic-api-key-here\"\n```\n\n**For OpenAI GPT (Optional):**\n```bash\nexport OPENAI_API_KEY=\"your-openai-api-key-here\"\n```\n\n**Note:** All `gitme` commands must be run from within a git repository directory. If you're not in a git repository, you'll see an error message prompting you to run `git init`.\n\n### Basic Usage\n\n```bash\n# Generate message for staged changes (default - uses Anthropic Claude)\ngitme\n\n# Generate message for all changes\ngitme -a\n\n# Generate message and commit\ngitme -c\n\n# Generate message and commit and push to remote branch\ngitme -u dev\n```\n\n```bash\n# Use OpenAI instead of Anthropic (default)\ngitme -p openai\n\n# Use OpenAI with specific model\ngitme -p openai -m gpt-4o\n\n# Use Anthropic with specific model\ngitme -m claude-3-5-haiku-latest\n\n# Combine with other options\ngitme -p openai -c # Use OpenAI and commit\n```\n\n### Untracked Files Handling\n\nWhen you run `gitme`, it will automatically detect any untracked files in your repository and prompt you to add them to the staging area:\n\n```bash\n\ud83d\udcc1 Untracked files found:\n new_feature.py\n test_file.js\n Do you want to add these untracked files to the staging area? [y/N]:\n```\n\n- Choose **y** to add all untracked files to staging and include them in the commit message generation\n- Choose **N** to proceed without the untracked files (they won't be included in the analysis)\n\n### Message History\n\n```bash\n# Show previous messages (includes provider/model info)\ngitme show\n\n# Show last 5 messages\ngitme show -n 5\n\n# Show from all repositories\ngitme show -r\n\n# Clear history\ngitme show --clear\n```\n\n**Enhanced Message History Display:**\n```\n[1] 2025-07-20 10:30:45\n \ud83d\udcac Message:\n Add user authentication feature\n \n - Modified auth.py\n - Updated config.json\n - Added login.html\n \ud83e\udd16 AI Provider: Anthropic (claude-3-5-haiku-latest)\n \ud83d\udcdd Files changed: 3\n\n[2] 2025-07-20 09:15:22\n \ud83d\udcac Message:\n Fix authentication bug\n \n - Fixed login validation\n \ud83e\udd16 AI Provider: Openai (gpt-4o-mini)\n \ud83d\udcdd Files changed: 1\n```\n\n## Options\n\n### Generate Options\n\n- `-s, --staged`: Analyze only staged changes\n- `-a, --all`: Analyze all changes (staged and unstaged)\n- `-p, --provider`: Choose AI provider (`anthropic` or `openai`, default: anthropic)\n- `-m, --model`: Model to use (provider-specific)\n- `-c, --commit`: Create commit with generated message (uses `git commit -a -m \"auto-generated message\"`)\n\n### Show Options\n\n- `-n, --limit`: Number of messages to show\n- `-r, --all-repos`: Show messages from all repositories\n- `--clear`: Clear message history\n\n### Available Models\n\n**Anthropic Claude:**\n- `claude-3-5-haiku-latest` (default)\n- `claude-3-haiku-20240307`\n- `claude-3-sonnet-20240229`\n\n**OpenAI GPT:**\n- `gpt-4o-mini` (default when using OpenAI)\n- `gpt-4o`\n- `gpt-4`\n\n## Privacy & Security Notice\n\n\u26a0\ufe0f **Important**: When using `gitme` or `gitme generate`, your code changes will be sent to the selected AI provider (Anthropic Claude or OpenAI GPT) for processing. The tool does NOT send your entire codebase - only the diff contents of changed files.\n\n**Please exercise caution when using this tool:**\n- Avoid using it with repositories containing sensitive information, credentials, or proprietary code\n- Review your changes before running the command to ensure no sensitive data is included\n- Consider using `.gitignore` to exclude sensitive files from git tracking\n- Be aware that different providers have different data handling policies\n- Both Anthropic and OpenAI have their own privacy policies and data retention practices\n\n## Requirements\n\n- Python 3.8+\n- Git\n- At least one AI provider API key:\n - Anthropic API key for Claude models\n - OpenAI API key for GPT models, `openai` Python package for OpenAI support\n\n## New Release\n\n```bash\nchmod +x release.sh && ./release.sh 0.4.4\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request. \u2764\ufe0f @wangjing0 \n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": null,
"summary": "Git commit message generator",
"version": "0.5.0",
"project_urls": {
"Homepage": "https://github.com/wangjing0/gitme",
"Issues": "https://github.com/wangjing0/gitme/issues",
"Repository": "https://github.com/wangjing0/gitme"
},
"split_keywords": [
"git",
" commit",
" message",
" generator",
" ai",
" claude",
" openai"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "010ff049157d2b314e8084198af3b8d5b32949b447768e7996c61445efbffa2a",
"md5": "b9291563e859746ccd0d663f126b25c8",
"sha256": "4e1e8c41cf2dfdba725498d078f75adf7c868bc7579e528f722c6ec8e0c93cbb"
},
"downloads": -1,
"filename": "gitme_cli-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b9291563e859746ccd0d663f126b25c8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 12213,
"upload_time": "2025-07-22T14:45:31",
"upload_time_iso_8601": "2025-07-22T14:45:31.828969Z",
"url": "https://files.pythonhosted.org/packages/01/0f/f049157d2b314e8084198af3b8d5b32949b447768e7996c61445efbffa2a/gitme_cli-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f9ba01b5e207bec5704f2424b22860e26b05e6c6138e6411b109e9eee4e259de",
"md5": "3449f9d77b4ecececf2267513182a9e5",
"sha256": "b66c84f5fbcb4b047e4debde9f08e88bb81415a1cbc6e00f2c98ab680dd2b2f8"
},
"downloads": -1,
"filename": "gitme_cli-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "3449f9d77b4ecececf2267513182a9e5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 17814,
"upload_time": "2025-07-22T14:45:32",
"upload_time_iso_8601": "2025-07-22T14:45:32.612657Z",
"url": "https://files.pythonhosted.org/packages/f9/ba/01b5e207bec5704f2424b22860e26b05e6c6138e6411b109e9eee4e259de/gitme_cli-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-22 14:45:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wangjing0",
"github_project": "gitme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "gitme-cli"
}