-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgcommit.py
More file actions
28 lines (21 loc) · 928 Bytes
/
gcommit.py
File metadata and controls
28 lines (21 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python3
"""
gcommit - AI-powered Git commit message generator
Uses Ollama to generate conventional commit messages from staged changes
"""
import sys
import argparse
from gcommit_app import GCommit
def main():
"""Entry point for the CLI"""
parser = argparse.ArgumentParser(description='AI-powered git commit message generator')
parser.add_argument('hint', help='Hint/instruction for generating the commit message')
parser.add_argument('--ollama-url', default='http://localhost:11434',
help='Ollama server URL (default: http://localhost:11434)')
parser.add_argument('--model', default='gemma3:4b-it-qat',
help='Ollama model to use (default: gemma3:4b-it-qat)')
args = parser.parse_args()
app = GCommit(ollama_url=args.ollama_url, model=args.model, hint=args.hint)
sys.exit(app.run())
if __name__ == '__main__':
main()