blitzcoder 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.
- blitzcoder-1.0.0/LICENSE +21 -0
- blitzcoder-1.0.0/MANIFEST.in +18 -0
- blitzcoder-1.0.0/PKG-INFO +228 -0
- blitzcoder-1.0.0/README.md +176 -0
- blitzcoder-1.0.0/build_and_publish.py +107 -0
- blitzcoder-1.0.0/pyproject.toml +86 -0
- blitzcoder-1.0.0/requirements.txt +187 -0
- blitzcoder-1.0.0/setup.cfg +4 -0
- blitzcoder-1.0.0/setup.py +62 -0
- blitzcoder-1.0.0/src/blitzcoder/__init__.py +24 -0
- blitzcoder-1.0.0/src/blitzcoder/cli/__init__.py +17 -0
- blitzcoder-1.0.0/src/blitzcoder/cli/cli_coder.py +268 -0
- blitzcoder-1.0.0/src/blitzcoder.egg-info/PKG-INFO +228 -0
- blitzcoder-1.0.0/src/blitzcoder.egg-info/SOURCES.txt +18 -0
- blitzcoder-1.0.0/src/blitzcoder.egg-info/dependency_links.txt +1 -0
- blitzcoder-1.0.0/src/blitzcoder.egg-info/entry_points.txt +2 -0
- blitzcoder-1.0.0/src/blitzcoder.egg-info/requires.txt +20 -0
- blitzcoder-1.0.0/src/blitzcoder.egg-info/top_level.txt +2 -0
- blitzcoder-1.0.0/src/main/__init__.py +9 -0
- blitzcoder-1.0.0/src/main/graphapi.py +1416 -0
blitzcoder-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 BlitzCoder Team
|
|
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,18 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include requirements.txt
|
|
4
|
+
include pyproject.toml
|
|
5
|
+
include setup.py
|
|
6
|
+
include build_and_publish.py
|
|
7
|
+
|
|
8
|
+
recursive-include blitz_cli/config/templates *
|
|
9
|
+
recursive-include blitz_cli/scripts *
|
|
10
|
+
|
|
11
|
+
global-exclude *.pyc
|
|
12
|
+
global-exclude *.pyo
|
|
13
|
+
global-exclude __pycache__
|
|
14
|
+
global-exclude .git*
|
|
15
|
+
global-exclude .DS_Store
|
|
16
|
+
global-exclude *.egg-info
|
|
17
|
+
global-exclude build/
|
|
18
|
+
global-exclude dist/
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: blitzcoder
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: AI-powered development assistant for code generation, refactoring, and project management
|
|
5
|
+
Home-page: https://github.com/Raghu6798/Blitz_Coder
|
|
6
|
+
Author: BlitzCoder Team
|
|
7
|
+
Author-email: BlitzCoder Team <raghunandanerukulla@gmail.com>
|
|
8
|
+
Maintainer-email: Raghu Nandan Erukulla <raghunandanerukulla@gmail.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
Project-URL: Homepage, https://github.com/Raghu6798/BlitzCoder
|
|
11
|
+
Project-URL: Repository, https://github.com/Raghu6798/BlitzCoder
|
|
12
|
+
Project-URL: Documentation, https://github.com/Raghu6798/BlitzCoder#readme
|
|
13
|
+
Project-URL: Bug Tracker, https://github.com/Raghu6798/BlitzCoder/issues
|
|
14
|
+
Keywords: ai,code-generation,development,assistant,cli
|
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: OS Independent
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
26
|
+
Requires-Python: >=3.9
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: python-dotenv>=0.0.1
|
|
30
|
+
Requires-Dist: langgraph>=0.4.9
|
|
31
|
+
Requires-Dist: langchain-groq>=0.3.4
|
|
32
|
+
Requires-Dist: langchain-sambanova>=0.1.5
|
|
33
|
+
Requires-Dist: langchain>=0.3.26
|
|
34
|
+
Requires-Dist: loguru>=0.7.3
|
|
35
|
+
Requires-Dist: langchain-google-genai>=2.1.5
|
|
36
|
+
Requires-Dist: mem0ai>=0.1.111
|
|
37
|
+
Requires-Dist: click>=8.1.8
|
|
38
|
+
Requires-Dist: click-help-colors>=0.9.4
|
|
39
|
+
Requires-Dist: rich>=14.0.0
|
|
40
|
+
Requires-Dist: langfuse>=3.0.5
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
44
|
+
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
45
|
+
Requires-Dist: isort>=5.0.0; extra == "dev"
|
|
46
|
+
Requires-Dist: flake8>=5.0.0; extra == "dev"
|
|
47
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
48
|
+
Dynamic: author
|
|
49
|
+
Dynamic: home-page
|
|
50
|
+
Dynamic: license-file
|
|
51
|
+
Dynamic: requires-python
|
|
52
|
+
|
|
53
|
+
# BlitzCoder
|
|
54
|
+
|
|
55
|
+
ā” **AI-Powered Development Assistant** - A comprehensive CLI tool for code generation, refactoring, and project management.
|
|
56
|
+
|
|
57
|
+
## Features
|
|
58
|
+
|
|
59
|
+
- š¤ **AI-Powered Code Generation** - Generate code using Google's Gemini model
|
|
60
|
+
- š§ **Code Refactoring** - Automatically refactor and improve existing code
|
|
61
|
+
- š **Project Scaffolding** - Create complete project structures with architecture plans
|
|
62
|
+
- š§ **Memory System** - Remember previous conversations and context
|
|
63
|
+
- š ļø **Development Tools** - File inspection, execution, and management tools
|
|
64
|
+
- š **Code Analysis** - Explain and analyze code functionality
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
|
|
68
|
+
### Option 1: Install from Source (Recommended)
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Clone the repository
|
|
72
|
+
git clone https://github.com/Raghu6798/Blitz_Coder.git
|
|
73
|
+
cd BlitzCoder/blitz_cli
|
|
74
|
+
|
|
75
|
+
# Install in development mode
|
|
76
|
+
python install.py
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Option 2: Manual Installation
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cd blitz_cli
|
|
83
|
+
pip install -e .
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Option 3: Direct Script Execution
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Windows
|
|
90
|
+
python scripts/blitzcoder.bat
|
|
91
|
+
|
|
92
|
+
# Linux/Mac
|
|
93
|
+
python scripts/blitzcoder
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Quick Start
|
|
97
|
+
|
|
98
|
+
### 1. Set up your API Keys
|
|
99
|
+
|
|
100
|
+
You'll need a Google API key for the Gemini model:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Set environment variable
|
|
104
|
+
export GOOGLE_API_KEY="your-api-key-here"
|
|
105
|
+
|
|
106
|
+
# Or on Windows
|
|
107
|
+
set GOOGLE_API_KEY=your-api-key-here
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 2. Start Interactive Chat
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
blitzcoder chat
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 3. Search Memories
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
blitzcoder search-memories --query "your search term"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Usage Examples
|
|
123
|
+
|
|
124
|
+
### Interactive Chat Mode
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
blitzcoder chat
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
This starts an interactive session where you can:
|
|
131
|
+
- Ask questions about code
|
|
132
|
+
- Request code generation
|
|
133
|
+
- Get help with refactoring
|
|
134
|
+
- Search through previous conversations
|
|
135
|
+
|
|
136
|
+
### Search Previous Conversations
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
blitzcoder search-memories --query "React component"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Use with API Key Parameter
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
blitzcoder chat --google-api-key "your-api-key"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Available Commands
|
|
149
|
+
|
|
150
|
+
| Command | Description |
|
|
151
|
+
|---------|-------------|
|
|
152
|
+
| `chat` | Start interactive AI chat session |
|
|
153
|
+
| `search-memories` | Search through conversation history |
|
|
154
|
+
|
|
155
|
+
## Development
|
|
156
|
+
|
|
157
|
+
### Project Structure
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
blitz_cli/
|
|
161
|
+
āāā src/
|
|
162
|
+
ā āāā blitzcoder/
|
|
163
|
+
ā āāā cli/
|
|
164
|
+
ā ā āāā __init__.py
|
|
165
|
+
ā ā āāā cli_coder.py
|
|
166
|
+
ā āāā __init__.py
|
|
167
|
+
āāā config/
|
|
168
|
+
ā āāā templates/
|
|
169
|
+
āāā scripts/
|
|
170
|
+
ā āāā blitzcoder
|
|
171
|
+
ā āāā blitzcoder.bat
|
|
172
|
+
āāā setup.py
|
|
173
|
+
āāā pyproject.toml
|
|
174
|
+
āāā install.py
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Running Tests
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Install development dependencies
|
|
181
|
+
pip install -e ".[dev]"
|
|
182
|
+
|
|
183
|
+
# Run tests
|
|
184
|
+
pytest
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Code Formatting
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Format code
|
|
191
|
+
black src/
|
|
192
|
+
isort src/
|
|
193
|
+
|
|
194
|
+
# Type checking
|
|
195
|
+
mypy src/
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Configuration
|
|
199
|
+
|
|
200
|
+
The package uses environment variables for configuration:
|
|
201
|
+
|
|
202
|
+
- `GOOGLE_API_KEY` - Required for Gemini model access
|
|
203
|
+
- `GROQ_API_KEY` - Optional for additional models
|
|
204
|
+
- `NOVITA_API_KEY` - Optional for embeddings
|
|
205
|
+
|
|
206
|
+
## Contributing
|
|
207
|
+
|
|
208
|
+
1. Fork the repository
|
|
209
|
+
2. Create a feature branch
|
|
210
|
+
3. Make your changes
|
|
211
|
+
4. Add tests if applicable
|
|
212
|
+
5. Submit a pull request
|
|
213
|
+
|
|
214
|
+
## License
|
|
215
|
+
|
|
216
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
217
|
+
|
|
218
|
+
## Support
|
|
219
|
+
|
|
220
|
+
- š§ Email: raghunandanerukulla@gmail.com
|
|
221
|
+
- š Issues: [GitHub Issues](https://github.com/Raghu6798/BlitzCoder/issues)
|
|
222
|
+
- š Documentation: [GitHub README](https://github.com/Raghu6798/BlitzCoder#readme)
|
|
223
|
+
|
|
224
|
+
## Acknowledgments
|
|
225
|
+
|
|
226
|
+
- Built with [LangGraph](https://github.com/langchain-ai/langgraph)
|
|
227
|
+
- Powered by [Google Gemini](https://ai.google.dev/)
|
|
228
|
+
- Enhanced with [Rich](https://github.com/Textualize/rich) for beautiful CLI output
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# BlitzCoder
|
|
2
|
+
|
|
3
|
+
ā” **AI-Powered Development Assistant** - A comprehensive CLI tool for code generation, refactoring, and project management.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- š¤ **AI-Powered Code Generation** - Generate code using Google's Gemini model
|
|
8
|
+
- š§ **Code Refactoring** - Automatically refactor and improve existing code
|
|
9
|
+
- š **Project Scaffolding** - Create complete project structures with architecture plans
|
|
10
|
+
- š§ **Memory System** - Remember previous conversations and context
|
|
11
|
+
- š ļø **Development Tools** - File inspection, execution, and management tools
|
|
12
|
+
- š **Code Analysis** - Explain and analyze code functionality
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
### Option 1: Install from Source (Recommended)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Clone the repository
|
|
20
|
+
git clone https://github.com/Raghu6798/Blitz_Coder.git
|
|
21
|
+
cd BlitzCoder/blitz_cli
|
|
22
|
+
|
|
23
|
+
# Install in development mode
|
|
24
|
+
python install.py
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Option 2: Manual Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cd blitz_cli
|
|
31
|
+
pip install -e .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Option 3: Direct Script Execution
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Windows
|
|
38
|
+
python scripts/blitzcoder.bat
|
|
39
|
+
|
|
40
|
+
# Linux/Mac
|
|
41
|
+
python scripts/blitzcoder
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick Start
|
|
45
|
+
|
|
46
|
+
### 1. Set up your API Keys
|
|
47
|
+
|
|
48
|
+
You'll need a Google API key for the Gemini model:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Set environment variable
|
|
52
|
+
export GOOGLE_API_KEY="your-api-key-here"
|
|
53
|
+
|
|
54
|
+
# Or on Windows
|
|
55
|
+
set GOOGLE_API_KEY=your-api-key-here
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2. Start Interactive Chat
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
blitzcoder chat
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Search Memories
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
blitzcoder search-memories --query "your search term"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Usage Examples
|
|
71
|
+
|
|
72
|
+
### Interactive Chat Mode
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
blitzcoder chat
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This starts an interactive session where you can:
|
|
79
|
+
- Ask questions about code
|
|
80
|
+
- Request code generation
|
|
81
|
+
- Get help with refactoring
|
|
82
|
+
- Search through previous conversations
|
|
83
|
+
|
|
84
|
+
### Search Previous Conversations
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
blitzcoder search-memories --query "React component"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Use with API Key Parameter
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
blitzcoder chat --google-api-key "your-api-key"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Available Commands
|
|
97
|
+
|
|
98
|
+
| Command | Description |
|
|
99
|
+
|---------|-------------|
|
|
100
|
+
| `chat` | Start interactive AI chat session |
|
|
101
|
+
| `search-memories` | Search through conversation history |
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
### Project Structure
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
blitz_cli/
|
|
109
|
+
āāā src/
|
|
110
|
+
ā āāā blitzcoder/
|
|
111
|
+
ā āāā cli/
|
|
112
|
+
ā ā āāā __init__.py
|
|
113
|
+
ā ā āāā cli_coder.py
|
|
114
|
+
ā āāā __init__.py
|
|
115
|
+
āāā config/
|
|
116
|
+
ā āāā templates/
|
|
117
|
+
āāā scripts/
|
|
118
|
+
ā āāā blitzcoder
|
|
119
|
+
ā āāā blitzcoder.bat
|
|
120
|
+
āāā setup.py
|
|
121
|
+
āāā pyproject.toml
|
|
122
|
+
āāā install.py
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Running Tests
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Install development dependencies
|
|
129
|
+
pip install -e ".[dev]"
|
|
130
|
+
|
|
131
|
+
# Run tests
|
|
132
|
+
pytest
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Code Formatting
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Format code
|
|
139
|
+
black src/
|
|
140
|
+
isort src/
|
|
141
|
+
|
|
142
|
+
# Type checking
|
|
143
|
+
mypy src/
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Configuration
|
|
147
|
+
|
|
148
|
+
The package uses environment variables for configuration:
|
|
149
|
+
|
|
150
|
+
- `GOOGLE_API_KEY` - Required for Gemini model access
|
|
151
|
+
- `GROQ_API_KEY` - Optional for additional models
|
|
152
|
+
- `NOVITA_API_KEY` - Optional for embeddings
|
|
153
|
+
|
|
154
|
+
## Contributing
|
|
155
|
+
|
|
156
|
+
1. Fork the repository
|
|
157
|
+
2. Create a feature branch
|
|
158
|
+
3. Make your changes
|
|
159
|
+
4. Add tests if applicable
|
|
160
|
+
5. Submit a pull request
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
165
|
+
|
|
166
|
+
## Support
|
|
167
|
+
|
|
168
|
+
- š§ Email: raghunandanerukulla@gmail.com
|
|
169
|
+
- š Issues: [GitHub Issues](https://github.com/Raghu6798/BlitzCoder/issues)
|
|
170
|
+
- š Documentation: [GitHub README](https://github.com/Raghu6798/BlitzCoder#readme)
|
|
171
|
+
|
|
172
|
+
## Acknowledgments
|
|
173
|
+
|
|
174
|
+
- Built with [LangGraph](https://github.com/langchain-ai/langgraph)
|
|
175
|
+
- Powered by [Google Gemini](https://ai.google.dev/)
|
|
176
|
+
- Enhanced with [Rich](https://github.com/Textualize/rich) for beautiful CLI output
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Build and Publish Script for BlitzCoder
|
|
4
|
+
|
|
5
|
+
This script helps build and publish the BlitzCoder package to PyPI.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import subprocess
|
|
9
|
+
import sys
|
|
10
|
+
import os
|
|
11
|
+
import shutil
|
|
12
|
+
|
|
13
|
+
def run_command(command, description):
|
|
14
|
+
"""Run a command and handle errors"""
|
|
15
|
+
print(f"š {description}...")
|
|
16
|
+
try:
|
|
17
|
+
result = subprocess.run(command, shell=True, check=True, capture_output=True, text=True)
|
|
18
|
+
print(f"ā
{description} completed successfully")
|
|
19
|
+
return result.stdout
|
|
20
|
+
except subprocess.CalledProcessError as e:
|
|
21
|
+
print(f"ā {description} failed: {e}")
|
|
22
|
+
print(f"Error output: {e.stderr}")
|
|
23
|
+
return None
|
|
24
|
+
|
|
25
|
+
def clean_build():
|
|
26
|
+
"""Clean previous build artifacts"""
|
|
27
|
+
print("š§¹ Cleaning previous build artifacts...")
|
|
28
|
+
dirs_to_clean = ["build", "dist", "*.egg-info"]
|
|
29
|
+
for dir_name in dirs_to_clean:
|
|
30
|
+
if os.path.exists(dir_name):
|
|
31
|
+
shutil.rmtree(dir_name)
|
|
32
|
+
print(f" Removed {dir_name}")
|
|
33
|
+
|
|
34
|
+
def build_package():
|
|
35
|
+
"""Build the package"""
|
|
36
|
+
return run_command("python -m build", "Building package")
|
|
37
|
+
|
|
38
|
+
def check_package():
|
|
39
|
+
"""Check the package for issues"""
|
|
40
|
+
return run_command("python -m twine check dist/*", "Checking package")
|
|
41
|
+
|
|
42
|
+
def upload_to_testpypi():
|
|
43
|
+
"""Upload to TestPyPI"""
|
|
44
|
+
return run_command("python -m twine upload --repository testpypi dist/*", "Uploading to TestPyPI")
|
|
45
|
+
|
|
46
|
+
def upload_to_pypi():
|
|
47
|
+
"""Upload to PyPI"""
|
|
48
|
+
return run_command("python -m twine upload dist/*", "Uploading to PyPI")
|
|
49
|
+
|
|
50
|
+
def main():
|
|
51
|
+
print("š BlitzCoder PyPI Publishing Script")
|
|
52
|
+
print("=" * 50)
|
|
53
|
+
|
|
54
|
+
# Check if required tools are installed
|
|
55
|
+
try:
|
|
56
|
+
import build
|
|
57
|
+
import twine
|
|
58
|
+
except ImportError:
|
|
59
|
+
print("ā Required packages not found. Installing...")
|
|
60
|
+
run_command("pip install build twine", "Installing build tools")
|
|
61
|
+
|
|
62
|
+
# Clean previous builds
|
|
63
|
+
clean_build()
|
|
64
|
+
|
|
65
|
+
# Build the package
|
|
66
|
+
if not build_package():
|
|
67
|
+
print("ā Build failed. Exiting.")
|
|
68
|
+
sys.exit(1)
|
|
69
|
+
|
|
70
|
+
# Check the package
|
|
71
|
+
if not check_package():
|
|
72
|
+
print("ā Package check failed. Exiting.")
|
|
73
|
+
sys.exit(1)
|
|
74
|
+
|
|
75
|
+
print("\nš¦ Package built successfully!")
|
|
76
|
+
print("\nChoose an option:")
|
|
77
|
+
print("1. Upload to TestPyPI (recommended for testing)")
|
|
78
|
+
print("2. Upload to PyPI (production)")
|
|
79
|
+
print("3. Exit")
|
|
80
|
+
|
|
81
|
+
choice = input("\nEnter your choice (1-3): ").strip()
|
|
82
|
+
|
|
83
|
+
if choice == "1":
|
|
84
|
+
print("\nš¬ Uploading to TestPyPI...")
|
|
85
|
+
if upload_to_testpypi():
|
|
86
|
+
print("\nā
Package uploaded to TestPyPI successfully!")
|
|
87
|
+
print("š You can test it with: pip install --index-url https://test.pypi.org/simple/ blitzcoder")
|
|
88
|
+
else:
|
|
89
|
+
print("ā Upload to TestPyPI failed.")
|
|
90
|
+
|
|
91
|
+
elif choice == "2":
|
|
92
|
+
print("\nā ļø WARNING: This will upload to the main PyPI repository!")
|
|
93
|
+
confirm = input("Are you sure you want to continue? (yes/no): ").strip().lower()
|
|
94
|
+
if confirm == "yes":
|
|
95
|
+
if upload_to_pypi():
|
|
96
|
+
print("\nā
Package uploaded to PyPI successfully!")
|
|
97
|
+
print("š You can install it with: pip install blitzcoder")
|
|
98
|
+
else:
|
|
99
|
+
print("ā Upload to PyPI failed.")
|
|
100
|
+
else:
|
|
101
|
+
print("ā Upload cancelled.")
|
|
102
|
+
|
|
103
|
+
else:
|
|
104
|
+
print("š Exiting without upload.")
|
|
105
|
+
|
|
106
|
+
if __name__ == "__main__":
|
|
107
|
+
main()
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "blitzcoder"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "AI-powered development assistant for code generation, refactoring, and project management"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "BlitzCoder Team", email = "raghunandanerukulla@gmail.com"}
|
|
13
|
+
]
|
|
14
|
+
maintainers = [
|
|
15
|
+
{name = "Raghu Nandan Erukulla", email = "raghunandanerukulla@gmail.com"}
|
|
16
|
+
]
|
|
17
|
+
keywords = ["ai", "code-generation", "development", "assistant", "cli"]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Development Status :: 4 - Beta",
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"License :: OSI Approved :: MIT License",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Programming Language :: Python :: 3.9",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
|
+
"Topic :: Software Development :: Code Generators",
|
|
30
|
+
]
|
|
31
|
+
requires-python = ">=3.9"
|
|
32
|
+
dependencies = [
|
|
33
|
+
"python-dotenv>=0.0.1",
|
|
34
|
+
"langgraph>=0.4.9",
|
|
35
|
+
"langchain-groq>=0.3.4",
|
|
36
|
+
"langchain-sambanova>=0.1.5",
|
|
37
|
+
"langchain>=0.3.26",
|
|
38
|
+
"loguru>=0.7.3",
|
|
39
|
+
"langchain-google-genai>=2.1.5",
|
|
40
|
+
"mem0ai>=0.1.111",
|
|
41
|
+
"click>=8.1.8",
|
|
42
|
+
"click-help-colors>=0.9.4",
|
|
43
|
+
"rich>=14.0.0",
|
|
44
|
+
"langfuse>=3.0.5",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[project.optional-dependencies]
|
|
48
|
+
dev = [
|
|
49
|
+
"pytest>=7.0.0",
|
|
50
|
+
"pytest-cov>=4.0.0",
|
|
51
|
+
"black>=22.0.0",
|
|
52
|
+
"isort>=5.0.0",
|
|
53
|
+
"flake8>=5.0.0",
|
|
54
|
+
"mypy>=1.0.0",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[project.scripts]
|
|
58
|
+
blitzcoder = "blitzcoder.cli.cli_coder:cli"
|
|
59
|
+
|
|
60
|
+
[project.urls]
|
|
61
|
+
Homepage = "https://github.com/Raghu6798/BlitzCoder"
|
|
62
|
+
Repository = "https://github.com/Raghu6798/BlitzCoder"
|
|
63
|
+
Documentation = "https://github.com/Raghu6798/BlitzCoder#readme"
|
|
64
|
+
"Bug Tracker" = "https://github.com/Raghu6798/BlitzCoder/issues"
|
|
65
|
+
|
|
66
|
+
[tool.setuptools.packages.find]
|
|
67
|
+
where = ["src"]
|
|
68
|
+
|
|
69
|
+
[tool.setuptools.package-data]
|
|
70
|
+
"*" = ["*.txt", "*.md", "*.yml", "*.yaml"]
|
|
71
|
+
|
|
72
|
+
[tool.black]
|
|
73
|
+
line-length = 88
|
|
74
|
+
target-version = ['py39']
|
|
75
|
+
include = '\.pyi?$'
|
|
76
|
+
|
|
77
|
+
[tool.isort]
|
|
78
|
+
profile = "black"
|
|
79
|
+
multi_line_output = 3
|
|
80
|
+
line_length = 88
|
|
81
|
+
|
|
82
|
+
[tool.mypy]
|
|
83
|
+
python_version = "3.9"
|
|
84
|
+
warn_return_any = true
|
|
85
|
+
warn_unused_configs = true
|
|
86
|
+
disallow_untyped_defs = true
|