gemcli 1.0.2__py3-none-any.whl
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.
Potentially problematic release.
This version of gemcli might be problematic. Click here for more details.
- gemcli-1.0.2.dist-info/METADATA +385 -0
- gemcli-1.0.2.dist-info/RECORD +7 -0
- gemcli-1.0.2.dist-info/WHEEL +5 -0
- gemcli-1.0.2.dist-info/entry_points.txt +2 -0
- gemcli-1.0.2.dist-info/licenses/LICENSE +21 -0
- gemcli-1.0.2.dist-info/top_level.txt +1 -0
- gemini_cli.py +2717 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gemcli
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: GemCLI: Use consumer Gemini for unlimited code completions, system automation, and image generation via command-line interface
|
|
5
|
+
Author: 89P13
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: gemini,ai,cli,terminal,git,coding-assistant,automation,system-commands,code-completion,image-generation
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Requires-Python: >=3.8
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: gemini-webapi>=1.17.0
|
|
22
|
+
Requires-Dist: rich>=13.0.0
|
|
23
|
+
Requires-Dist: questionary>=2.0.0
|
|
24
|
+
Requires-Dist: prompt-toolkit>=3.0.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
27
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# GemCLI - Consumer Gemini AI for Code Completions, System Automation, and Image Generation
|
|
31
|
+
|
|
32
|
+
[](https://www.python.org/downloads/)
|
|
33
|
+
[](https://opensource.org/licenses/MIT)
|
|
34
|
+
[](https://github.com/Textualize/rich)
|
|
35
|
+
|
|
36
|
+
A professional Python command-line interface that leverages Google's consumer Gemini AI for unlimited code completions, autonomous file operations, system automation, and AI image generation - all directly from your terminal.
|
|
37
|
+
|
|
38
|
+
GemCLI provides a high-fidelity terminal experience with real-time markdown rendering, customizable themes, and browser-based authentication.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
**PRIVACY & SECURITY**
|
|
43
|
+
This is a CLIENT-SIDE application with NO SERVER component. Your data remains on YOUR machine. All processing is local. Session tokens never leave your system.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Key Features
|
|
48
|
+
|
|
49
|
+
* **Modern Terminal Interface**: Built with Rich library for beautiful, responsive command-line experience
|
|
50
|
+
* **Four Operating Modes**: Chat, Semi-Agent (AI Coding Assistant), Agent (Autonomous), and Image Generation
|
|
51
|
+
* **Browser Cookie Authentication**: Automatic session extraction from Chrome, Edge, or Firefox - no API key needed
|
|
52
|
+
* **File Operations**: Read, edit, search, and create files through AI commands in Agent/Semi-Agent modes
|
|
53
|
+
* **System Command Execution**: Control system operations - open applications, adjust brightness/volume, launch file explorer, manage media playback
|
|
54
|
+
* **Git Integration**: Automatic commit, push, and AI-generated commit messages for version control
|
|
55
|
+
* **Diff Viewer**: Preview code changes before applying with VS Code or terminal-based diff view
|
|
56
|
+
* **Six Theme Profiles**: Customize with Cyan, Pink, Gold, Green, Purple, or White color schemes
|
|
57
|
+
* **Asynchronous Architecture**: Non-blocking API communication built on asyncio
|
|
58
|
+
* **Complete Privacy**: Client-side only - your session tokens never leave your local machine
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Modes & Capabilities
|
|
63
|
+
|
|
64
|
+
GemCLI offers four distinct operating modes, each tailored for specific use cases:
|
|
65
|
+
|
|
66
|
+
| Mode | Ask/Response | Read Files | Edit Files | Workspace Search | Autonomous | System Cmds |
|
|
67
|
+
|:---|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
68
|
+
| **Chat** | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
|
|
69
|
+
| **Semi-Agent** | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ |
|
|
70
|
+
| **Agent** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
71
|
+
| **Image Gen** | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
|
|
72
|
+
|
|
73
|
+
### Mode Descriptions
|
|
74
|
+
|
|
75
|
+
#### Chat Mode
|
|
76
|
+
Basic conversational AI interface. Ask questions, receive answers, and engage in natural conversations with Gemini.
|
|
77
|
+
|
|
78
|
+
#### Semi-Agent Mode (AI Coding Assistant)
|
|
79
|
+
Enhanced mode where you specify files to work with. Gemini can:
|
|
80
|
+
- Read files you specify
|
|
81
|
+
- Suggest code modifications
|
|
82
|
+
- Apply changes with your approval
|
|
83
|
+
- Show diffs before committing
|
|
84
|
+
- Integrate with git workflow
|
|
85
|
+
- Execute system commands:
|
|
86
|
+
- Open/close applications (Chrome, Notepad, Calculator, etc.)
|
|
87
|
+
- Adjust brightness and volume
|
|
88
|
+
- Launch file explorer
|
|
89
|
+
- Control media playback
|
|
90
|
+
- System shutdown (when explicitly requested)
|
|
91
|
+
|
|
92
|
+
#### Agent Mode (Autonomous)
|
|
93
|
+
Fully autonomous coding assistant. Gemini can:
|
|
94
|
+
- Search your entire workspace for relevant files
|
|
95
|
+
- Read any files it determines necessary
|
|
96
|
+
- Make coordinated changes across multiple files
|
|
97
|
+
- Work independently without file specifications
|
|
98
|
+
- Handle complex multi-file refactoring
|
|
99
|
+
- Execute system commands:
|
|
100
|
+
- Open/close applications
|
|
101
|
+
- Adjust brightness and volume
|
|
102
|
+
- Launch file explorer
|
|
103
|
+
- Control media playback
|
|
104
|
+
- System shutdown (when explicitly requested)
|
|
105
|
+
|
|
106
|
+
#### Image Generation Mode
|
|
107
|
+
Create AI-generated images from text descriptions with customizable save locations.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Getting Started
|
|
112
|
+
|
|
113
|
+
### Prerequisites
|
|
114
|
+
|
|
115
|
+
* Python 3.8 or higher installed on your system
|
|
116
|
+
* Active Gemini account - Must be logged into gemini.google.com in Chrome, Edge, or Firefox
|
|
117
|
+
* Internet connection for API communication
|
|
118
|
+
|
|
119
|
+
### Installation
|
|
120
|
+
|
|
121
|
+
#### Option 1: Install from PyPI (Quick Start)
|
|
122
|
+
|
|
123
|
+
Standard pip installation:
|
|
124
|
+
```bash
|
|
125
|
+
pip install gemcli
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
After installation, use one of these commands to start:
|
|
129
|
+
```bash
|
|
130
|
+
# If PATH is configured:
|
|
131
|
+
gem start
|
|
132
|
+
|
|
133
|
+
# If gem command not found (use this if above fails):
|
|
134
|
+
python -m gemini_cli
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### Option 2: Install with pipx (Recommended - Automatic PATH Setup)
|
|
138
|
+
|
|
139
|
+
pipx automatically handles PATH configuration so `gem start` works immediately:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Install pipx if you don't have it
|
|
143
|
+
pip install pipx
|
|
144
|
+
pipx ensurepath
|
|
145
|
+
|
|
146
|
+
# Install GemCLI
|
|
147
|
+
pipx install gemcli
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Close and reopen your terminal, then start GemCLI:
|
|
151
|
+
```bash
|
|
152
|
+
gem start
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
#### Option 3: Install from Source
|
|
156
|
+
|
|
157
|
+
1. Clone the repository and navigate to directory:
|
|
158
|
+
```bash
|
|
159
|
+
git clone https://github.com/89P13/GemCLI.git
|
|
160
|
+
cd GemCLI
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
2. Set up a virtual environment (recommended):
|
|
164
|
+
```bash
|
|
165
|
+
python -m venv venv
|
|
166
|
+
|
|
167
|
+
# Activate on Windows:
|
|
168
|
+
venv\Scripts\activate
|
|
169
|
+
|
|
170
|
+
# Activate on macOS/Linux:
|
|
171
|
+
source venv/bin/activate
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
3. Install required dependencies:
|
|
175
|
+
```bash
|
|
176
|
+
pip install -r requirements.txt
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
4. Run GemCLI:
|
|
180
|
+
```bash
|
|
181
|
+
python gemini_cli.py
|
|
182
|
+
|
|
183
|
+
# OR install locally and use the gem start command:
|
|
184
|
+
pip install -e .
|
|
185
|
+
gem start
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### First-Time Setup
|
|
189
|
+
|
|
190
|
+
When you launch GemCLI for the first time:
|
|
191
|
+
|
|
192
|
+
1. **Automatic Authentication**: GemCLI will automatically detect and extract your Gemini session from your browser (Chrome, Edge, or Firefox). Ensure you are logged into gemini.google.com in one of these browsers.
|
|
193
|
+
|
|
194
|
+
2. **Mode Selection**: You will be presented with a menu to select your operating mode:
|
|
195
|
+
- Chat - Basic conversational AI
|
|
196
|
+
- Semi-Agent - AI coding assistant with file operations
|
|
197
|
+
- Agent - Autonomous coding assistant
|
|
198
|
+
- Image Generation - Create AI images
|
|
199
|
+
|
|
200
|
+
3. **Ready to Use**: Start typing your queries or commands. GemCLI will respond with formatted output directly in your terminal.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Usage Guide
|
|
205
|
+
|
|
206
|
+
### Starting GemCLI
|
|
207
|
+
|
|
208
|
+
Launch the application:
|
|
209
|
+
```bash
|
|
210
|
+
gem start
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Available Commands
|
|
214
|
+
|
|
215
|
+
| Command | Description |
|
|
216
|
+
|:---|:---|
|
|
217
|
+
| `/help` | Display help with mode capabilities and commands |
|
|
218
|
+
| `/exit` or `/quit` | Safely exit the current mode |
|
|
219
|
+
| `/clear` | Clear the terminal screen |
|
|
220
|
+
| `/mode` | Switch between operating modes |
|
|
221
|
+
| `/status` | Show git repository status (Semi-Agent/Agent modes) |
|
|
222
|
+
| `/commit` | Commit changes with AI-generated message (Semi-Agent/Agent modes) |
|
|
223
|
+
| `/push` | Push commits to remote repository (Semi-Agent/Agent modes) |
|
|
224
|
+
|
|
225
|
+
### File Path Autocomplete
|
|
226
|
+
|
|
227
|
+
In Semi-Agent and Agent modes, type `/` to trigger workspace file path autocomplete. Example:
|
|
228
|
+
```
|
|
229
|
+
You: Read /gemini_cli.py
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Settings
|
|
235
|
+
|
|
236
|
+
Access via main menu **Settings** option:
|
|
237
|
+
|
|
238
|
+
### Theme Customization
|
|
239
|
+
Choose from 6 professional color schemes:
|
|
240
|
+
- Cyan
|
|
241
|
+
- Pink
|
|
242
|
+
- Gold
|
|
243
|
+
- Green
|
|
244
|
+
- Purple
|
|
245
|
+
- White
|
|
246
|
+
|
|
247
|
+
### Git Integration
|
|
248
|
+
Configure automatic version control:
|
|
249
|
+
- Enable/Disable: Toggle git integration on or off
|
|
250
|
+
- Commit Mode: Choose immediate or on-exit commit behavior
|
|
251
|
+
- Auto Push: Automatically push commits after committing
|
|
252
|
+
- Branch Prompts: Configure branch creation and selection prompts
|
|
253
|
+
### Diff Viewer
|
|
254
|
+
Preview code changes before applying:
|
|
255
|
+
- VS Code: Open diffs in VS Code editor
|
|
256
|
+
- System Default: Use system default diff tool
|
|
257
|
+
- Terminal Only: Display diffs directly in terminal
|
|
258
|
+
|
|
259
|
+
### Image Generation
|
|
260
|
+
Configure image output settings:
|
|
261
|
+
- Save Path: Specify directory for generated images
|
|
262
|
+
- Filename Pattern: Customize image naming convention
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Project Structure
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
CliTool/
|
|
270
|
+
├── gemini_cli.py # Core application logic and UI
|
|
271
|
+
├── requirements.txt # Python package dependencies
|
|
272
|
+
├── README.md # Main documentation
|
|
273
|
+
├── QUICKSTART.md # Quick reference guide
|
|
274
|
+
├── GIT_INTEGRATION.md # Git workflow documentation
|
|
275
|
+
└── INSTALL.md # Detailed installation instructions
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Example Workflows
|
|
281
|
+
|
|
282
|
+
### Coding with Semi-Agent Mode
|
|
283
|
+
```
|
|
284
|
+
You: Read /src/app.py
|
|
285
|
+
Gemini: [Reads and analyzes file content]
|
|
286
|
+
You: Add error handling to the main function
|
|
287
|
+
Gemini: [Suggests changes with diff preview]
|
|
288
|
+
You: [Review and approve changes]
|
|
289
|
+
Gemini: [Applies modifications to file]
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Autonomous Agent Mode
|
|
293
|
+
```
|
|
294
|
+
You: Refactor the authentication system to use JWT tokens
|
|
295
|
+
Gemini: [Searches workspace for relevant files]
|
|
296
|
+
Gemini: [Reads necessary files and plans changes]
|
|
297
|
+
Gemini: [Makes coordinated modifications across multiple files]
|
|
298
|
+
Gemini: [Displays summary of all changes made]
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### System Commands (Agent/Semi-Agent Mode)
|
|
302
|
+
```
|
|
303
|
+
You: lower the brightness
|
|
304
|
+
Gemini: Setting brightness to 30%
|
|
305
|
+
[Executes system command]
|
|
306
|
+
Command executed successfully
|
|
307
|
+
|
|
308
|
+
You: open chrome
|
|
309
|
+
Gemini: Opening Chrome browser
|
|
310
|
+
[Executes system command]
|
|
311
|
+
Command executed successfully
|
|
312
|
+
|
|
313
|
+
You: increase volume
|
|
314
|
+
Gemini: Increasing system volume
|
|
315
|
+
[Executes system command]
|
|
316
|
+
Command executed successfully
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Available System Commands:**
|
|
320
|
+
- Open/close applications (Chrome, Notepad, Calculator, File Explorer, etc.)
|
|
321
|
+
- Adjust brightness and volume levels
|
|
322
|
+
- Control media playback
|
|
323
|
+
- System shutdown (when explicitly requested)
|
|
324
|
+
|
|
325
|
+
For detailed system command documentation, refer to SYSTEM_COMMANDS.md
|
|
326
|
+
|
|
327
|
+
### Image Generation
|
|
328
|
+
```
|
|
329
|
+
You: Create a futuristic cyberpunk cityscape at night
|
|
330
|
+
Gemini: [Generates image and saves to configured directory]
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Troubleshooting
|
|
336
|
+
|
|
337
|
+
**Command Not Found: 'gem' is not recognized**
|
|
338
|
+
|
|
339
|
+
If `gem start` shows an error after pip installation, you have three options:
|
|
340
|
+
|
|
341
|
+
**Quick Fix (No configuration needed):**
|
|
342
|
+
```bash
|
|
343
|
+
python -m gemini_cli
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
**Permanent Fix (Recommended):**
|
|
347
|
+
```bash
|
|
348
|
+
# Uninstall current installation
|
|
349
|
+
pip uninstall gemcli
|
|
350
|
+
|
|
351
|
+
# Reinstall with pipx (handles PATH automatically)
|
|
352
|
+
pip install pipx
|
|
353
|
+
pipx ensurepath
|
|
354
|
+
pipx install gemcli
|
|
355
|
+
```
|
|
356
|
+
Close and reopen terminal, then `gem start` will work.
|
|
357
|
+
|
|
358
|
+
**Manual PATH Setup:**
|
|
359
|
+
Add Python's Scripts directory (usually `C:\Users\YourName\AppData\Local\Programs\Python\Python3X\Scripts\`) to your system PATH via System Properties > Environment Variables, then restart terminal
|
|
360
|
+
|
|
361
|
+
**Authentication Issues**
|
|
362
|
+
|
|
363
|
+
* Browser Lock: Ensure your browser is closed if the application cannot access the cookie database
|
|
364
|
+
* Login Status: Verify your session is active by visiting gemini.google.com
|
|
365
|
+
* Permissions: On Windows, try running your terminal as Administrator
|
|
366
|
+
|
|
367
|
+
**File Operations**
|
|
368
|
+
|
|
369
|
+
* Use absolute or relative paths from your current directory
|
|
370
|
+
* Type `/` to trigger autocomplete in Agent/Semi-Agent modes
|
|
371
|
+
* Review git status before making extensive changes
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## License & Disclaimer
|
|
376
|
+
|
|
377
|
+
License: Distributed under the MIT License. See LICENSE file for details.
|
|
378
|
+
|
|
379
|
+
Disclaimer: This is an unofficial tool for educational and personal use. It utilizes a web-based API wrapper and may be subject to changes based on Google platform updates. Use responsibly and in accordance with Google's Terms of Service.
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
Made by 89P13
|
|
384
|
+
|
|
385
|
+
---
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
gemini_cli.py,sha256=pl5tyr5OY2_l7w6XrOcCudkRODRoWu2f6FvUutwOZik,128519
|
|
2
|
+
gemcli-1.0.2.dist-info/licenses/LICENSE,sha256=77CeIqAQVcFx3OUYGr215l5WDL15UvFy0ATLwEbsv1I,1083
|
|
3
|
+
gemcli-1.0.2.dist-info/METADATA,sha256=VbGnoJz7qkrZYZPRR5QY8xV4au_xiEhDjzPMvZIJC3o,12459
|
|
4
|
+
gemcli-1.0.2.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
5
|
+
gemcli-1.0.2.dist-info/entry_points.txt,sha256=KmLFNnlWq0AnHiXpEsd2LsKdJFEPBqS3jNABUekjI8s,49
|
|
6
|
+
gemcli-1.0.2.dist-info/top_level.txt,sha256=SRsqiKyD15llWPipzbeaivAzk2CXqZJTf1QDwaxFOgg,11
|
|
7
|
+
gemcli-1.0.2.dist-info/RECORD,,
|
|
@@ -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 @@
|
|
|
1
|
+
gemini_cli
|