# Smart Commit
AI-powered Git commit message generator that follows the Conventional Commits specification using Google Gemini API.
## Features
- Generates commit messages using Google Gemini AI
- Follows Conventional Commits 1.0.0 specification
- Interactive editing with Vim
- Regenerate messages on demand
- Supports all conventional commit types
## Installation
### From PyPI (once published)
```bash
pip install smart-gcm
```
### From Source
```bash
git clone https://github.com/aakashvarma/smart-gcm.git
cd smart-gcm
pip install -e .
```
## Prerequisites
- Python 3.6 or higher
- Git
- Vim
- Google Gemini API key
## Setup
1. Get your Gemini API key from [Google AI Studio](https://makersuite.google.com/app/apikey)
2. Set the environment variable:
```bash
# Linux/Mac
export GEMINI_API_KEY="your-api-key-here"
# Windows
set GEMINI_API_KEY=your-api-key-here
```
For permanent setup, add to your shell profile:
```bash
# Bash (~/.bashrc or ~/.bash_profile)
echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.bashrc
# Zsh (~/.zshrc)
echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.zshrc
```
## Usage
1. Stage your changes:
```bash
git add <files>
```
2. Run Smart Commit:
```bash
gcm
```
3. Follow the interactive prompts:
- Select commit type (feat, fix, refactor, style, test, docs, build, ops, chore, revert)
- Enter optional scope (max 20 characters)
- Review the AI-generated commit message
4. Choose an action:
- `a` - Accept and commit
- `e` - Edit in Vim
- `r` - Regenerate message
- `c` - Cancel
## Commit Types
- **feat**: New feature
- **fix**: Bug fix
- **refactor**: Code refactoring (including performance improvements)
- **style**: Code style changes (formatting, semicolons, etc.)
- **test**: Adding or updating tests
- **docs**: Documentation changes
- **build**: Build system or dependency changes
- **ops**: Operational/infrastructure changes
- **chore**: Maintenance tasks
- **revert**: Revert previous commit
## Examples
```bash
# Feature with scope
feat(auth): add OAuth2 login support
- Implement Google OAuth2 integration
- Add user session management
# Bug fix
fix(api): resolve null pointer exception in user endpoint
- Add null check for user object
- Update error handling
# Breaking change
feat(api)!: change response format to JSON:API spec
BREAKING CHANGE: all API responses now follow JSON:API specification
```
## Development
### Project Structure
```
smart-gcm/
├── smart_commit/
│ ├── __init__.py
│ ├── cli.py # Command-line interface
│ ├── commit.py # Commit message generation
│ └── utils.py # Utility functions
├── setup.py
├── README.md
├── LICENSE
└── .gitignore
```
### Running from Source
```bash
python -m smart_commit.cli
```
## License
MIT License - see LICENSE file for details
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## Support
If you encounter any issues or have questions, please file an issue on [GitHub](https://github.com/aakashvarma/smart-gcm/issues).
Raw data
{
"_id": null,
"home_page": "https://github.com/aakashvarma/smart-gcm",
"name": "smart-gcm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "git, commit, conventional-commits, ai, gemini",
"author": "Aakash Varma Nadimpalli",
"author_email": "Your Name <your.email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/5d/61/4523521e0c4e563c60560ce6db98fac9b4b422838dae5284cecbb3a1afc6/smart_gcm-0.1.1.tar.gz",
"platform": null,
"description": "# Smart Commit\n\nAI-powered Git commit message generator that follows the Conventional Commits specification using Google Gemini API.\n\n## Features\n\n- Generates commit messages using Google Gemini AI\n- Follows Conventional Commits 1.0.0 specification\n- Interactive editing with Vim\n- Regenerate messages on demand\n- Supports all conventional commit types\n\n## Installation\n\n### From PyPI (once published)\n\n```bash\npip install smart-gcm\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/aakashvarma/smart-gcm.git\ncd smart-gcm\npip install -e .\n```\n\n## Prerequisites\n\n- Python 3.6 or higher\n- Git\n- Vim\n- Google Gemini API key\n\n## Setup\n\n1. Get your Gemini API key from [Google AI Studio](https://makersuite.google.com/app/apikey)\n\n2. Set the environment variable:\n\n```bash\n# Linux/Mac\nexport GEMINI_API_KEY=\"your-api-key-here\"\n\n# Windows\nset GEMINI_API_KEY=your-api-key-here\n```\n\nFor permanent setup, add to your shell profile:\n\n```bash\n# Bash (~/.bashrc or ~/.bash_profile)\necho 'export GEMINI_API_KEY=\"your-api-key-here\"' >> ~/.bashrc\n\n# Zsh (~/.zshrc)\necho 'export GEMINI_API_KEY=\"your-api-key-here\"' >> ~/.zshrc\n```\n\n## Usage\n\n1. Stage your changes:\n\n```bash\ngit add <files>\n```\n\n2. Run Smart Commit:\n\n```bash\ngcm\n```\n\n3. Follow the interactive prompts:\n - Select commit type (feat, fix, refactor, style, test, docs, build, ops, chore, revert)\n - Enter optional scope (max 20 characters)\n - Review the AI-generated commit message\n\n4. Choose an action:\n - `a` - Accept and commit\n - `e` - Edit in Vim\n - `r` - Regenerate message\n - `c` - Cancel\n\n## Commit Types\n\n- **feat**: New feature\n- **fix**: Bug fix\n- **refactor**: Code refactoring (including performance improvements)\n- **style**: Code style changes (formatting, semicolons, etc.)\n- **test**: Adding or updating tests\n- **docs**: Documentation changes\n- **build**: Build system or dependency changes\n- **ops**: Operational/infrastructure changes\n- **chore**: Maintenance tasks\n- **revert**: Revert previous commit\n\n## Examples\n\n```bash\n# Feature with scope\nfeat(auth): add OAuth2 login support\n- Implement Google OAuth2 integration\n- Add user session management\n\n# Bug fix\nfix(api): resolve null pointer exception in user endpoint\n- Add null check for user object\n- Update error handling\n\n# Breaking change\nfeat(api)!: change response format to JSON:API spec\nBREAKING CHANGE: all API responses now follow JSON:API specification\n```\n\n## Development\n\n### Project Structure\n\n```\nsmart-gcm/\n\u251c\u2500\u2500 smart_commit/\n\u2502 \u251c\u2500\u2500 __init__.py\n\u2502 \u251c\u2500\u2500 cli.py # Command-line interface\n\u2502 \u251c\u2500\u2500 commit.py # Commit message generation\n\u2502 \u2514\u2500\u2500 utils.py # Utility functions\n\u251c\u2500\u2500 setup.py\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 LICENSE\n\u2514\u2500\u2500 .gitignore\n```\n\n### Running from Source\n\n```bash\npython -m smart_commit.cli\n```\n\n## License\n\nMIT License - see LICENSE file for details\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Support\n\nIf you encounter any issues or have questions, please file an issue on [GitHub](https://github.com/aakashvarma/smart-gcm/issues).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "AI-powered Git commit message generator using Google Gemini",
"version": "0.1.1",
"project_urls": {
"Bug Reports": "https://github.com/aakashvarma/smart-gcm/issues",
"Homepage": "https://github.com/aakashvarma/smart-gcm",
"Source": "https://github.com/aakashvarma/smart-gcm"
},
"split_keywords": [
"git",
" commit",
" conventional-commits",
" ai",
" gemini"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2b85b14dade084f3325f65fe14402d4b7fb9b7d909eedd6c14024be736bf56f5",
"md5": "2b15f5290b170816deb391b0c9e4bb65",
"sha256": "0fcd125d43e7e3f9e86154f9f40119b399e66794cf9256535670a1b3aeb0d2b4"
},
"downloads": -1,
"filename": "smart_gcm-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2b15f5290b170816deb391b0c9e4bb65",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 9602,
"upload_time": "2025-10-09T16:44:29",
"upload_time_iso_8601": "2025-10-09T16:44:29.797645Z",
"url": "https://files.pythonhosted.org/packages/2b/85/b14dade084f3325f65fe14402d4b7fb9b7d909eedd6c14024be736bf56f5/smart_gcm-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5d614523521e0c4e563c60560ce6db98fac9b4b422838dae5284cecbb3a1afc6",
"md5": "24e4ee475c41359be882663b4dff1288",
"sha256": "da5c86683c19e8e1e4ac88da647ed7d2b6c9ff653da6a61bc58eaf00111c76c1"
},
"downloads": -1,
"filename": "smart_gcm-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "24e4ee475c41359be882663b4dff1288",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 14033,
"upload_time": "2025-10-09T16:44:30",
"upload_time_iso_8601": "2025-10-09T16:44:30.887083Z",
"url": "https://files.pythonhosted.org/packages/5d/61/4523521e0c4e563c60560ce6db98fac9b4b422838dae5284cecbb3a1afc6/smart_gcm-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-09 16:44:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aakashvarma",
"github_project": "smart-gcm",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "smart-gcm"
}