Name | gai-tool JSON |
Version |
0.2.6
JSON |
| download |
home_page | None |
Summary | AI-powered automation tool for git |
upload_time | 2025-01-03 08:56:07 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | MIT License Copyright (c) 2024 Daniel Ratmiroff Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
git
ai
automation
commit
merge-request
|
VCS |
|
bugtrack_url |
|
requirements |
annotated-types
anyio
appdirs
build
certifi
cffi
charset-normalizer
codecov
colorama
coverage
cryptography
distro
docutils
filelock
fsspec
groq
h11
httpcore
httpx
huggingface-hub
idna
importlib_metadata
iniconfig
jaraco.classes
jaraco.context
jaraco.functools
jeepney
keyring
markdown-it-py
mdurl
more-itertools
nh3
numpy
packaging
pick
pkginfo
pluggy
pycparser
pydantic
pydantic_core
Pygments
pyproject_hooks
pytest
pytest-cov
PyYAML
readme_renderer
regex
requests
requests-toolbelt
rfc3986
rich
safetensors
SecretStorage
sentencepiece
setuptools
sniffio
tiktoken
tokenizers
tqdm
transformers
twine
typing_extensions
urllib3
wheel
zipp
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
![codecov](https://codecov.io/gh/Danielratmiroff/gai/branch/master/graph/badge.svg)
[![PyPI version](https://badge.fury.io/py/gai-tool.svg)](https://badge.fury.io/py/gai-tool)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# Gai is an AI-Powered Automation Tool for Git 🚀
command-line application that automates git commit messages and merge requests using AI.
![Demo](resources/video_demo.gif)
## ✨ Features
- Generate commit messages based on code diffs.
- Create merge requests with AI-generated titles and descriptions.
- Works with both GitHub and GitLab.
- Supports Groq and Hugging Face AI interfaces.
## 📦 Installation
Install gai-tool via pip:
```bash
pip install gai-tool
```
## 🚀 Getting Started
1. **Navigate to your git repository**:
```bash
cd /path/to/your/git/repo
```
2. **Set API Tokens as Environment Variables**:
```bash
# Ensure you have your AI interface and GitHub/GitLab API tokens set:
export GROQ_API_KEY='your_groq_api_key' # If you want to use Groq's API
export HUGGINGFACE_API_TOKEN='your_hf_api_token' # If you want to use Hugging Face's API
export GITHUB_TOKEN='your_github_token' # If using GitHub
export GITLAB_TOKEN='your_gitlab_token' # If using GitLab
```
3. **Start Using gai-tool**:
```bash
# Generate an AI-powered commit message:
gai commit -a
```
## ⚙️ Configuration
Configuration file is located at `~/.config/gai/config.yaml`. Customize settings like the AI interface, temperature, and target branch.
Example configuration:
```yaml
interface: huggingface
temperature: 0.7
target_branch: master
```
## 📖 Usage
gai-tool provides two main commands: `commit` and `merge`.
### 📝 Commit Messages
Generate an commit message:
```bash
gai commit
```
Options:
- `-a`, `--all`: Stage all changes before committing.
- `-t`, `--temperature`: Override the temperature specified in the config.
- `-i`, `--interface`: Specify and override the AI client API to use (`groq` or `huggingface`).
**Example**:
```bash
# Simply
gai commit -a
# Or
gai commit -a -t 0.5 -i huggingface
```
### 🔀 Merge Requests
Create a merge request:
```bash
gai merge
```
Options:
- `[remote]`: Specify the remote git repository (default is `origin`).
- `--push`, `-p`: Push changes to remote before creating a merge request.
- `--target-branch`, `-tb`: Specify the target branch for the merge request (default is `master`).
- `-t`, `--temperature`: Override the temperature specified in the config.
- `-i`, `--interface`: Specify and override the AI client API to use (`groq` or `huggingface`).
**Example**:
```bash
# Simply
gai merge -p
# Or
gai merge origin -p -tb develop -t 0.8 -i groq
```
## 🛠 Build Instructions
Build gai-tool from source:
1. **Clone the Repository**:
```bash
git clone https://github.com/Danielratmiroff/gai.git
```
2. **Navigate to the Project Directory**:
```bash
cd gai
```
3. **Create a Virtual Environment (Optional but Recommended)**:
```bash
python -m venv venv
source venv/bin/activate # On Windows use venv\Scripts\activate
```
4. **Install Build Tools and Dependencies**:
```bash
pip install build
pip install -r requirements.txt
```
5. **Build the Package**:
```bash
python -m build
```
This will generate distribution files in the `dist/` directory.
6. **Install the Built Package**:
```bash
pip install dist/gai_tool-0.1.0-py3-none-any.whl
```
## 🤝 Contributing
Contributions are welcome!
## 📄 License
MIT License - [LICENSE](LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "gai-tool",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "git, ai, automation, commit, merge-request",
"author": null,
"author_email": "Daniel Ratmiroff <danielratmiroff@pm.me>",
"download_url": "https://files.pythonhosted.org/packages/62/d2/282ff4f4d1457c36fa1357ae18af18a9d9b9b03c3659b40cfd015c00e98a/gai_tool-0.2.6.tar.gz",
"platform": null,
"description": "![codecov](https://codecov.io/gh/Danielratmiroff/gai/branch/master/graph/badge.svg)\n[![PyPI version](https://badge.fury.io/py/gai-tool.svg)](https://badge.fury.io/py/gai-tool)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# Gai is an AI-Powered Automation Tool for Git \ud83d\ude80\n\ncommand-line application that automates git commit messages and merge requests using AI. \n\n![Demo](resources/video_demo.gif)\n\n## \u2728 Features\n\n- Generate commit messages based on code diffs.\n- Create merge requests with AI-generated titles and descriptions.\n- Works with both GitHub and GitLab.\n- Supports Groq and Hugging Face AI interfaces.\n\n## \ud83d\udce6 Installation\n\nInstall gai-tool via pip:\n\n```bash\npip install gai-tool\n```\n\n## \ud83d\ude80 Getting Started\n\n1. **Navigate to your git repository**:\n\n ```bash\n cd /path/to/your/git/repo\n ```\n\n2. **Set API Tokens as Environment Variables**:\n\n ```bash\n # Ensure you have your AI interface and GitHub/GitLab API tokens set:\n export GROQ_API_KEY='your_groq_api_key' # If you want to use Groq's API\n export HUGGINGFACE_API_TOKEN='your_hf_api_token' # If you want to use Hugging Face's API\n export GITHUB_TOKEN='your_github_token' # If using GitHub\n export GITLAB_TOKEN='your_gitlab_token' # If using GitLab\n ```\n3. **Start Using gai-tool**:\n\n ```bash\n # Generate an AI-powered commit message:\n gai commit -a\n ```\n\n## \u2699\ufe0f Configuration\n\nConfiguration file is located at `~/.config/gai/config.yaml`. Customize settings like the AI interface, temperature, and target branch.\n\nExample configuration:\n\n```yaml\ninterface: huggingface\ntemperature: 0.7\ntarget_branch: master\n```\n\n## \ud83d\udcd6 Usage\n\ngai-tool provides two main commands: `commit` and `merge`.\n\n### \ud83d\udcdd Commit Messages\n\nGenerate an commit message:\n\n```bash\ngai commit\n```\n\nOptions:\n\n- `-a`, `--all`: Stage all changes before committing.\n- `-t`, `--temperature`: Override the temperature specified in the config.\n- `-i`, `--interface`: Specify and override the AI client API to use (`groq` or `huggingface`).\n\n**Example**:\n```bash\n# Simply\ngai commit -a\n# Or\ngai commit -a -t 0.5 -i huggingface\n```\n\n### \ud83d\udd00 Merge Requests\n\nCreate a merge request:\n\n```bash\ngai merge\n```\n\nOptions:\n\n- `[remote]`: Specify the remote git repository (default is `origin`).\n- `--push`, `-p`: Push changes to remote before creating a merge request.\n- `--target-branch`, `-tb`: Specify the target branch for the merge request (default is `master`).\n- `-t`, `--temperature`: Override the temperature specified in the config.\n- `-i`, `--interface`: Specify and override the AI client API to use (`groq` or `huggingface`).\n\n**Example**:\n```bash\n# Simply\ngai merge -p\n# Or\ngai merge origin -p -tb develop -t 0.8 -i groq\n```\n\n## \ud83d\udee0 Build Instructions\n\nBuild gai-tool from source:\n\n1. **Clone the Repository**:\n\n ```bash\n git clone https://github.com/Danielratmiroff/gai.git\n ```\n\n2. **Navigate to the Project Directory**:\n\n ```bash\n cd gai\n ```\n\n3. **Create a Virtual Environment (Optional but Recommended)**:\n\n ```bash\n python -m venv venv\n source venv/bin/activate # On Windows use venv\\Scripts\\activate\n ```\n\n4. **Install Build Tools and Dependencies**:\n\n ```bash\n pip install build\n pip install -r requirements.txt\n ```\n\n5. **Build the Package**:\n\n ```bash\n python -m build\n ```\n\n This will generate distribution files in the `dist/` directory.\n\n6. **Install the Built Package**:\n\n ```bash\n pip install dist/gai_tool-0.1.0-py3-none-any.whl\n ```\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! \n\n\n## \ud83d\udcc4 License\n\nMIT License - [LICENSE](LICENSE).\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Daniel Ratmiroff Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "AI-powered automation tool for git",
"version": "0.2.6",
"project_urls": {
"Bug Tracker": "https://github.com/Danielratmiroff/gai/issues",
"Documentation": "https://github.com/Danielratmiroff/gai#readme",
"Homepage": "https://github.com/Danielratmiroff/gai",
"Source": "https://github.com/Danielratmiroff/gai"
},
"split_keywords": [
"git",
" ai",
" automation",
" commit",
" merge-request"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "25083d0ddea7eb73edab83fe0cc9443354b85f68ee1b7261ff09903baac92ebb",
"md5": "bbbb7e8664ef1167521d032a7ba08f76",
"sha256": "587cbe53a6bbd88d0a83a3c835a5b5653c96e3d088391e07cb5df7c08f33ecac"
},
"downloads": -1,
"filename": "gai_tool-0.2.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bbbb7e8664ef1167521d032a7ba08f76",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20943,
"upload_time": "2025-01-03T08:56:05",
"upload_time_iso_8601": "2025-01-03T08:56:05.672027Z",
"url": "https://files.pythonhosted.org/packages/25/08/3d0ddea7eb73edab83fe0cc9443354b85f68ee1b7261ff09903baac92ebb/gai_tool-0.2.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "62d2282ff4f4d1457c36fa1357ae18af18a9d9b9b03c3659b40cfd015c00e98a",
"md5": "2da32bbb38e5dd69dd1ede3173d8f678",
"sha256": "1858858987b98a7fce2f1f551ee7f870a63b31610f4db51e2b73426030a6528e"
},
"downloads": -1,
"filename": "gai_tool-0.2.6.tar.gz",
"has_sig": false,
"md5_digest": "2da32bbb38e5dd69dd1ede3173d8f678",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19015,
"upload_time": "2025-01-03T08:56:07",
"upload_time_iso_8601": "2025-01-03T08:56:07.907244Z",
"url": "https://files.pythonhosted.org/packages/62/d2/282ff4f4d1457c36fa1357ae18af18a9d9b9b03c3659b40cfd015c00e98a/gai_tool-0.2.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-03 08:56:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Danielratmiroff",
"github_project": "gai",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "annotated-types",
"specs": [
[
"==",
"0.7.0"
]
]
},
{
"name": "anyio",
"specs": [
[
"==",
"4.6.2.post1"
]
]
},
{
"name": "appdirs",
"specs": [
[
"==",
"1.4.4"
]
]
},
{
"name": "build",
"specs": [
[
"==",
"1.2.2.post1"
]
]
},
{
"name": "certifi",
"specs": [
[
"==",
"2024.8.30"
]
]
},
{
"name": "cffi",
"specs": [
[
"==",
"1.17.1"
]
]
},
{
"name": "charset-normalizer",
"specs": [
[
"==",
"3.4.0"
]
]
},
{
"name": "codecov",
"specs": [
[
"==",
"2.1.13"
]
]
},
{
"name": "colorama",
"specs": [
[
"==",
"0.4.6"
]
]
},
{
"name": "coverage",
"specs": [
[
"==",
"7.6.4"
]
]
},
{
"name": "cryptography",
"specs": [
[
"==",
"43.0.3"
]
]
},
{
"name": "distro",
"specs": [
[
"==",
"1.9.0"
]
]
},
{
"name": "docutils",
"specs": [
[
"==",
"0.21.2"
]
]
},
{
"name": "filelock",
"specs": [
[
"==",
"3.16.1"
]
]
},
{
"name": "fsspec",
"specs": [
[
"==",
"2024.10.0"
]
]
},
{
"name": "groq",
"specs": [
[
"==",
"0.11.0"
]
]
},
{
"name": "h11",
"specs": [
[
"==",
"0.14.0"
]
]
},
{
"name": "httpcore",
"specs": [
[
"==",
"1.0.6"
]
]
},
{
"name": "httpx",
"specs": [
[
"==",
"0.27.2"
]
]
},
{
"name": "huggingface-hub",
"specs": [
[
"==",
"0.26.1"
]
]
},
{
"name": "idna",
"specs": [
[
"==",
"3.10"
]
]
},
{
"name": "importlib_metadata",
"specs": [
[
"==",
"8.5.0"
]
]
},
{
"name": "iniconfig",
"specs": [
[
"==",
"2.0.0"
]
]
},
{
"name": "jaraco.classes",
"specs": [
[
"==",
"3.4.0"
]
]
},
{
"name": "jaraco.context",
"specs": [
[
"==",
"6.0.1"
]
]
},
{
"name": "jaraco.functools",
"specs": [
[
"==",
"4.1.0"
]
]
},
{
"name": "jeepney",
"specs": [
[
"==",
"0.8.0"
]
]
},
{
"name": "keyring",
"specs": [
[
"==",
"25.4.1"
]
]
},
{
"name": "markdown-it-py",
"specs": [
[
"==",
"3.0.0"
]
]
},
{
"name": "mdurl",
"specs": [
[
"==",
"0.1.2"
]
]
},
{
"name": "more-itertools",
"specs": [
[
"==",
"10.5.0"
]
]
},
{
"name": "nh3",
"specs": [
[
"==",
"0.2.18"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"2.1.2"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"24.1"
]
]
},
{
"name": "pick",
"specs": [
[
"==",
"2.4.0"
]
]
},
{
"name": "pkginfo",
"specs": [
[
"==",
"1.10.0"
]
]
},
{
"name": "pluggy",
"specs": [
[
"==",
"1.5.0"
]
]
},
{
"name": "pycparser",
"specs": [
[
"==",
"2.22"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.9.2"
]
]
},
{
"name": "pydantic_core",
"specs": [
[
"==",
"2.23.4"
]
]
},
{
"name": "Pygments",
"specs": [
[
"==",
"2.18.0"
]
]
},
{
"name": "pyproject_hooks",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"8.3.3"
]
]
},
{
"name": "pytest-cov",
"specs": [
[
"==",
"5.0.0"
]
]
},
{
"name": "PyYAML",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "readme_renderer",
"specs": [
[
"==",
"44.0"
]
]
},
{
"name": "regex",
"specs": [
[
"==",
"2024.9.11"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.32.3"
]
]
},
{
"name": "requests-toolbelt",
"specs": [
[
"==",
"1.0.0"
]
]
},
{
"name": "rfc3986",
"specs": [
[
"==",
"2.0.0"
]
]
},
{
"name": "rich",
"specs": [
[
"==",
"13.9.2"
]
]
},
{
"name": "safetensors",
"specs": [
[
"==",
"0.4.5"
]
]
},
{
"name": "SecretStorage",
"specs": [
[
"==",
"3.3.3"
]
]
},
{
"name": "sentencepiece",
"specs": [
[
"==",
"0.2.0"
]
]
},
{
"name": "setuptools",
"specs": [
[
"==",
"75.2.0"
]
]
},
{
"name": "sniffio",
"specs": [
[
"==",
"1.3.1"
]
]
},
{
"name": "tiktoken",
"specs": [
[
"==",
"0.8.0"
]
]
},
{
"name": "tokenizers",
"specs": [
[
"==",
"0.20.1"
]
]
},
{
"name": "tqdm",
"specs": [
[
"==",
"4.66.5"
]
]
},
{
"name": "transformers",
"specs": [
[
"==",
"4.46.0"
]
]
},
{
"name": "twine",
"specs": [
[
"==",
"5.1.1"
]
]
},
{
"name": "typing_extensions",
"specs": [
[
"==",
"4.12.2"
]
]
},
{
"name": "urllib3",
"specs": [
[
"==",
"2.2.3"
]
]
},
{
"name": "wheel",
"specs": [
[
"==",
"0.44.0"
]
]
},
{
"name": "zipp",
"specs": [
[
"==",
"3.20.2"
]
]
}
],
"lcname": "gai-tool"
}