agent-gitv1 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_gitv1-0.1.4/PKG-INFO +168 -0
- agent_gitv1-0.1.4/README.md +153 -0
- agent_gitv1-0.1.4/agent.py +1404 -0
- {agent_gitv1-0.1.2 → agent_gitv1-0.1.4}/pyproject.toml +36 -36
- agent_gitv1-0.1.2/PKG-INFO +0 -130
- agent_gitv1-0.1.2/README.md +0 -115
- agent_gitv1-0.1.2/agent.py +0 -798
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-gitv1
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: AI-powered Git CLI using MCP + OpenAI, Gemini, or Ollama for commit workflows
|
|
5
|
+
Author-email: Vijay <you@example.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: ai,automation,cli,gemini,git,mcp
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Requires-Dist: click>=8.1
|
|
10
|
+
Requires-Dist: google-genai>=0.8.0
|
|
11
|
+
Requires-Dist: mcp[cli]>=1.0.0
|
|
12
|
+
Requires-Dist: openai>=1.14.0
|
|
13
|
+
Requires-Dist: requests>=2.31.0
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# agent-gitv1
|
|
17
|
+
|
|
18
|
+
AI-powered Git CLI for commit workflows using MCP plus your chosen LLM provider.
|
|
19
|
+
|
|
20
|
+
Supported providers:
|
|
21
|
+
- Google Gemini
|
|
22
|
+
- OpenAI
|
|
23
|
+
- Ollama (local or same-network)
|
|
24
|
+
|
|
25
|
+
## Quick Start
|
|
26
|
+
|
|
27
|
+
1. Install:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install agent-gitv1
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. Configure provider/model:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
agent config
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. Use it in any git repository:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
agent commit
|
|
43
|
+
agent explain
|
|
44
|
+
agent push
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Features
|
|
48
|
+
|
|
49
|
+
- Provider setup with `agent config`
|
|
50
|
+
- Smart staging with auto-grouping (UI/backend/config/etc.)
|
|
51
|
+
- Multi-suggestion commit messages (`--suggestions`)
|
|
52
|
+
- Repo-aware commit style learning (recent commits)
|
|
53
|
+
- `agent explain` for change summary, intent, and risk areas
|
|
54
|
+
- Ollama local-network detection (same `/24`, port `11434`)
|
|
55
|
+
- Loading/thinking spinner during long-running tasks
|
|
56
|
+
- `agent push` with live command output streaming
|
|
57
|
+
- LLM-driven push-failure diagnosis with adaptive live git evidence collection
|
|
58
|
+
|
|
59
|
+
## Requirements
|
|
60
|
+
|
|
61
|
+
- Python 3.10+
|
|
62
|
+
- Git
|
|
63
|
+
- `uvx` (`pip install uv`)
|
|
64
|
+
- Provider credentials (Gemini/OpenAI) or running Ollama server
|
|
65
|
+
|
|
66
|
+
## Install
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install agent-gitv1
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Verify:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
agent --version
|
|
76
|
+
agent --help
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Configure
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
agent config
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Provider notes:
|
|
86
|
+
- Gemini: set `GEMINI_API_KEY` or enter key in config
|
|
87
|
+
- OpenAI: set `OPENAI_API_KEY` or enter key in config
|
|
88
|
+
- Ollama: can auto-detect endpoints like `http://192.168.1.35:11434`
|
|
89
|
+
|
|
90
|
+
## Commands
|
|
91
|
+
|
|
92
|
+
### `agent config`
|
|
93
|
+
Configure LLM provider and model.
|
|
94
|
+
|
|
95
|
+
### `agent commit`
|
|
96
|
+
Smart-stage changes, generate repo-aware suggestions, choose messages, and commit.
|
|
97
|
+
|
|
98
|
+
Examples:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
agent commit
|
|
102
|
+
agent commit --suggestions 3
|
|
103
|
+
agent commit --no-smart-stage
|
|
104
|
+
agent commit --repo /path/to/repo
|
|
105
|
+
agent commit --verbose
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `agent explain`
|
|
109
|
+
Explain current uncommitted changes:
|
|
110
|
+
- what changed
|
|
111
|
+
- why it likely changed
|
|
112
|
+
- risk areas
|
|
113
|
+
- files impacted
|
|
114
|
+
|
|
115
|
+
Examples:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
agent explain
|
|
119
|
+
agent explain --repo /path/to/repo
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### `agent push`
|
|
123
|
+
Push to remote with live output.
|
|
124
|
+
|
|
125
|
+
Examples:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
agent push
|
|
129
|
+
agent push --remote origin --branch main
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
When `--branch` is omitted, `agent` auto-detects and pushes your current local branch name.
|
|
133
|
+
|
|
134
|
+
If push fails, `agent` first uses the LLM to choose evidence depth, then runs diagnosis commands live.
|
|
135
|
+
For divergence/history problems it collects full branch evidence (`fetch`, logs, ahead/behind, merge-base).
|
|
136
|
+
For auth/permission issues it uses a lightweight evidence set to avoid noisy output.
|
|
137
|
+
If the current branch has no upstream, `agent` offers to run `git push --set-upstream` automatically.
|
|
138
|
+
|
|
139
|
+
### `agent --help`
|
|
140
|
+
Show all commands and options.
|
|
141
|
+
|
|
142
|
+
## Environment Variables
|
|
143
|
+
|
|
144
|
+
- `GEMINI_API_KEY`
|
|
145
|
+
- `OPENAI_API_KEY`
|
|
146
|
+
|
|
147
|
+
## Developer Setup (optional)
|
|
148
|
+
|
|
149
|
+
Only for contributors working on this codebase:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
git clone <repo-url>
|
|
153
|
+
cd Agent_bhai
|
|
154
|
+
pip install -e .
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Publish to PyPI
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
python -m pip install --upgrade build twine
|
|
161
|
+
python -m build
|
|
162
|
+
python -m twine check dist/*
|
|
163
|
+
python -m twine upload dist/*
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
MIT
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# agent-gitv1
|
|
2
|
+
|
|
3
|
+
AI-powered Git CLI for commit workflows using MCP plus your chosen LLM provider.
|
|
4
|
+
|
|
5
|
+
Supported providers:
|
|
6
|
+
- Google Gemini
|
|
7
|
+
- OpenAI
|
|
8
|
+
- Ollama (local or same-network)
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
1. Install:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install agent-gitv1
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. Configure provider/model:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
agent config
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
3. Use it in any git repository:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
agent commit
|
|
28
|
+
agent explain
|
|
29
|
+
agent push
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- Provider setup with `agent config`
|
|
35
|
+
- Smart staging with auto-grouping (UI/backend/config/etc.)
|
|
36
|
+
- Multi-suggestion commit messages (`--suggestions`)
|
|
37
|
+
- Repo-aware commit style learning (recent commits)
|
|
38
|
+
- `agent explain` for change summary, intent, and risk areas
|
|
39
|
+
- Ollama local-network detection (same `/24`, port `11434`)
|
|
40
|
+
- Loading/thinking spinner during long-running tasks
|
|
41
|
+
- `agent push` with live command output streaming
|
|
42
|
+
- LLM-driven push-failure diagnosis with adaptive live git evidence collection
|
|
43
|
+
|
|
44
|
+
## Requirements
|
|
45
|
+
|
|
46
|
+
- Python 3.10+
|
|
47
|
+
- Git
|
|
48
|
+
- `uvx` (`pip install uv`)
|
|
49
|
+
- Provider credentials (Gemini/OpenAI) or running Ollama server
|
|
50
|
+
|
|
51
|
+
## Install
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install agent-gitv1
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Verify:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
agent --version
|
|
61
|
+
agent --help
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Configure
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
agent config
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Provider notes:
|
|
71
|
+
- Gemini: set `GEMINI_API_KEY` or enter key in config
|
|
72
|
+
- OpenAI: set `OPENAI_API_KEY` or enter key in config
|
|
73
|
+
- Ollama: can auto-detect endpoints like `http://192.168.1.35:11434`
|
|
74
|
+
|
|
75
|
+
## Commands
|
|
76
|
+
|
|
77
|
+
### `agent config`
|
|
78
|
+
Configure LLM provider and model.
|
|
79
|
+
|
|
80
|
+
### `agent commit`
|
|
81
|
+
Smart-stage changes, generate repo-aware suggestions, choose messages, and commit.
|
|
82
|
+
|
|
83
|
+
Examples:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
agent commit
|
|
87
|
+
agent commit --suggestions 3
|
|
88
|
+
agent commit --no-smart-stage
|
|
89
|
+
agent commit --repo /path/to/repo
|
|
90
|
+
agent commit --verbose
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### `agent explain`
|
|
94
|
+
Explain current uncommitted changes:
|
|
95
|
+
- what changed
|
|
96
|
+
- why it likely changed
|
|
97
|
+
- risk areas
|
|
98
|
+
- files impacted
|
|
99
|
+
|
|
100
|
+
Examples:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
agent explain
|
|
104
|
+
agent explain --repo /path/to/repo
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### `agent push`
|
|
108
|
+
Push to remote with live output.
|
|
109
|
+
|
|
110
|
+
Examples:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
agent push
|
|
114
|
+
agent push --remote origin --branch main
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
When `--branch` is omitted, `agent` auto-detects and pushes your current local branch name.
|
|
118
|
+
|
|
119
|
+
If push fails, `agent` first uses the LLM to choose evidence depth, then runs diagnosis commands live.
|
|
120
|
+
For divergence/history problems it collects full branch evidence (`fetch`, logs, ahead/behind, merge-base).
|
|
121
|
+
For auth/permission issues it uses a lightweight evidence set to avoid noisy output.
|
|
122
|
+
If the current branch has no upstream, `agent` offers to run `git push --set-upstream` automatically.
|
|
123
|
+
|
|
124
|
+
### `agent --help`
|
|
125
|
+
Show all commands and options.
|
|
126
|
+
|
|
127
|
+
## Environment Variables
|
|
128
|
+
|
|
129
|
+
- `GEMINI_API_KEY`
|
|
130
|
+
- `OPENAI_API_KEY`
|
|
131
|
+
|
|
132
|
+
## Developer Setup (optional)
|
|
133
|
+
|
|
134
|
+
Only for contributors working on this codebase:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
git clone <repo-url>
|
|
138
|
+
cd Agent_bhai
|
|
139
|
+
pip install -e .
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Publish to PyPI
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
python -m pip install --upgrade build twine
|
|
146
|
+
python -m build
|
|
147
|
+
python -m twine check dist/*
|
|
148
|
+
python -m twine upload dist/*
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT
|