code-lm 0.1.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.
- code_lm-0.1.0/MANIFEST.in +3 -0
- code_lm-0.1.0/PKG-INFO +181 -0
- code_lm-0.1.0/README.md +153 -0
- code_lm-0.1.0/pyproject.toml +41 -0
- code_lm-0.1.0/setup.cfg +4 -0
- code_lm-0.1.0/setup.py +39 -0
- code_lm-0.1.0/src/code_lm.egg-info/PKG-INFO +181 -0
- code_lm-0.1.0/src/code_lm.egg-info/SOURCES.txt +27 -0
- code_lm-0.1.0/src/code_lm.egg-info/dependency_links.txt +1 -0
- code_lm-0.1.0/src/code_lm.egg-info/entry_points.txt +2 -0
- code_lm-0.1.0/src/code_lm.egg-info/requires.txt +6 -0
- code_lm-0.1.0/src/code_lm.egg-info/top_level.txt +1 -0
- code_lm-0.1.0/src/gemini_cli/__init__.py +5 -0
- code_lm-0.1.0/src/gemini_cli/config.py +78 -0
- code_lm-0.1.0/src/gemini_cli/main.py +225 -0
- code_lm-0.1.0/src/gemini_cli/models/__init__.py +6 -0
- code_lm-0.1.0/src/gemini_cli/models/gemini.py +552 -0
- code_lm-0.1.0/src/gemini_cli/models/openrouter.py +559 -0
- code_lm-0.1.0/src/gemini_cli/tools/__init__.py +85 -0
- code_lm-0.1.0/src/gemini_cli/tools/base.py +86 -0
- code_lm-0.1.0/src/gemini_cli/tools/directory_tools.py +120 -0
- code_lm-0.1.0/src/gemini_cli/tools/file_tools.py +207 -0
- code_lm-0.1.0/src/gemini_cli/tools/quality_tools.py +108 -0
- code_lm-0.1.0/src/gemini_cli/tools/summarizer_tool.py +144 -0
- code_lm-0.1.0/src/gemini_cli/tools/system_tools.py +65 -0
- code_lm-0.1.0/src/gemini_cli/tools/task_complete_tool.py +53 -0
- code_lm-0.1.0/src/gemini_cli/tools/test_runner.py +99 -0
- code_lm-0.1.0/src/gemini_cli/tools/tree_tool.py +92 -0
- code_lm-0.1.0/src/gemini_cli/utils.py +20 -0
code_lm-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: code-lm
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: An AI coding assistant CLI using OpenRouter and various LLM models.
|
|
5
|
+
Home-page: https://github.com/Panagiotis897/lm-code
|
|
6
|
+
Author: Panagiotis897
|
|
7
|
+
Author-email: Panagiotis897 <your.email@example.com>
|
|
8
|
+
Project-URL: Homepage, https://github.com/Panagiotis897/lm-code
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/Panagiotis897/lm-code/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Software Development
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Requires-Python: >=3.7
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: click>=8.0
|
|
20
|
+
Requires-Dist: rich>=13.0
|
|
21
|
+
Requires-Dist: requests>=2.25.0
|
|
22
|
+
Requires-Dist: PyYAML>=6.0
|
|
23
|
+
Requires-Dist: tiktoken>=0.6.0
|
|
24
|
+
Requires-Dist: questionary>=2.0.0
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: home-page
|
|
27
|
+
Dynamic: requires-python
|
|
28
|
+
|
|
29
|
+
# Gemini Code
|
|
30
|
+
|
|
31
|
+
A powerful AI coding assistant for your terminal, powered by Gemini 2.5 Pro with support for other LLM models.
|
|
32
|
+
More information [here](https://blossom-tarsier-434.notion.site/Gemini-Code-1c6c13716ff180db86a0c7f4b2da13ab?pvs=4)
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
- Interactive chat sessions in your terminal
|
|
37
|
+
- Multiple model support (Gemini 2.5 Pro, Gemini 1.5 Pro, and more)
|
|
38
|
+
- Basic history management (prevents excessive length)
|
|
39
|
+
- Markdown rendering in the terminal
|
|
40
|
+
- Automatic tool usage by the assistant:
|
|
41
|
+
- File operations (view, edit, list, grep, glob)
|
|
42
|
+
- Directory operations (ls, tree, create_directory)
|
|
43
|
+
- System commands (bash)
|
|
44
|
+
- Quality checks (linting, formatting)
|
|
45
|
+
- Test running capabilities (pytest, etc.)
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
### Method 1: Install from PyPI (Recommended)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Install directly from PyPI
|
|
53
|
+
pip install gemini-code
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Method 2: Install from Source
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Clone the repository
|
|
60
|
+
git clone https://github.com/raizamartin/gemini-code.git
|
|
61
|
+
cd gemini-code
|
|
62
|
+
|
|
63
|
+
# Install the package
|
|
64
|
+
pip install -e .
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Setup
|
|
68
|
+
|
|
69
|
+
Before using Gemini CLI, you need to set up your API keys:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Set up Google API key for Gemini models
|
|
73
|
+
gemini setup YOUR_GOOGLE_API_KEY
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Start an interactive session with the default model
|
|
80
|
+
gemini
|
|
81
|
+
|
|
82
|
+
# Start a session with a specific model
|
|
83
|
+
gemini --model models/gemini-2.5-pro-exp-03-25
|
|
84
|
+
|
|
85
|
+
# Set default model
|
|
86
|
+
gemini set-default-model models/gemini-2.5-pro-exp-03-25
|
|
87
|
+
|
|
88
|
+
# List all available models
|
|
89
|
+
gemini list-models
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Interactive Commands
|
|
93
|
+
|
|
94
|
+
During an interactive session, you can use these commands:
|
|
95
|
+
|
|
96
|
+
- `/exit` - Exit the chat session
|
|
97
|
+
- `/help` - Display help information
|
|
98
|
+
|
|
99
|
+
## How It Works
|
|
100
|
+
|
|
101
|
+
### Tool Usage
|
|
102
|
+
|
|
103
|
+
Unlike direct command-line tools, the Gemini CLI's tools are used automatically by the assistant to help answer your questions. For example:
|
|
104
|
+
|
|
105
|
+
1. You ask: "What files are in the current directory?"
|
|
106
|
+
2. The assistant uses the `ls` tool behind the scenes
|
|
107
|
+
3. The assistant provides you with a formatted response
|
|
108
|
+
|
|
109
|
+
This approach makes the interaction more natural and similar to how Claude Code works.
|
|
110
|
+
|
|
111
|
+
## Development
|
|
112
|
+
|
|
113
|
+
This project is under active development. More models and features will be added soon!
|
|
114
|
+
|
|
115
|
+
### Recent Changes in v0.1.69
|
|
116
|
+
|
|
117
|
+
- Added test_runner tool to execute automated tests (e.g., pytest)
|
|
118
|
+
- Fixed syntax issues in the tool definitions
|
|
119
|
+
- Improved error handling in tool execution
|
|
120
|
+
- Updated status displays during tool execution with more informative messages
|
|
121
|
+
- Added additional utility tools (directory_tools, quality_tools, task_complete_tool, summarizer_tool)
|
|
122
|
+
|
|
123
|
+
### Recent Changes in v0.1.21
|
|
124
|
+
|
|
125
|
+
- Implemented native Gemini function calling for much more reliable tool usage
|
|
126
|
+
- Rewritten the tool execution system to use Gemini's built-in function calling capability
|
|
127
|
+
- Enhanced the edit tool to better handle file creation and content updating
|
|
128
|
+
- Updated system prompt to encourage function calls instead of text-based tool usage
|
|
129
|
+
- Fixed issues with Gemini not actively creating or modifying files
|
|
130
|
+
- Simplified the BaseTool interface to support both legacy and function call modes
|
|
131
|
+
|
|
132
|
+
### Recent Changes in v0.1.20
|
|
133
|
+
|
|
134
|
+
- Fixed error with Flask version check in example code
|
|
135
|
+
- Improved error handling in system prompt example code
|
|
136
|
+
|
|
137
|
+
### Recent Changes in v0.1.19
|
|
138
|
+
|
|
139
|
+
- Improved system prompt to encourage more active tool usage
|
|
140
|
+
- Added thinking/planning phase to help Gemini reason about solutions
|
|
141
|
+
- Enhanced response format to prioritize creating and modifying files over printing code
|
|
142
|
+
- Filtered out thinking stages from final output to keep responses clean
|
|
143
|
+
- Made Gemini more proactive as a coding partner, not just an advisor
|
|
144
|
+
|
|
145
|
+
### Recent Changes in v0.1.18
|
|
146
|
+
|
|
147
|
+
- Updated default model to Gemini 2.5 Pro Experimental (models/gemini-2.5-pro-exp-03-25)
|
|
148
|
+
- Updated system prompts to reference Gemini 2.5 Pro
|
|
149
|
+
- Improved model usage and documentation
|
|
150
|
+
|
|
151
|
+
### Recent Changes in v0.1.17
|
|
152
|
+
|
|
153
|
+
- Added `list-models` command to show all available Gemini models
|
|
154
|
+
- Improved error handling for models that don't exist or require permission
|
|
155
|
+
- Added model initialization test to verify model availability
|
|
156
|
+
- Updated help documentation with new commands
|
|
157
|
+
|
|
158
|
+
### Recent Changes in v0.1.16
|
|
159
|
+
|
|
160
|
+
- Fixed file creation issues: The CLI now properly handles creating files with content
|
|
161
|
+
- Enhanced tool pattern matching: Added support for more formats that Gemini might use
|
|
162
|
+
- Improved edit tool handling: Better handling of missing arguments when creating files
|
|
163
|
+
- Added special case for natural language edit commands (e.g., "edit filename with content: ...")
|
|
164
|
+
|
|
165
|
+
### Recent Changes in v0.1.15
|
|
166
|
+
|
|
167
|
+
- Fixed tool execution issues: The CLI now properly processes tool calls and executes Bash commands correctly
|
|
168
|
+
- Fixed argument parsing for Bash tool: Commands are now passed as a single argument to avoid parsing issues
|
|
169
|
+
- Improved error handling in tools: Better handling of failures and timeouts
|
|
170
|
+
- Updated model name throughout the codebase to use `gemini-1.5-pro` consistently
|
|
171
|
+
|
|
172
|
+
### Known Issues
|
|
173
|
+
|
|
174
|
+
- If you created a config file with earlier versions, you may need to delete it to get the correct defaults:
|
|
175
|
+
```bash
|
|
176
|
+
rm -rf ~/.config/gemini-code
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
MIT
|
code_lm-0.1.0/README.md
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Gemini Code
|
|
2
|
+
|
|
3
|
+
A powerful AI coding assistant for your terminal, powered by Gemini 2.5 Pro with support for other LLM models.
|
|
4
|
+
More information [here](https://blossom-tarsier-434.notion.site/Gemini-Code-1c6c13716ff180db86a0c7f4b2da13ab?pvs=4)
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
- Interactive chat sessions in your terminal
|
|
9
|
+
- Multiple model support (Gemini 2.5 Pro, Gemini 1.5 Pro, and more)
|
|
10
|
+
- Basic history management (prevents excessive length)
|
|
11
|
+
- Markdown rendering in the terminal
|
|
12
|
+
- Automatic tool usage by the assistant:
|
|
13
|
+
- File operations (view, edit, list, grep, glob)
|
|
14
|
+
- Directory operations (ls, tree, create_directory)
|
|
15
|
+
- System commands (bash)
|
|
16
|
+
- Quality checks (linting, formatting)
|
|
17
|
+
- Test running capabilities (pytest, etc.)
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
### Method 1: Install from PyPI (Recommended)
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Install directly from PyPI
|
|
25
|
+
pip install gemini-code
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Method 2: Install from Source
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Clone the repository
|
|
32
|
+
git clone https://github.com/raizamartin/gemini-code.git
|
|
33
|
+
cd gemini-code
|
|
34
|
+
|
|
35
|
+
# Install the package
|
|
36
|
+
pip install -e .
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Setup
|
|
40
|
+
|
|
41
|
+
Before using Gemini CLI, you need to set up your API keys:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Set up Google API key for Gemini models
|
|
45
|
+
gemini setup YOUR_GOOGLE_API_KEY
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Start an interactive session with the default model
|
|
52
|
+
gemini
|
|
53
|
+
|
|
54
|
+
# Start a session with a specific model
|
|
55
|
+
gemini --model models/gemini-2.5-pro-exp-03-25
|
|
56
|
+
|
|
57
|
+
# Set default model
|
|
58
|
+
gemini set-default-model models/gemini-2.5-pro-exp-03-25
|
|
59
|
+
|
|
60
|
+
# List all available models
|
|
61
|
+
gemini list-models
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Interactive Commands
|
|
65
|
+
|
|
66
|
+
During an interactive session, you can use these commands:
|
|
67
|
+
|
|
68
|
+
- `/exit` - Exit the chat session
|
|
69
|
+
- `/help` - Display help information
|
|
70
|
+
|
|
71
|
+
## How It Works
|
|
72
|
+
|
|
73
|
+
### Tool Usage
|
|
74
|
+
|
|
75
|
+
Unlike direct command-line tools, the Gemini CLI's tools are used automatically by the assistant to help answer your questions. For example:
|
|
76
|
+
|
|
77
|
+
1. You ask: "What files are in the current directory?"
|
|
78
|
+
2. The assistant uses the `ls` tool behind the scenes
|
|
79
|
+
3. The assistant provides you with a formatted response
|
|
80
|
+
|
|
81
|
+
This approach makes the interaction more natural and similar to how Claude Code works.
|
|
82
|
+
|
|
83
|
+
## Development
|
|
84
|
+
|
|
85
|
+
This project is under active development. More models and features will be added soon!
|
|
86
|
+
|
|
87
|
+
### Recent Changes in v0.1.69
|
|
88
|
+
|
|
89
|
+
- Added test_runner tool to execute automated tests (e.g., pytest)
|
|
90
|
+
- Fixed syntax issues in the tool definitions
|
|
91
|
+
- Improved error handling in tool execution
|
|
92
|
+
- Updated status displays during tool execution with more informative messages
|
|
93
|
+
- Added additional utility tools (directory_tools, quality_tools, task_complete_tool, summarizer_tool)
|
|
94
|
+
|
|
95
|
+
### Recent Changes in v0.1.21
|
|
96
|
+
|
|
97
|
+
- Implemented native Gemini function calling for much more reliable tool usage
|
|
98
|
+
- Rewritten the tool execution system to use Gemini's built-in function calling capability
|
|
99
|
+
- Enhanced the edit tool to better handle file creation and content updating
|
|
100
|
+
- Updated system prompt to encourage function calls instead of text-based tool usage
|
|
101
|
+
- Fixed issues with Gemini not actively creating or modifying files
|
|
102
|
+
- Simplified the BaseTool interface to support both legacy and function call modes
|
|
103
|
+
|
|
104
|
+
### Recent Changes in v0.1.20
|
|
105
|
+
|
|
106
|
+
- Fixed error with Flask version check in example code
|
|
107
|
+
- Improved error handling in system prompt example code
|
|
108
|
+
|
|
109
|
+
### Recent Changes in v0.1.19
|
|
110
|
+
|
|
111
|
+
- Improved system prompt to encourage more active tool usage
|
|
112
|
+
- Added thinking/planning phase to help Gemini reason about solutions
|
|
113
|
+
- Enhanced response format to prioritize creating and modifying files over printing code
|
|
114
|
+
- Filtered out thinking stages from final output to keep responses clean
|
|
115
|
+
- Made Gemini more proactive as a coding partner, not just an advisor
|
|
116
|
+
|
|
117
|
+
### Recent Changes in v0.1.18
|
|
118
|
+
|
|
119
|
+
- Updated default model to Gemini 2.5 Pro Experimental (models/gemini-2.5-pro-exp-03-25)
|
|
120
|
+
- Updated system prompts to reference Gemini 2.5 Pro
|
|
121
|
+
- Improved model usage and documentation
|
|
122
|
+
|
|
123
|
+
### Recent Changes in v0.1.17
|
|
124
|
+
|
|
125
|
+
- Added `list-models` command to show all available Gemini models
|
|
126
|
+
- Improved error handling for models that don't exist or require permission
|
|
127
|
+
- Added model initialization test to verify model availability
|
|
128
|
+
- Updated help documentation with new commands
|
|
129
|
+
|
|
130
|
+
### Recent Changes in v0.1.16
|
|
131
|
+
|
|
132
|
+
- Fixed file creation issues: The CLI now properly handles creating files with content
|
|
133
|
+
- Enhanced tool pattern matching: Added support for more formats that Gemini might use
|
|
134
|
+
- Improved edit tool handling: Better handling of missing arguments when creating files
|
|
135
|
+
- Added special case for natural language edit commands (e.g., "edit filename with content: ...")
|
|
136
|
+
|
|
137
|
+
### Recent Changes in v0.1.15
|
|
138
|
+
|
|
139
|
+
- Fixed tool execution issues: The CLI now properly processes tool calls and executes Bash commands correctly
|
|
140
|
+
- Fixed argument parsing for Bash tool: Commands are now passed as a single argument to avoid parsing issues
|
|
141
|
+
- Improved error handling in tools: Better handling of failures and timeouts
|
|
142
|
+
- Updated model name throughout the codebase to use `gemini-1.5-pro` consistently
|
|
143
|
+
|
|
144
|
+
### Known Issues
|
|
145
|
+
|
|
146
|
+
- If you created a config file with earlier versions, you may need to delete it to get the correct defaults:
|
|
147
|
+
```bash
|
|
148
|
+
rm -rf ~/.config/gemini-code
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## License
|
|
152
|
+
|
|
153
|
+
MIT
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "code-lm" # Updated project name
|
|
7
|
+
version = "0.1.0" # Updated version
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Panagiotis897", email="your.email@example.com" }
|
|
10
|
+
]
|
|
11
|
+
description = "An AI coding assistant CLI using OpenRouter and various LLM models."
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
license = { file = "LICENSE" }
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Development Status :: 3 - Alpha",
|
|
19
|
+
"Environment :: Console",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"Topic :: Software Development",
|
|
22
|
+
"Topic :: Utilities",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"click>=8.0", # For CLI framework
|
|
26
|
+
"rich>=13.0", # For nice terminal output
|
|
27
|
+
"requests>=2.25.0", # For web requests
|
|
28
|
+
"PyYAML>=6.0", # For config handling
|
|
29
|
+
"tiktoken>=0.6.0", # Added for tokenization
|
|
30
|
+
"questionary>=2.0.0", # Added for interactive prompts
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
"Homepage" = "https://github.com/Panagiotis897/lm-code" # Updated URL
|
|
35
|
+
"Bug Tracker" = "https://github.com/Panagiotis897/lm-code/issues" # Updated URL
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
lmcode = "gemini_cli.main:cli" # Updated CLI command
|
|
39
|
+
|
|
40
|
+
[tool.setuptools.packages.find]
|
|
41
|
+
where = ["src"] # look for packages in src/
|
code_lm-0.1.0/setup.cfg
ADDED
code_lm-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="code-lm", # The name of your package
|
|
5
|
+
version="0.1.0", # Package version
|
|
6
|
+
description="A CLI for interacting with various LLM models using OpenRouter and other APIs.",
|
|
7
|
+
long_description=open("README.md").read(), # Read from README.md
|
|
8
|
+
long_description_content_type="text/markdown", # Markdown format
|
|
9
|
+
author="Panagiotis897",
|
|
10
|
+
author_email="your.email@example.com", # Replace with your email
|
|
11
|
+
url="https://github.com/Panagiotis897/lm-code", # Repository URL
|
|
12
|
+
license="MIT", # License type
|
|
13
|
+
packages=find_packages(where="src"),
|
|
14
|
+
package_dir={"": "src"}, # Source directory for the package
|
|
15
|
+
include_package_data=True, # Include files listed in MANIFEST.in
|
|
16
|
+
entry_points={
|
|
17
|
+
"console_scripts": [
|
|
18
|
+
"lmcode=gemini_cli.main:cli", # Maps 'lmcode' command to the 'cli' function in main.py
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
install_requires=[
|
|
22
|
+
"click", # Add required dependencies
|
|
23
|
+
"rich",
|
|
24
|
+
"requests",
|
|
25
|
+
"pyyaml",
|
|
26
|
+
"questionary",
|
|
27
|
+
],
|
|
28
|
+
python_requires=">=3.7",
|
|
29
|
+
classifiers=[
|
|
30
|
+
"Development Status :: 3 - Alpha",
|
|
31
|
+
"Intended Audience :: Developers",
|
|
32
|
+
"License :: OSI Approved :: MIT License",
|
|
33
|
+
"Programming Language :: Python :: 3",
|
|
34
|
+
"Programming Language :: Python :: 3.7",
|
|
35
|
+
"Programming Language :: Python :: 3.8",
|
|
36
|
+
"Programming Language :: Python :: 3.9",
|
|
37
|
+
"Programming Language :: Python :: 3.10",
|
|
38
|
+
],
|
|
39
|
+
)
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: code-lm
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: An AI coding assistant CLI using OpenRouter and various LLM models.
|
|
5
|
+
Home-page: https://github.com/Panagiotis897/lm-code
|
|
6
|
+
Author: Panagiotis897
|
|
7
|
+
Author-email: Panagiotis897 <your.email@example.com>
|
|
8
|
+
Project-URL: Homepage, https://github.com/Panagiotis897/lm-code
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/Panagiotis897/lm-code/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Software Development
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Requires-Python: >=3.7
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
Requires-Dist: click>=8.0
|
|
20
|
+
Requires-Dist: rich>=13.0
|
|
21
|
+
Requires-Dist: requests>=2.25.0
|
|
22
|
+
Requires-Dist: PyYAML>=6.0
|
|
23
|
+
Requires-Dist: tiktoken>=0.6.0
|
|
24
|
+
Requires-Dist: questionary>=2.0.0
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: home-page
|
|
27
|
+
Dynamic: requires-python
|
|
28
|
+
|
|
29
|
+
# Gemini Code
|
|
30
|
+
|
|
31
|
+
A powerful AI coding assistant for your terminal, powered by Gemini 2.5 Pro with support for other LLM models.
|
|
32
|
+
More information [here](https://blossom-tarsier-434.notion.site/Gemini-Code-1c6c13716ff180db86a0c7f4b2da13ab?pvs=4)
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
- Interactive chat sessions in your terminal
|
|
37
|
+
- Multiple model support (Gemini 2.5 Pro, Gemini 1.5 Pro, and more)
|
|
38
|
+
- Basic history management (prevents excessive length)
|
|
39
|
+
- Markdown rendering in the terminal
|
|
40
|
+
- Automatic tool usage by the assistant:
|
|
41
|
+
- File operations (view, edit, list, grep, glob)
|
|
42
|
+
- Directory operations (ls, tree, create_directory)
|
|
43
|
+
- System commands (bash)
|
|
44
|
+
- Quality checks (linting, formatting)
|
|
45
|
+
- Test running capabilities (pytest, etc.)
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
### Method 1: Install from PyPI (Recommended)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Install directly from PyPI
|
|
53
|
+
pip install gemini-code
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Method 2: Install from Source
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Clone the repository
|
|
60
|
+
git clone https://github.com/raizamartin/gemini-code.git
|
|
61
|
+
cd gemini-code
|
|
62
|
+
|
|
63
|
+
# Install the package
|
|
64
|
+
pip install -e .
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Setup
|
|
68
|
+
|
|
69
|
+
Before using Gemini CLI, you need to set up your API keys:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Set up Google API key for Gemini models
|
|
73
|
+
gemini setup YOUR_GOOGLE_API_KEY
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Start an interactive session with the default model
|
|
80
|
+
gemini
|
|
81
|
+
|
|
82
|
+
# Start a session with a specific model
|
|
83
|
+
gemini --model models/gemini-2.5-pro-exp-03-25
|
|
84
|
+
|
|
85
|
+
# Set default model
|
|
86
|
+
gemini set-default-model models/gemini-2.5-pro-exp-03-25
|
|
87
|
+
|
|
88
|
+
# List all available models
|
|
89
|
+
gemini list-models
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Interactive Commands
|
|
93
|
+
|
|
94
|
+
During an interactive session, you can use these commands:
|
|
95
|
+
|
|
96
|
+
- `/exit` - Exit the chat session
|
|
97
|
+
- `/help` - Display help information
|
|
98
|
+
|
|
99
|
+
## How It Works
|
|
100
|
+
|
|
101
|
+
### Tool Usage
|
|
102
|
+
|
|
103
|
+
Unlike direct command-line tools, the Gemini CLI's tools are used automatically by the assistant to help answer your questions. For example:
|
|
104
|
+
|
|
105
|
+
1. You ask: "What files are in the current directory?"
|
|
106
|
+
2. The assistant uses the `ls` tool behind the scenes
|
|
107
|
+
3. The assistant provides you with a formatted response
|
|
108
|
+
|
|
109
|
+
This approach makes the interaction more natural and similar to how Claude Code works.
|
|
110
|
+
|
|
111
|
+
## Development
|
|
112
|
+
|
|
113
|
+
This project is under active development. More models and features will be added soon!
|
|
114
|
+
|
|
115
|
+
### Recent Changes in v0.1.69
|
|
116
|
+
|
|
117
|
+
- Added test_runner tool to execute automated tests (e.g., pytest)
|
|
118
|
+
- Fixed syntax issues in the tool definitions
|
|
119
|
+
- Improved error handling in tool execution
|
|
120
|
+
- Updated status displays during tool execution with more informative messages
|
|
121
|
+
- Added additional utility tools (directory_tools, quality_tools, task_complete_tool, summarizer_tool)
|
|
122
|
+
|
|
123
|
+
### Recent Changes in v0.1.21
|
|
124
|
+
|
|
125
|
+
- Implemented native Gemini function calling for much more reliable tool usage
|
|
126
|
+
- Rewritten the tool execution system to use Gemini's built-in function calling capability
|
|
127
|
+
- Enhanced the edit tool to better handle file creation and content updating
|
|
128
|
+
- Updated system prompt to encourage function calls instead of text-based tool usage
|
|
129
|
+
- Fixed issues with Gemini not actively creating or modifying files
|
|
130
|
+
- Simplified the BaseTool interface to support both legacy and function call modes
|
|
131
|
+
|
|
132
|
+
### Recent Changes in v0.1.20
|
|
133
|
+
|
|
134
|
+
- Fixed error with Flask version check in example code
|
|
135
|
+
- Improved error handling in system prompt example code
|
|
136
|
+
|
|
137
|
+
### Recent Changes in v0.1.19
|
|
138
|
+
|
|
139
|
+
- Improved system prompt to encourage more active tool usage
|
|
140
|
+
- Added thinking/planning phase to help Gemini reason about solutions
|
|
141
|
+
- Enhanced response format to prioritize creating and modifying files over printing code
|
|
142
|
+
- Filtered out thinking stages from final output to keep responses clean
|
|
143
|
+
- Made Gemini more proactive as a coding partner, not just an advisor
|
|
144
|
+
|
|
145
|
+
### Recent Changes in v0.1.18
|
|
146
|
+
|
|
147
|
+
- Updated default model to Gemini 2.5 Pro Experimental (models/gemini-2.5-pro-exp-03-25)
|
|
148
|
+
- Updated system prompts to reference Gemini 2.5 Pro
|
|
149
|
+
- Improved model usage and documentation
|
|
150
|
+
|
|
151
|
+
### Recent Changes in v0.1.17
|
|
152
|
+
|
|
153
|
+
- Added `list-models` command to show all available Gemini models
|
|
154
|
+
- Improved error handling for models that don't exist or require permission
|
|
155
|
+
- Added model initialization test to verify model availability
|
|
156
|
+
- Updated help documentation with new commands
|
|
157
|
+
|
|
158
|
+
### Recent Changes in v0.1.16
|
|
159
|
+
|
|
160
|
+
- Fixed file creation issues: The CLI now properly handles creating files with content
|
|
161
|
+
- Enhanced tool pattern matching: Added support for more formats that Gemini might use
|
|
162
|
+
- Improved edit tool handling: Better handling of missing arguments when creating files
|
|
163
|
+
- Added special case for natural language edit commands (e.g., "edit filename with content: ...")
|
|
164
|
+
|
|
165
|
+
### Recent Changes in v0.1.15
|
|
166
|
+
|
|
167
|
+
- Fixed tool execution issues: The CLI now properly processes tool calls and executes Bash commands correctly
|
|
168
|
+
- Fixed argument parsing for Bash tool: Commands are now passed as a single argument to avoid parsing issues
|
|
169
|
+
- Improved error handling in tools: Better handling of failures and timeouts
|
|
170
|
+
- Updated model name throughout the codebase to use `gemini-1.5-pro` consistently
|
|
171
|
+
|
|
172
|
+
### Known Issues
|
|
173
|
+
|
|
174
|
+
- If you created a config file with earlier versions, you may need to delete it to get the correct defaults:
|
|
175
|
+
```bash
|
|
176
|
+
rm -rf ~/.config/gemini-code
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
MIT
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.py
|
|
5
|
+
src/code_lm.egg-info/PKG-INFO
|
|
6
|
+
src/code_lm.egg-info/SOURCES.txt
|
|
7
|
+
src/code_lm.egg-info/dependency_links.txt
|
|
8
|
+
src/code_lm.egg-info/entry_points.txt
|
|
9
|
+
src/code_lm.egg-info/requires.txt
|
|
10
|
+
src/code_lm.egg-info/top_level.txt
|
|
11
|
+
src/gemini_cli/__init__.py
|
|
12
|
+
src/gemini_cli/config.py
|
|
13
|
+
src/gemini_cli/main.py
|
|
14
|
+
src/gemini_cli/utils.py
|
|
15
|
+
src/gemini_cli/models/__init__.py
|
|
16
|
+
src/gemini_cli/models/gemini.py
|
|
17
|
+
src/gemini_cli/models/openrouter.py
|
|
18
|
+
src/gemini_cli/tools/__init__.py
|
|
19
|
+
src/gemini_cli/tools/base.py
|
|
20
|
+
src/gemini_cli/tools/directory_tools.py
|
|
21
|
+
src/gemini_cli/tools/file_tools.py
|
|
22
|
+
src/gemini_cli/tools/quality_tools.py
|
|
23
|
+
src/gemini_cli/tools/summarizer_tool.py
|
|
24
|
+
src/gemini_cli/tools/system_tools.py
|
|
25
|
+
src/gemini_cli/tools/task_complete_tool.py
|
|
26
|
+
src/gemini_cli/tools/test_runner.py
|
|
27
|
+
src/gemini_cli/tools/tree_tool.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gemini_cli
|