gemcli 1.0.0__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.
@@ -0,0 +1,54 @@
1
+ # Changelog
2
+
3
+ All notable changes to GemCLI will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-01-22
9
+
10
+ ### Added
11
+ - **Four Operating Modes**: Chat, Semi-Agent, Agent, and Image Generation
12
+ - **File Operations**: Read, edit, search, and create files in Semi-Agent and Agent modes
13
+ - **System Command Execution**: Control system operations (open apps, adjust brightness/volume, etc.)
14
+ - **Git Integration**: Auto-commit, push, and AI-generated commit messages
15
+ - **Diff Viewer**: Preview changes before applying with VS Code or terminal
16
+ - **Theme Support**: 6 color schemes (Cyan, Pink, Gold, Green, Purple, White)
17
+ - **File Path Autocomplete**: Claude-style file path completion in Semi-Agent and Agent modes
18
+ - **Workspace Search**: Autonomous file discovery in Agent mode
19
+ - **Image Generation**: Create AI-generated images with customizable save locations
20
+ - **Browser Cookie Auth**: Automatic session extraction from Chrome, Edge, Firefox
21
+ - **Safety Features**: Built-in protections against destructive system commands and file operations
22
+
23
+ ### Commands
24
+ - `/help` - Display comprehensive help with mode capabilities
25
+ - `/exit` or `/quit` - Exit current mode
26
+ - `/clear` - Clear terminal screen
27
+ - `/mode` - Switch between operating modes
28
+ - `/status` - Show git repository status
29
+ - `/commit` - Commit changes with AI-generated message
30
+ - `/push` - Push commits to remote repository
31
+
32
+ ### Security
33
+ - Client-side only - no server component
34
+ - Session tokens never leave local machine
35
+ - No file deletion commands allowed
36
+ - Safe system command execution only
37
+
38
+ ### Documentation
39
+ - Comprehensive README with installation guides
40
+ - QUICKSTART.md for rapid onboarding
41
+ - SYSTEM_COMMANDS.md for system control features
42
+ - GIT_INTEGRATION.md for version control workflows
43
+ - PUBLISH.md for package distribution
44
+
45
+ ---
46
+
47
+ ## [Unreleased]
48
+
49
+ ### Planned
50
+ - Multi-language support
51
+ - Custom system command templates
52
+ - Plugin system for extensibility
53
+ - Cloud sync for settings
54
+ - Team collaboration features
@@ -0,0 +1,112 @@
1
+ # Git Integration Guide
2
+
3
+ ## Overview
4
+ The Gemini CLI now includes full Git integration with AI-powered commit message generation.
5
+
6
+ ## Features
7
+
8
+ ### 1. Git Commands
9
+ Available in Ask and Semi-Agent modes:
10
+
11
+ - **`/status`** - Show current branch and changes
12
+ - **`/commit`** - AI-generated commit message with confirmation
13
+ - **`/push`** - Push commits to remote repository
14
+
15
+ ### 2. Auto-Commit Workflow
16
+ After modifying files in Semi-Agent mode:
17
+ 1. Files are written to disk
18
+ 2. CLI detects you're in a git repository
19
+ 3. Prompts: "Would you like to commit these changes?"
20
+ 4. If yes, AI generates a smart commit message based on the diff
21
+ 5. You review and confirm the commit message
22
+ 6. Changes are committed
23
+
24
+ ### 3. AI Commit Messages
25
+ The AI analyzes:
26
+ - Git diff of all changes
27
+ - File paths modified
28
+ - Context from the conversation
29
+
30
+ It generates:
31
+ - Conventional commit format (feat:, fix:, refactor:, etc.)
32
+ - Clear, concise descriptions
33
+ - Multi-file summaries when needed
34
+
35
+ ## Usage Examples
36
+
37
+ ### Check Status
38
+ ```
39
+ You: /status
40
+ ```
41
+ Output:
42
+ ```
43
+ ◆ Git Status
44
+ Branch: main
45
+
46
+ M gemini_cli.py
47
+ M README.md
48
+ ```
49
+
50
+ ### Commit Changes
51
+ ```
52
+ You: /commit
53
+ ```
54
+ Output:
55
+ ```
56
+ ◆ Generating commit message...
57
+
58
+ ◆ Suggested commit message:
59
+ feat: add git integration with AI-powered commit messages
60
+
61
+ Commit with this message?
62
+ ◆ Yes, commit
63
+ ◆ No, cancel
64
+ ```
65
+
66
+ ### Push to Remote
67
+ ```
68
+ You: /push
69
+ ```
70
+ Output:
71
+ ```
72
+ ◆ Pushing to remote...
73
+ ✓ Pushed successfully
74
+ ```
75
+
76
+ ### Auto-Commit After File Modifications
77
+ In Semi-Agent mode, after files are modified:
78
+ ```
79
+ ✓ Modified: gemini_cli.py
80
+ ✓ Created: GIT_INTEGRATION.md
81
+
82
+ ◆ Would you like to commit these changes?
83
+
84
+ ◆ Yes, generate commit message
85
+ ◆ No, skip
86
+ ```
87
+
88
+ ## Technical Details
89
+
90
+ ### Functions Added
91
+ - `get_git_status()` - Checks repository status, branch, and changes
92
+ - `generate_commit_message(chat, modified_files)` - AI-generated commit messages
93
+ - `git_commit(message, files)` - Commits changes with message
94
+ - `git_push()` - Pushes to remote repository
95
+
96
+ ### Integration Points
97
+ - Commands added to chat loop after `/clear` handler
98
+ - Auto-commit prompt added after file write operations
99
+ - Uses existing chat session for commit message generation
100
+ - Subprocess with CREATE_NO_WINDOW flag for silent execution on Windows
101
+
102
+ ## Benefits
103
+ 1. **Smart Commit Messages** - AI understands context and generates meaningful messages
104
+ 2. **Seamless Workflow** - No need to switch to terminal
105
+ 3. **Review & Confirm** - Always see commit message before committing
106
+ 4. **Conventional Commits** - Follows standard commit message conventions
107
+ 5. **File Tracking** - Automatically stages modified files
108
+
109
+ ## Requirements
110
+ - Git installed and accessible from command line
111
+ - Repository must be initialized (`git init`)
112
+ - Remote configured for push operations
@@ -0,0 +1,238 @@
1
+ # GEM CLI 💎
2
+
3
+ Beautiful terminal interface for Gemini AI with intelligent Git integration and AI-powered coding assistance.
4
+
5
+ ![License](https://img.shields.io/badge/license-MIT-blue.svg)
6
+ ![Python](https://img.shields.io/badge/python-3.8+-blue.svg)
7
+
8
+ ## ✨ Features
9
+
10
+ - **🤖 Multiple Modes**
11
+ - **Ask Mode**: Chat with Gemini AI
12
+ - **Semi-Agent Mode**: AI coding assistant that can read, modify, and create files
13
+ - **Image Generation**: Create stunning images from text prompts
14
+
15
+ - **🔧 Git Integration**
16
+ - AI-generated commit messages
17
+ - Smart branch management
18
+ - Automated commit & push workflows
19
+ - `/status`, `/commit`, `/push` commands
20
+
21
+ - **📁 File Management**
22
+ - Read files with `/path/to/file.py` syntax
23
+ - VS Code diff preview for changes
24
+ - Accept/reject modifications
25
+ - Multi-file operations
26
+
27
+ - **🎨 Beautiful UI**
28
+ - Gradient ASCII art banner
29
+ - Customizable color themes
30
+ - Rich markdown rendering
31
+ - Diamond (◆) indicators
32
+
33
+ - **🔒 100% Private**
34
+ - Client-side only (no server)
35
+ - Your data stays on your machine
36
+ - Secure cookie authentication
37
+
38
+ ## 📦 Installation
39
+
40
+ ### Option 1: Install from Source (Recommended)
41
+
42
+ ```bash
43
+ # Clone the repository
44
+ git clone https://github.com/yourusername/gem-cli.git
45
+ cd gem-cli
46
+
47
+ # Install globally
48
+ pip install .
49
+ ```
50
+
51
+ ### Option 2: Install in Development Mode
52
+
53
+ ```bash
54
+ # Clone the repository
55
+ git clone https://github.com/yourusername/gem-cli.git
56
+ cd gem-cli
57
+
58
+ # Install in editable mode
59
+ pip install -e .
60
+ ```
61
+
62
+ ### Option 3: Install from PyPI (when published)
63
+
64
+ ```bash
65
+ pip install gem-cli
66
+ ```
67
+
68
+ ### Option 4: Direct from GitHub
69
+
70
+ ```bash
71
+ pip install git+https://github.com/yourusername/gem-cli.git
72
+ ```
73
+
74
+ ## 🚀 Quick Start
75
+
76
+ After installation, simply run:
77
+
78
+ ```bash
79
+ gem
80
+ ```
81
+
82
+ Or use the alternative command:
83
+
84
+ ```bash
85
+ gemcli
86
+ ```
87
+
88
+ ### First-Time Setup
89
+
90
+ 1. Run `gem` to start the CLI
91
+ 2. Enter your Gemini cookies:
92
+ - `__Secure-1PSID`
93
+ - `__Secure-1PSIDTS`
94
+ 3. Choose your mode (Ask / Semi-Agent / Image Generation)
95
+ 4. Start chatting!
96
+
97
+ ## 📖 Usage
98
+
99
+ ### Basic Commands
100
+
101
+ All modes support:
102
+ - `/exit` - Exit the application
103
+ - `/clear` - Clear the screen
104
+ - `/mode` - Switch between modes
105
+
106
+ ### Semi-Agent Mode Commands
107
+
108
+ Git integration:
109
+ - `/status` - Show git status and current branch
110
+ - `/commit` - AI-generated commit with confirmation
111
+ - `/push` - Push commits to remote
112
+
113
+ File operations:
114
+ - `/path/to/file.py` - Read and include file in context
115
+ - AI can suggest modifications in JSON format
116
+ - Accept/reject changes with VS Code diff preview
117
+
118
+ ### Git Workflow
119
+
120
+ Configure your preferences from the main menu:
121
+ - **Commit Mode**: "Ask on exit" or "After every change"
122
+ - **Auto Push**: Automatically push after commits
123
+ - **Branch Selection**: Choose/create branches in Semi-Agent mode
124
+
125
+ ### Example Workflows
126
+
127
+ **Coding Assistant:**
128
+ ```
129
+ You: /gemini_cli.py add a new feature to handle user authentication
130
+ ```
131
+ *AI reads the file, suggests changes, opens VS Code diff, you accept*
132
+
133
+ **Git Integration:**
134
+ ```
135
+ You: /commit
136
+ ```
137
+ *AI analyzes changes, generates smart commit message, you confirm*
138
+
139
+ **Image Generation:**
140
+ ```
141
+ You: Create a beautiful sunset over mountains with vibrant colors
142
+ ```
143
+ *AI generates image, saves to configured directory*
144
+
145
+ ## ⚙️ Configuration
146
+
147
+ ### Git Settings
148
+ Access from main menu → **Git Settings**:
149
+ - Commit timing (immediate or on exit)
150
+ - Auto-push after commit
151
+ - Branch selection prompts
152
+
153
+ ### Theme Customization
154
+ Access from main menu → **Customize Theme**:
155
+ - White, Cyan, Pink, Gold, Green, Purple, Hot Pink
156
+
157
+ ### Image Settings
158
+ In Image Mode → **Save Settings**:
159
+ - Configure save directory
160
+ - Auto-complete for directory paths
161
+
162
+ ## 🔑 Getting Gemini Cookies
163
+
164
+ 1. Open [Google Gemini](https://gemini.google.com) in your browser
165
+ 2. Log in to your account
166
+ 3. Open Developer Tools (F12)
167
+ 4. Go to Application/Storage → Cookies
168
+ 5. Find and copy:
169
+ - `__Secure-1PSID`
170
+ - `__Secure-1PSIDTS`
171
+
172
+ Cookies are saved locally in `.gemini_cookies.json`
173
+
174
+ ## 🛠️ Development
175
+
176
+ ### Requirements
177
+
178
+ - Python 3.8+
179
+ - Git (for git integration features)
180
+ - VS Code (recommended for diff previews)
181
+
182
+ ### Install for Development
183
+
184
+ ```bash
185
+ git clone https://github.com/yourusername/gem-cli.git
186
+ cd gem-cli
187
+ pip install -e ".[dev]"
188
+ ```
189
+
190
+ ### Project Structure
191
+
192
+ ```
193
+ gem-cli/
194
+ ├── gemini_cli.py # Main application
195
+ ├── pyproject.toml # Package configuration
196
+ ├── requirements.txt # Dependencies
197
+ ├── README.md # This file
198
+ ├── LICENSE # MIT License
199
+ ├── GIT_INTEGRATION.md # Git features documentation
200
+ └── .gitignore # Git ignore rules
201
+ ```
202
+
203
+ ## 🤝 Contributing
204
+
205
+ Contributions are welcome! Please feel free to submit a Pull Request.
206
+
207
+ 1. Fork the repository
208
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
209
+ 3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
210
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
211
+ 5. Open a Pull Request
212
+
213
+ ## 📝 License
214
+
215
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
216
+
217
+ ## 🙏 Acknowledgments
218
+
219
+ - Built with [gemini-webapi](https://github.com/HanaokaYuzu/Gemini-API) by HanaokaYuzu
220
+ - UI powered by [Rich](https://github.com/Textualize/rich)
221
+ - Interactive prompts by [Questionary](https://github.com/tmbo/questionary)
222
+
223
+ ## 📞 Support
224
+
225
+ - 🐛 Report bugs: [GitHub Issues](https://github.com/yourusername/gem-cli/issues)
226
+ - 💬 Discussions: [GitHub Discussions](https://github.com/yourusername/gem-cli/discussions)
227
+
228
+ ## 🗺️ Roadmap
229
+
230
+ - [ ] PyPI package publication
231
+ - [ ] More Git operations (stash, rebase, etc.)
232
+ - [ ] Plugin system for extensions
233
+ - [ ] Multi-language support
234
+ - [ ] Docker containerization
235
+
236
+ ---
237
+
238
+ Made with ❤️ by 89P13
gemcli-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 89P13
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include requirements.txt
5
+ include QUICKSTART.md
6
+ include GIT_INTEGRATION.md
7
+ include SYSTEM_COMMANDS.md
8
+ include PUBLISH.md
9
+ include INSTALL.md